:root {
  color-scheme: dark;
  color: #f4f8ff;
  background: #0b1230;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cyan: #93fce3;
  --gold: #ffcf96;
  --line: #b6d8ff37;
  --muted: #c1cee7;
  --surface: #16233f;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
button, a { color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
a { text-decoration: none; }
:is(button, a):focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
canvas:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.jet-shell {
  max-width: 1320px;
  min-height: 100svh;
  margin: auto;
  padding: max(16px, env(safe-area-inset-top)) clamp(14px, 4vw, 58px) max(14px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto minmax(240px, 1fr) auto;
  gap: 14px;
  background: radial-gradient(ellipse at 76% 40%, #221c48, #0b1230 72%);
}
.jet-shell:fullscreen { max-width: none; overflow: auto; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.top h1 {
  margin-right: auto;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -.07em;
  font-size: clamp(1.38rem, 3.2vw, 2.56rem);
  white-space: nowrap;
}
.top h1 span { color: var(--cyan); margin-left: .15em; }
.back, .actions button, .pause {
  background: #172749;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 745;
  font-size: .79rem;
  padding: 9px 12px;
  text-align: center;
  white-space: nowrap;
}
.back { margin-right: clamp(1px, 1.5vw, 18px); }
.actions { display: flex; gap: 6px; align-items: center; }
.actions button { min-height: 39px; }
#fullscreen { font-size: 1.03rem; line-height: 1; }
#mute[data-muted=false] { color: var(--cyan); }
.hud {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto auto;
  align-items: center;
  gap: clamp(8px, 3vw, 36px);
  min-width: 0;
  background: #101d3a;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}
.route-label { display: flex; align-items: center; justify-content: space-between; gap: 9px; font-size: clamp(.63rem, 1.7vw, .83rem); margin-bottom: 6px; }
.route-label strong { color: var(--cyan); }
.route-label span { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; border: 0; height: 5px; border-radius: 8px; overflow: hidden; background: #304369; }
progress::-webkit-progress-bar { background: #304369; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #4ebee9, var(--cyan)); }
progress::-moz-progress-bar { background: var(--cyan); }
.stat { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.stat > span { color: var(--muted); font-size: .67rem; }
.stat > strong { font-size: clamp(.97rem, 2vw, 1.5rem); line-height: 1; white-space: nowrap; }
#combo { padding-left: 2px; color: var(--gold); font-size: .68em; }
.pause:disabled { opacity: .46; }
.stage {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 0;
  place-items: stretch;
  background: #161736;
  border-radius: 15px;
  border: 1px solid #a5baf64d;
  box-shadow: 0 18px 42px #03081c88;
}
.arena { position: absolute; inset: 0; display: grid; min-width: 0; place-items: center; background: radial-gradient(ellipse at 62% 48%, #45345b, #12162e 72%); }
.arena canvas { display: block; max-width: 100%; touch-action: none; }
.menu {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  padding: clamp(17px, 4vw, 50px);
  background: linear-gradient(90deg, #100f31f7 4%, #151836b8 40%, #151b3722 76%);
}
.menu-copy { max-width: 34rem; }
.eyebrow { font-size: .72rem; color: var(--cyan); text-transform: uppercase; letter-spacing: .155em; font-weight: 900; }
.menu h2 { font-size: clamp(2rem, 5.2vw, 5rem); letter-spacing: -.067em; font-weight: 930; line-height: 1; text-wrap: balance; margin: 11px 0 13px; }
#menu-note { color: #f2ecfa; max-width: 35ch; line-height: 1.42; font-size: clamp(.83rem, 1.4vw, 1.04rem); }
.start { display: flex; justify-content: space-between; gap: 15px; min-width: 154px; min-height: 45px; margin-top: 17px; color: #11242b; background: var(--cyan); border: 0; border-radius: 8px; padding: 10px 15px; font-weight: 865; align-items: center; }
.start:hover { background: #c2ffee; }
.console { display: grid; justify-content: center; column-gap: clamp(8px, 2.8vw, 27px); grid-template-columns: auto minmax(112px, 190px) auto; align-items: start; }
.action, .jet-button { min-height: 52px; border: 1px solid var(--line); border-radius: 9px; padding: 9px clamp(9px, 2vw, 17px); color: #f4f8ff; background: var(--surface); font-weight: 820; white-space: nowrap; }
.action:disabled { opacity: .58; }
.action span, .jet-button span:first-child { margin-right: 4px; color: var(--cyan); }
.jet-control { display: grid; align-items: center; gap: 3px; }
.jet-button { background: #1a2b44; color: var(--muted); text-align: center; }
.jet-button span:first-child { color: var(--gold); }
.jet-shell[data-jet=ready] .jet-button { background: var(--cyan); color: #0b352d; border-color: #cafef1; box-shadow: 0 0 12px #93fce354; }
.jet-shell[data-jet=ready] .jet-button span:first-child { color: #0b5346; }
.jet-shell:is([data-jet=flying], [data-jet=landing]) .jet-button { border-color: var(--cyan); color: var(--cyan); }
.desktop-guide { grid-column: 1 / -1; justify-self: center; margin-top: 10px; font-size: .75rem; color: var(--muted); }
.sector-flash { position: absolute; top: 14%; left: 50%; transform: translateX(-50%); max-width: 90%; color: var(--cyan); font-size: clamp(.75rem, 2vw, 1rem); text-align: center; letter-spacing: .055em; padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; background: #0b1731ed; font-weight: 850; pointer-events: none; }
.sr-only { clip-path: inset(50%); position: absolute; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 670px) {
  .jet-shell { gap: 10px; grid-template-rows: auto auto minmax(255px, 1fr) auto; }
  .top { padding-bottom: 9px; }
  .actions button, .back { padding: 7px 8px; font-size: .67rem; }
  .hud { grid-template-columns: 1fr auto auto; padding: 9px 10px; gap: 6px 14px; }
  .progress-wrap { grid-column: 1 / -1; }
  .pause { margin-left: auto; padding: 5px 8px; font-size: .7rem; }
  .menu { background: linear-gradient(90deg, #100f31ee 5%, #151836a6 70%, #151b3753); }
  .action, .jet-button { font-size: clamp(.72rem, 3.4vw, .9rem); }
  .desktop-guide { display: none; }
  .console { grid-template-columns: 1fr minmax(112px, 1.2fr) 1fr; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .jet-shell { grid-template-rows: auto auto minmax(181px, 1fr) auto; padding-block: 7px; gap: 7px; }
  .top { padding-bottom: 5px; }
  .top h1 { font-size: 1.42rem; }
  .hud { padding-block: 5px; }
  .action, .jet-button, .actions button { min-height: 35px; padding-block: 4px; }
  .desktop-guide { display: none; }
}

.game-languages { display:flex; align-items:center; gap:3px; }
.game-languages a {
  display:grid; place-items:center; min-width:33px; min-height:35px; color:var(--muted);
  font-size:.66rem; font-weight:820; border-radius:6px; border:1px solid transparent;
}
.game-languages a[aria-current] { color:var(--cyan); border-color:var(--line); background:#172749; }
html[data-gx-embed=true] .game-languages { display:none !important; }
@media (max-width: 500px) {
  .top { flex-wrap:wrap; }
  .top .actions { order:2; }
  .top .game-languages { order:3; width:100%; justify-content:flex-end; margin-top:-4px; }
  .game-languages a { min-height:32px; }
  html[data-gx-embed=true] .top .actions { order:0; }
}
