@font-face {
  font-family: "Oxanium";
  src: url("fonts/Oxanium-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("fonts/Rajdhani-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("fonts/Rajdhani-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
}
:root {
  --ink: #e9f8ff;
  --muted: #9fb5cb;
  --cyan: #81f6ff;
  --lime: #d8f58a;
  --navy: #07101e;
  --line: #8be8ed33;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #050b17;
  color: var(--ink);
  font-family: "Rajdhani", system-ui, sans-serif;
  font-weight: 600;
  overflow: hidden;
  touch-action: none;
}
.fullscreen-button {
  position: fixed;
  z-index: 1000;
  top: max(65px, calc(env(safe-area-inset-top) + 48px));
  right: max(20px, env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #8be8ed88;
  border-radius: 10px;
  background: #07101eea;
  color: #d8f58a;
  font: 800 11px "Oxanium", sans-serif;
  letter-spacing: .07em;
  pointer-events: auto;
}
.arcade-link {
  position: fixed;
  z-index: 1000;
  top: max(65px, calc(env(safe-area-inset-top) + 48px));
  left: max(20px, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #8be8ed88;
  border-radius: 10px;
  background: #07101eea;
  color: #d8f58a;
  text-decoration: none;
  font: 800 11px "Oxanium", sans-serif;
  letter-spacing: .07em;
  pointer-events: auto;
}
.arcade-link:hover,.arcade-link:focus-visible { background: #16394b; }
.fullscreen-button:hover,.fullscreen-button:focus-visible { background: #16394b; }
.fullscreen-button[hidden] { display: none; }
@media (max-width: 600px) { .fullscreen-button span,.arcade-link span { display: none; } .fullscreen-button { top: max(57px, calc(env(safe-area-inset-top) + 40px)); right: 10px; min-width: 32px; justify-content: center; } .arcade-link { top: max(57px, calc(env(safe-area-inset-top) + 40px)); left: 10px; min-width: 32px; justify-content: center; } }
button,
input {
  font: inherit;
}
h1,
h2,
.brand,
.hud-block strong,
.btn,
.card b,
.result-score,
.record-card strong,
.setting-row output,
.pause-stats b,
#dash {
  font-family: "Oxanium", "Rajdhani", sans-serif;
}
.eyebrow,
.hud-label,
.hud-meta,
.hud-center #combo,
.card-top,
.card-select,
.menu-edition,
.menu-footer,
.card-index,
.record-card > span,
.record-card small,
.launch-sub {
  font-family: "Oxanium", "Rajdhani", sans-serif;
}
button {
  cursor: pointer;
}
canvas {
  display: block;
  width: 100vw;
  height: 100dvh;
}
#ui,
#flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#flash {
  background: #ff5d92;
  opacity: 0;
  transition: opacity 0.13s ease-out;
}
#xp {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #273c56;
}
#xpfill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #59ccf7, #c5fff3);
  box-shadow: 0 0 15px #5ceaff;
}
#hud {
  position: absolute;
  top: max(17px, env(safe-area-inset-top));
  left: 20px;
  right: 20px;
  display: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  text-shadow: 0 2px 6px #000;
}
.hud-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hud-label,
.hud-meta,
.hud-center #combo {
  font-size: 10px;
  letter-spacing: 0.19em;
  font-weight: 800;
  color: #a8d2df;
}
.hud-block strong {
  font-size: clamp(16px, 2.3vw, 23px);
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.hud-health {
  width: 190px;
}
.hud-health .heart {
  color: #ff6d88;
}
#health {
  height: 7px;
  margin-top: 5px;
  border-radius: 10px;
  background: #314050;
  overflow: hidden;
}
#shield {
  height: 4px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #1a3150;
}
#shieldfill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #4aaeff, #8ef7ff);
  box-shadow: 0 0 10px #58d8ff;
  transition: width .16s linear;
}
#hpfill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff5c78, #ffc889);
  box-shadow: 0 0 15px #f76d70;
}
.hud-center {
  text-align: center;
}
.hud-center #combo {
  color: #d7f395;
}
.hud-score {
  text-align: right;
}
#pauseButton {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0d2131da;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}
#pauseButton:active {
  transform: scale(0.94);
}
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  background: radial-gradient(ellipse at 50% 38%, #12344bdc, #050c19f5 75%);
  backdrop-filter: blur(10px);
}
#panel {
  width: min(100%, 690px);
  max-height: 100%;
  overflow-y: auto;
  padding: clamp(26px, 4vw, 44px);
  text-align: center;
  border: 1px solid #91f7fb38;
  border-radius: 20px;
  background: linear-gradient(145deg, #10293ddf, #0a1628f5 62%, #111b2cea);
  box-shadow:
    0 30px 95px #000b,
    inset 0 1px #ffffff25;
  animation: rise 0.35s ease-out;
}
.eyebrow {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.26em;
  color: var(--cyan);
  text-transform: uppercase;
}
.eyebrow i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}
h1,
h2,
p {
  margin-top: 0;
}
h2 {
  font-size: clamp(35px, 6vw, 58px);
  letter-spacing: -0.045em;
  margin: 9px 0 10px;
  line-height: 1.05;
}
.panel-intro {
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  max-width: 470px;
  margin: 0 auto 27px;
}
.btn {
  border: 0;
  border-radius: 8px;
  padding: 15px 25px;
  background: var(--lime);
  color: #101c20;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 11px 27px #c4fb722f;
  transition:
    transform 0.15s,
    filter 0.15s,
    box-shadow 0.15s;
}
.btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 15px 34px #bdfb7644;
}
.btn:active,
.card:active {
  transform: scale(0.97);
}
.btn-ghost {
  border: 1px solid #87d5df66;
  background: #123040;
  color: var(--ink);
  box-shadow: none;
}
.panel-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.tiny {
  color: #90aec2;
  font-size: 12px;
  letter-spacing: 0.06em;
  margin: 18px 0 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin: 25px 0;
}
.card {
  min-height: 185px;
  padding: 20px 16px;
  border: 1px solid #8bdde344;
  border-radius: 11px;
  background: linear-gradient(150deg, #17384a, #102339);
  color: var(--ink);
  text-align: left;
  transition:
    transform 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.card:hover,
.card.selected {
  border-color: var(--cyan);
  background: #1d4555;
  box-shadow: 0 0 24px #50def833;
}
.card b {
  display: block;
  color: var(--cyan);
  font-size: 19px;
  margin: 12px 0 7px;
}
.card span {
  display: block;
  color: #b8cfda;
  font-size: 13px;
  line-height: 1.4;
}
.emoji {
  font-size: 31px;
}
.pause-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.pause-stats div {
  flex: 1;
  min-width: 100px;
  padding: 14px 12px;
  background: #132d3c;
  border: 1px solid #87c8d622;
  text-align: left;
}
.pause-stats span,
.result-score span {
  display: block;
  color: #92adbc;
  font-size: 10px;
  letter-spacing: 0.2em;
  font-weight: 800;
}
.pause-stats b {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}
.result-score {
  font-size: clamp(55px, 10vw, 82px);
  font-weight: 950;
  letter-spacing: -0.07em;
  color: var(--lime);
  line-height: 1;
  margin: 22px 0;
}
.result-score span {
  font-size: 11px;
  letter-spacing: 0.24em;
  margin-top: 7px;
}
.settings-list {
  display: grid;
  gap: 13px;
  text-align: left;
}
.settings-columns { display:grid; grid-template-columns:1fr 1fr; gap:16px; text-align:left; }
#panel:has(.settings-columns) { width:min(100%,980px); }
.controller-map { padding:16px; border:1px solid #78dce83d; border-radius:12px; background:#081725b8; }
.controller-map h3 { margin:0 0 5px; color:#fff; font:850 13px "Oxanium"; letter-spacing:.12em; }
.controller-map > p { margin:0 0 11px; color:#a9c4d0; font-size:13px; }
.mapping-row { width:100%; display:grid; grid-template-columns:1fr auto; align-items:center; gap:10px; margin:7px 0; padding:10px 12px; border:1px solid #6cbdca42; border-radius:8px; background:#102b3c; color:#fff; text-align:left; }
.mapping-row b,.mapping-row small { display:block; }
.mapping-row small { color:#a9c0cb; margin-top:2px; }
.mapping-row output { min-width:72px; padding:8px; border:1px solid #c9ff9f70; border-radius:6px; color:#eaffb5; font:900 11px "Oxanium"; text-align:center; }
.mapping-row.selected,.mapping-row:focus-visible { border-color:#b9ffdc; background:#1b4754; }
.mapping-row.listening { border-color:#eaff8b; animation:pulse 1s ease-in-out infinite; }
.mapping-reset { width:100%; margin-top:8px; padding:10px; border:1px solid #91bdc84a; border-radius:7px; background:transparent; color:#dcecf1; font:800 10px "Oxanium"; letter-spacing:.1em; }
.controller-help { display:grid; gap:4px; margin-top:13px; padding:11px; border-left:3px solid var(--cyan); background:#102838; }
.controller-help b { color:#fff; font:800 10px "Oxanium"; }
.controller-help span { color:#bbd4dc; font:800 9px "Oxanium"; letter-spacing:.08em; }
.setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 20px;
  background: #102b3c;
  border: 1px solid #72cbdb35;
  border-radius: 11px;
}
.setting-row b {
  display: block;
  font-size: 18px;
}
.setting-row small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}
.setting-row output {
  color: var(--lime);
  font-weight: 900;
  font-size: 18px;
}
.setting-row input {
  grid-column: 1/-1;
  width: 100%;
  accent-color: var(--lime);
  cursor: pointer;
}
.menu-mode {
  padding: 0;
  background:
    linear-gradient(100deg, #061320ed, #081527d9),
    radial-gradient(circle at 73% 40%, #175a7088, #050b17 60%);
  backdrop-filter: none;
}
.menu-mode #panel {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  overflow-y: auto;
  padding: 0;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.menu-shell {
  min-height: 100%;
  max-width: 1500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3vw, 44px) clamp(24px, 5vw, 80px) 22px;
}
.menu-top,
.menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0.15em;
}
.brand-mark {
  font-size: 27px;
  color: var(--lime);
}
.brand-accent {
  color: var(--cyan);
}
.menu-edition,
.menu-footer,
.text-button,
.card-index,
.record-card > span,
.record-card small {
  color: #91b4c1;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.19em;
}
.text-button {
  border: 1px solid #7bd9e54f;
  border-radius: 7px;
  padding: 10px 13px;
  background: #0b2433a8;
  color: var(--ink);
}
.text-button:hover {
  border-color: var(--cyan);
}
.menu-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  flex: 1;
  min-height: 380px;
}
.menu-copy {
  position: relative;
  z-index: 2;
  padding: 30px 0;
}
.menu-copy h1 {
  font-size: clamp(75px, 12vw, 176px);
  line-height: 0.75;
  letter-spacing: -0.105em;
  font-weight: 950;
  margin: 28px 0 30px;
  text-shadow: 0 10px 40px #0008;
}
.menu-copy h1 em {
  font-style: normal;
  color: var(--cyan);
}
.title-period {
  color: var(--lime);
}
.menu-lead {
  color: #c3dce1;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 27px;
}
.menu-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.launch {
  min-width: 224px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  font-size: 15px;
  padding: 18px 22px;
}
.launch span {
  font-size: 22px;
}
.launch-sub {
  font-size: 10px;
  letter-spacing: 0.17em;
  font-weight: 800;
  color: #8aaab8;
}
.hero-art {
  position: relative;
  width: min(100%, 630px);
  height: min(57vw, 540px);
  min-height: 380px;
  justify-self: center;
  filter: drop-shadow(0 35px 80px #12a4aa34);
}
.hero-ring {
  position: absolute;
  left: 50%;
  top: 48%;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  border: solid #4ce9eb;
  box-shadow:
    0 0 25px #44e8eb77,
    inset 0 0 28px #38dddb77;
}
.ring-back {
  width: 72%;
  aspect-ratio: 1;
  border-width: 2px;
  opacity: 0.46;
  animation: ring 22s linear infinite;
}
.ring-mid {
  width: 57%;
  aspect-ratio: 1;
  border-width: 17px;
  border-color: #43dce7 #174355 #82f2e3 #236677;
  box-shadow:
    0 0 32px #36d3d9aa,
    inset 0 0 45px #42e5df66;
  animation: ring 16s linear infinite reverse;
}
.ring-front {
  width: 41%;
  aspect-ratio: 1;
  border-width: 2px;
  border-color: #d8f58a #46e1e1 #46e1e1 #d8f58a;
  opacity: 0.9;
  animation: ring 12s linear infinite;
}
.hero-core {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 33%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #a9fff2 0,
    #43d5df 14%,
    #0d5767 31%,
    #062d43 60%,
    transparent 71%
  );
  box-shadow: 0 0 110px 20px #24d4d977;
  animation: pulse 4s ease-in-out infinite;
}
.hero-ship {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 130px;
  height: 155px;
  transform: translate(-50%, -50%) rotate(25deg);
  animation: none;
  filter: drop-shadow(0 20px 18px #000a);
}
.ship-hull {
  position: absolute;
  left: 36px;
  top: 0;
  width: 58px;
  height: 134px;
  background: linear-gradient(
    90deg,
    #547c8a,
    #d5faff 25%,
    #8cdce5 50%,
    #244b68 100%
  );
  clip-path: polygon(50% 0, 100% 68%, 75% 100%, 50% 84%, 25% 100%, 0 68%);
  border-radius: 25px;
}
.ship-wing {
  position: absolute;
  top: 52px;
  width: 67px;
  height: 82px;
  background: linear-gradient(#a5e0df, #277789);
  clip-path: polygon(85% 0, 100% 100%, 0 86%);
}
.ship-wing.left {
  left: 0;
}
.ship-wing.right {
  right: 0;
  transform: scaleX(-1);
}
.ship-cockpit {
  position: absolute;
  left: 52px;
  top: 40px;
  width: 26px;
  height: 50px;
  border-radius: 50% 50% 35% 35%;
  background: linear-gradient(#102b41, #6ef3ed);
  box-shadow: 0 0 13px #75fff4;
}
.ship-engine {
  position: absolute;
  left: 54px;
  top: 123px;
  width: 22px;
  height: 56px;
  clip-path: polygon(20% 0, 80% 0, 100% 100%, 50% 75%, 0 100%);
  background: linear-gradient(#d5f5a2, #3cf2e6, transparent);
  filter: blur(3px);
  animation: thrust 0.3s alternate infinite;
}
.art-coordinate {
  position: absolute;
  font-size: 10px;
  color: #b9f1e9;
  letter-spacing: 0.2em;
  font-weight: 800;
}
.coord-a {
  left: 0;
  top: 15%;
}
.coord-b {
  right: 0;
  bottom: 14%;
}
.menu-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(180px, 0.7fr);
  gap: 12px;
  padding-top: 5px;
}
.mission-card,
.record-card {
  border-top: 1px solid #8adbe766;
  padding: 17px 15px 12px 0;
}
.mission-card b {
  display: block;
  font-size: 14px;
  letter-spacing: 0.08em;
  margin: 9px 0;
}
.mission-card p {
  font-size: 14px;
  color: #9db7c4;
  line-height: 1.5;
  margin: 0;
  max-width: 300px;
}
.mission-card p strong {
  color: #dff5a1;
}
.record-card {
  border: 1px solid #8adbe766;
  background: #10313d77;
  padding: 17px 20px;
  align-self: stretch;
}
.record-card strong {
  display: block;
  color: var(--lime);
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.2;
  margin: 7px 0;
}
.menu-footer {
  padding-top: 22px;
  margin-top: 12px;
  border-top: 1px solid #6ca5af25;
}
#joy,
#aimJoy {
  position: absolute;
  left: 0;
  top: 0;
  width: 112px;
  height: 112px;
  display: none;
  transform: translate(-50%, -50%);
  border: 2px solid #83f4ff99;
  border-radius: 50%;
  background: radial-gradient(circle, #48c9ed33, #4ce9ff0d 68%);
  box-shadow:
    0 0 22px #3de8ff55,
    inset 0 0 24px #4addff22;
  pointer-events: none;
  z-index: 3;
}
#knob,
#aimKnob {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -21px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #a6f9ffbb;
  box-shadow: 0 0 18px #72ebff;
}
#aimJoy {
  border-color:#f0a4ff99;
  background:radial-gradient(circle,#d264f033,#bb4cff0d 68%);
  box-shadow:0 0 22px #c75cff55,inset 0 0 24px #d65cff22;
}
#aimKnob { background:#efb2ffcc;box-shadow:0 0 18px #d66dff; }
#dash {
  position: absolute;
  right: max(27px, env(safe-area-inset-right));
  bottom: max(25px, env(safe-area-inset-bottom));
  width: 86px;
  height: 86px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 2px solid #a2faff;
  background: radial-gradient(circle at 40% 30%, #29899e, #0a3650 75%);
  border-radius: 50%;
  color: white;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.09em;
  box-shadow:
    0 0 0 7px #1b92a62b,
    0 0 23px #36dcea7f;
  pointer-events: auto;
  z-index: 4;
  touch-action: none;
}
.surge-ring {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  transform: rotate(-90deg);
  pointer-events: none;
}
.surge-ring circle { fill: none; stroke: #ffffff22; stroke-width: 2; }
.surge-ring #surgeProgress {
  stroke: #dcff8a;
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 3px #cfff82);
  transition: stroke-dashoffset .12s linear;
}
#inputHint {
  position: absolute;
  left: 50%;
  bottom: max(13px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: #a9c4d2aa;
  font: 800 9px "Oxanium", sans-serif;
  letter-spacing: .14em;
  display: none;
}
.upgrade-layout { display:grid; grid-template-columns:minmax(0, 2fr) minmax(190px, .8fr); gap:16px; text-align:left; }
.upgrade-layout .cards { margin:0; }
.build-panel { padding:14px; border:1px solid #70dce733; border-radius:12px; background:#071524bb; max-height:360px; overflow:auto; }
.build-panel h3 { margin:0 0 10px; font:800 13px "Oxanium"; color:#d8f58a; letter-spacing:.08em; }
.build-item { display:block; width:100%; padding:9px; margin:5px 0; border:1px solid transparent; border-radius:7px; background:#133044; color:#dcefff; text-align:left; }
.build-item.selected { border-color:#a9ffda; background:#1d4a5b; }
.build-item small { display:block; color:#9bbac7; margin-top:3px; }
.card-level { color:#d8f58a !important; font-size:10px !important; }
.stat-change { color:#8effda !important; font-weight:800; margin-top:8px; }
.salvage { color:#d8f58a; font:800 14px "Oxanium"; }
.achievement-list { display:grid; gap:7px; margin:15px 0; text-align:left; }
.achievement { padding:10px 12px; background:#10283a; border-left:3px solid #4c7582; }
.achievement.unlocked { border-color:#d8f58a; color:#efffc1; }
.settings-list .toggle { display:flex; align-items:center; gap:10px; grid-column:1/-1; }
.settings-list input[type=checkbox] { width:20px; height:20px; accent-color:#d8f58a; }
@media (max-width: 720px) {
  .upgrade-layout { grid-template-columns:1fr; }
  .build-panel { max-height:120px; }
  .settings-columns { grid-template-columns:1fr; }
}
#dash .dash-icon {
  font-size: 24px;
  line-height: 1;
}
#dash small {
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #dbfff4;
}
#dash:disabled {
  opacity: 0.5;
  filter: saturate(0.6);
}
#tactical {
  position:absolute;
  right:max(124px, calc(env(safe-area-inset-right) + 124px));
  bottom:max(31px, env(safe-area-inset-bottom));
  width:74px;height:62px;display:none;flex-direction:column;align-items:center;justify-content:center;
  border:1px solid #c68cffaa;border-radius:15px;background:linear-gradient(145deg,#402258,#161d3d);color:#fff;
  box-shadow:0 0 20px #b657ff44;pointer-events:auto;font:800 9px "Oxanium";letter-spacing:.06em;
}
#tactical span{color:#d8f58a;font-size:11px} #tactical b{font-size:9px} #tactical small{font-size:8px;color:#d7c7e9;margin-top:2px} #tactical:disabled{opacity:.42}
:focus-visible {
  outline: 3px solid #d8f58a;
  outline-offset: 3px;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ring {
  to {
    transform: translate(-50%, -50%) rotate(335deg);
  }
}
@keyframes pulse {
  50% {
    transform: translate(-50%, -50%) scale(1.08);
    filter: brightness(1.3);
  }
}
@keyframes shipFloat {
  50% {
    transform: translate(-50%, -54%) rotate(25deg);
  }
}
@keyframes thrust {
  to {
    height: 70px;
    opacity: 0.72;
  }
}
@media (max-width: 820px) {
  .menu-main {
    grid-template-columns: 1fr 1fr;
  }
  .menu-copy h1 {
    font-size: clamp(65px, 13vw, 110px);
  }
  .hero-art {
    min-height: 320px;
  }
  .menu-bottom {
    grid-template-columns: 1fr 1fr;
  }
  .record-card {
    grid-column: 1/-1;
  }
  .menu-edition {
    display: none;
  }
}
@media (max-width: 600px) {
  #hud {
    left: 10px;
    right: 10px;
    gap: 7px;
  }
  .hud-health {
    width: 110px;
  }
  .hud-block strong {
    font-size: 14px;
  }
  .hud-label,
  .hud-meta,
  .hud-center #combo {
    font-size: 8px;
    letter-spacing: 0.07em;
  }
  #pauseButton {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  #overlay {
    padding: 12px;
  }
  #panel {
    padding: 24px 17px;
  }
  .menu-mode {
    padding: 0;
  }
  .menu-mode #panel {
    padding: 0;
  }
  .menu-shell {
    padding: 18px 20px;
  }
  .menu-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    align-items: stretch;
  }
  .menu-copy {
    padding: 24px 0 0;
  }
  .menu-copy h1 {
    font-size: clamp(77px, 20vw, 125px);
    margin: 19px 0 21px;
  }
  .menu-lead {
    font-size: 18px;
    margin-bottom: 18px;
  }
  .menu-buttons {
    gap: 12px;
  }
  .launch {
    min-width: 205px;
    padding: 14px 18px;
  }
  .hero-art {
    position: absolute;
    right: -70px;
    top: 80px;
    width: 280px;
    height: 280px;
    min-height: 0;
    opacity: 0.32;
    z-index: 0;
  }
  .art-coordinate {
    display: none;
  }
  .menu-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
    margin-top: 28px;
  }
  .mission-card {
    padding-top: 11px;
  }
  .mission-card b {
    font-size: 12px;
  }
  .mission-card p {
    font-size: 12px;
  }
  .record-card {
    grid-column: 1/-1;
    padding: 9px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .record-card strong {
    font-size: 26px;
    margin: 0;
  }
  .record-card small {
    display: none;
  }
  .menu-footer {
    font-size: 8px;
    padding-top: 13px;
    margin-top: auto;
  }
  .cards {
    gap: 6px;
  }
  .card {
    padding: 11px 8px;
    min-height: 155px;
  }
  .card b {
    font-size: 14px;
  }
  .card span {
    font-size: 11px;
  }
  .emoji {
    font-size: 23px;
  }
  #joy,
  #aimJoy {
    width: 102px;
    height: 102px;
  }
}
@media (max-height: 680px) {
  .menu-shell {
    padding-top: 13px;
    padding-bottom: 10px;
  }
  .menu-copy {
    padding-top: 9px;
  }
  .menu-copy h1 {
    margin: 14px 0;
    font-size: clamp(62px, 10vw, 120px);
  }
  .menu-lead {
    margin-bottom: 13px;
  }
  .hero-art {
    min-height: 290px;
    height: 310px;
  }
  .menu-bottom {
    margin-top: 12px;
  }
  .menu-footer {
    padding-top: 10px;
    margin-top: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* Upgrade bay: compact system cards with a clear selection state. */
#overlay:has(.cards) #panel {
  width: min(100%, 850px);
  background: linear-gradient(145deg, #112c3c, #081726 70%, #172337);
}
.cards {
  gap: 14px;
  margin: 28px 0 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 245px;
  padding: 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #75cdd550;
  background: linear-gradient(153deg, #1a3c4b, #0d2236 70%);
  box-shadow: 0 14px 33px #0005;
}
.card:before {
  content: "";
  position: absolute;
  top: -65px;
  right: -35px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #74e8dc12;
  filter: blur(12px);
}
.card:hover,
.card.selected {
  border-color: #b9ffdb;
  background: linear-gradient(150deg, #22556a, #122a3b 75%);
  box-shadow:
    0 0 0 1px #a4ffdb66,
    0 16px 40px #0008,
    0 0 28px #60f6e126;
  transform: translateY(-4px);
}
.card-top {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  color: #9bc3cd !important;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: 0.18em;
}
.card-top span {
  font-size: inherit !important;
  color: inherit !important;
}
.card-emblem {
  display: grid !important;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 17px 0 12px;
  border: 1px solid #8cf7e470;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 35%, #7df6e044, #11617b44 70%);
  font-size: 28px !important;
  color: #e7fff1 !important;
  box-shadow:
    inset 0 0 17px #7cf3eb29,
    0 0 22px #48dcc529;
}
.card b {
  position: relative;
  font-size: 20px;
  letter-spacing: -0.025em;
  color: #f3feff;
  margin: 0 0 7px;
}
.card-copy {
  position: relative;
  color: #b8d0d8 !important;
  font-size: 14px !important;
  line-height: 1.4;
  min-height: 38px;
}
.card-select {
  display: block !important;
  margin-top: auto;
  padding-top: 18px;
  color: #cdf6a2 !important;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: 0.13em;
}
@media (max-width: 600px) {
  .cards {
    gap: 7px;
  }
  .card {
    min-height: 200px;
    padding: 10px;
  }
  .card-emblem {
    width: 43px;
    height: 43px;
    font-size: 21px !important;
    margin: 10px 0;
  }
  .card b {
    font-size: 14px;
  }
  .card-copy {
    font-size: 11px !important;
    min-height: 42px;
  }
  .card-top {
    font-size: 8px !important;
  }
  .card-select {
    font-size: 9px !important;
    padding-top: 7px;
  }
}
.card-emblem svg {
  display: block;
  width: 34px;
  height: 34px;
  color: #c9fff0;
  filter: drop-shadow(0 0 5px #7ffff066);
}

/* Infinite stage bridge and ship frame gallery. */
.deployment {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(220px, 1fr);
  gap: 10px;
  max-width: 720px;
  margin: 0 0 15px;
}
.selector {
  min-height: 108px;
  padding: 14px 16px;
  border: 1px solid #7ceaf044;
  border-radius: 10px;
  background: linear-gradient(135deg, #112c3ed9, #091a2cdd);
  color: white;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.selector:hover,
.selector.selected,
.selector:focus-visible {
  transform: translateY(-3px);
  border-color: #baffdf;
  background: linear-gradient(135deg, #1b4f5c, #10263d);
  box-shadow: 0 12px 30px #0006, 0 0 22px #63f4dc20;
}
.selector small,
.selector b,
.selector span,
.selector i { display:block; }
.selector small,
.selector i {
  font: 850 9px "Oxanium", sans-serif;
  letter-spacing: .16em;
  color: #8fb8c7;
}
.selector b {
  margin: 5px 0 4px;
  font: 850 17px "Oxanium", sans-serif;
  color: #fff;
}
.selector span {
  min-height: 31px;
  color: #bdd1da;
  font-size: 12px;
  line-height: 1.3;
}
.selector i {
  margin-top: 8px;
  color: var(--lime);
  font-style: normal;
}
.hero-art.stage-foundry { filter: drop-shadow(0 35px 80px #ff5a242f); }
.hero-art.stage-foundry .hero-core { filter:hue-rotate(135deg) saturate(1.5); }
.hero-art.stage-void { filter: drop-shadow(0 35px 80px #a44cff38); }
.hero-art.stage-void .hero-core { filter:hue-rotate(235deg) saturate(1.45); }
.hero-ship.frame-specter { transform:translate(-50%,-50%) rotate(25deg); }
.hero-ship.frame-specter .ship-wing { clip-path:polygon(100% 0,70% 100%,0 62%); background:linear-gradient(#bde7ff,#5550a6); }
.hero-ship.frame-specter .ship-hull { background:linear-gradient(90deg,#312f69,#d9f2ff 45%,#51408a); }
.hero-ship.frame-foundry { transform:translate(-50%,-50%) rotate(25deg); }
.hero-ship.frame-foundry .ship-wing { background:linear-gradient(#ffd49b,#8d4d30); clip-path:polygon(72% 0,100% 82%,0 100%); }
.hero-ship.frame-foundry .ship-hull { background:linear-gradient(90deg,#75452e,#fff0c2 45%,#8f4a31); }
.hero-ship.frame-arc .ship-hull { background:linear-gradient(90deg,#36579e,#e5fbff 42%,#7853b9); clip-path:polygon(50% 0,87% 55%,100% 100%,50% 78%,0 100%,13% 55%); }
.hero-ship.frame-arc .ship-wing { background:linear-gradient(#aafaff,#4558c1); clip-path:polygon(100% 0,72% 100%,0 70%); }
.hero-ship.frame-scavenger { transform:translate(-50%,-50%) rotate(25deg); }
.hero-ship.frame-scavenger .ship-hull { background:linear-gradient(90deg,#47624c,#f2efbf 42%,#856b39); }
.hero-ship.frame-scavenger .ship-wing.left { top:42px; transform:rotate(-8deg); }
.hero-ship.frame-scavenger .ship-wing.right { top:67px; transform:scaleX(-1) rotate(-8deg); }
.ship-engine.auxiliary { display:none; }
.hero-ship.frame-foundry .ship-engine.auxiliary { display:block; left:28px; top:112px; transform:scale(.68); }

/* Hangar keeps all operational copy bright against the darker bay. */
.hangar-mode {
  align-items:flex-start !important;
  background: radial-gradient(circle at 18% 20%, #164d5bda, transparent 38%), linear-gradient(145deg,#040a13f8,#0b1d2cf7) !important;
}
.hangar-mode #panel {
  width:min(100%,1040px);
  color:#fff;
  text-align:left;
  border-color:#94fff04d;
  background:linear-gradient(145deg,#102d3bea,#081421f5 70%);
}
.hangar-header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; padding-bottom:20px; border-bottom:1px solid #9bf3ef31; }
.hangar-header h2 { color:#fff; margin-bottom:5px; }
.hangar-header p { color:#dcecf1; margin:0; }
.salvage-bank { min-width:170px; padding:15px; border:1px solid #baffd95c; background:#173c3c; }
.salvage-bank small { display:block; color:#c8e5e7; font:800 9px "Oxanium"; letter-spacing:.15em; }
.salvage-bank strong { display:block; margin-top:4px; color:#efffc2; font:900 27px "Oxanium"; }
.hangar-grid { display:grid; grid-template-columns:1.05fr .95fr; gap:18px; margin-top:18px; }
.hangar-grid h3 { margin:0 0 10px; color:#fff; font:850 12px "Oxanium"; letter-spacing:.14em; }
.hangar-upgrades,.hangar-unlocks { display:grid; align-content:start; gap:9px; }
.hangar-mode .setting-row { color:#fff; background:linear-gradient(135deg,#17394a,#0c2436); }
.hangar-mode .setting-row b,.hangar-mode .setting-row small { color:#fff; }
.hangar-mode .setting-row em { margin-left:6px; color:#bfffc7; font:800 10px "Oxanium"; font-style:normal; }
.stage-lock { padding:12px 14px; border:1px solid #5e7483; background:#101c2a; opacity:.68; }
.stage-lock.unlocked { border-color:#71f4d763; background:linear-gradient(135deg,#17423f,#112b3a); opacity:1; }
.stage-lock span,.stage-lock b,.stage-lock small { display:block; color:#fff; }
.stage-lock span { color:#9fb8c4; font:800 8px "Oxanium"; letter-spacing:.15em; }
.stage-lock.unlocked span { color:#bcffb3; }
.stage-lock b { margin:3px 0; font:850 15px "Oxanium"; }
.stage-lock small { color:#d4e3e8; }
.achievement small { display:block; color:#d4e3e8; margin-top:3px; }

@media (orientation:portrait) {
  .menu-main { display:flex; flex-direction:column; align-items:stretch; justify-content:center; }
  .menu-copy { padding-top:42px; }
  .menu-copy h1 { font-size:clamp(74px,21vw,150px); }
  .hero-art { position:absolute; width:58vw; height:58vw; min-height:0; right:-13vw; top:12vh; opacity:.35; }
  .deployment { grid-template-columns:1fr; max-width:620px; }
  .selector { min-height:91px; }
  .menu-footer { margin-top:auto; }
  .hangar-grid { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  .deployment { gap:7px; }
  .selector { min-height:82px; padding:10px 12px; }
  .selector b { font-size:14px; }
  .selector span { min-height:0; font-size:10px; }
  .selector i { margin-top:4px; }
  .hangar-header { align-items:stretch; flex-direction:column; }
  .salvage-bank { min-width:0; }
  .hangar-mode #panel { padding:20px 14px; }
}
@media (max-width: 600px) {
  .card-emblem svg {
    width: 25px;
    height: 25px;
  }
}
