:root {
  color-scheme: dark;
  --ink: #eef3f5;
  --muted: #8a9aa4;
  --faint: #566771;
  --line: rgba(160, 185, 194, .18);
  --line-strong: rgba(180, 209, 216, .34);
  --panel: rgba(12, 20, 26, .88);
  --panel-solid: #0d171d;
  --deep: #080d11;
  --night: #0b151b;
  --cyan: #79e6d0;
  --cyan-strong: #a2fff0;
  --amber: #f3bd6a;
  --coral: #f17972;
  --lime: #b8dd79;
  --violet: #aaa4f7;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--deep);
  color: var(--ink);
}

body {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: .42;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--deep);
}

.screen {
  min-height: 100dvh;
}

.landing-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: clamp(22px, 4vw, 54px) clamp(22px, 6vw, 100px) 24px;
  background:
    radial-gradient(circle at 78% 18%, rgba(84, 145, 148, .16), transparent 27rem),
    radial-gradient(circle at 16% 88%, rgba(238, 156, 83, .08), transparent 30rem),
    linear-gradient(135deg, #091116 0%, #0a1216 48%, #0b0d11 100%);
}

.landing-screen::before,
.landing-screen::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.landing-screen::before {
  opacity: .4;
  background-image: linear-gradient(rgba(121, 230, 208, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(121, 230, 208, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.landing-screen::after {
  background: linear-gradient(90deg, transparent 0 49.9%, rgba(121, 230, 208, .07) 50%, transparent 50.1%), linear-gradient(0deg, transparent 0 49.9%, rgba(121, 230, 208, .05) 50%, transparent 50.1%);
  background-size: 100% 100%, 100% 100%;
  opacity: .18;
}

.landing-nav,
.landing-main,
.landing-footer {
  position: relative;
  z-index: 1;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, 100%);
  margin: 0 auto;
}

.brand,
.game-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 850;
}

.brand-wordmark span,
.game-brand-lockup span span {
  color: var(--cyan);
}

.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  width: 24px;
  height: 24px;
  padding: 3px;
  border: 1px solid var(--cyan);
  transform: skew(-12deg);
}

.brand-mark span {
  display: block;
  width: 3px;
  background: var(--cyan);
}

.brand-mark span:nth-child(1) {
  height: 8px;
}

.brand-mark span:nth-child(2) {
  height: 14px;
}

.brand-mark span:nth-child(3) {
  height: 18px;
}

.brand-mark.small {
  width: 18px;
  height: 18px;
  padding: 2px;
  gap: 2px;
}

.brand-mark.small span {
  width: 2px;
}

.brand-mark.small span:nth-child(1) {
  height: 6px;
}

.brand-mark.small span:nth-child(2) {
  height: 10px;
}

.brand-mark.small span:nth-child(3) {
  height: 13px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}

.connection-pill[data-state="online"] {
  color: var(--cyan);
}

.connection-pill[data-state="offline"] {
  color: var(--coral);
}

.status-dot,
.connection-pill .status-dot,
.dialog-footnote .status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px currentColor;
}

.connection-pill[data-state="online"] .status-dot,
.status-dot.live,
.lobby-signal i,
.pulse-label i,
.visual-live i {
  background: var(--cyan);
}

.connection-pill[data-state="offline"] .status-dot,
.pilot-status-dot.is-dead {
  background: var(--coral);
}

.icon-button,
.micro-button,
.dialog-close {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(11, 18, 23, .6);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.icon-button {
  width: 38px;
  height: 38px;
  color: var(--muted);
}

.icon-button:hover,
.micro-button:hover,
.dialog-close:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(121, 230, 208, .08);
}

.icon-button svg,
.micro-button svg,
.dialog-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.landing-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 530px);
  align-items: center;
  gap: clamp(40px, 8vw, 130px);
  width: min(1440px, 100%);
  margin: auto;
  padding: clamp(50px, 8vh, 110px) 0 clamp(44px, 8vh, 96px);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow,
.panel-kicker,
.visual-kicker,
.footer-label,
.hud-label,
.field-label,
.visual-live,
.landing-note,
.control-chip,
.lobby-signal,
.result-score span,
.result-stats span,
.champion-label,
.turn-status,
.bot-selector output {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 25px;
  color: var(--cyan);
}

.eyebrow-line {
  display: inline-block;
  width: 38px;
  height: 1px;
  background: var(--cyan);
}

.hero-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(64px, 10vw, 148px);
  font-weight: 900;
  letter-spacing: -.09em;
  line-height: .84;
}

.hero-title b {
  color: var(--cyan);
  font-weight: 400;
}

.hero-title span:last-child {
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 243, 245, .68);
}

.hero-tagline {
  margin: 31px 0 0;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 35px);
  font-weight: 320;
  letter-spacing: -.03em;
  line-height: 1.12;
}

.hero-tagline strong {
  color: var(--cyan);
  font-weight: 750;
}

.hero-description {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.identity-form {
  max-width: 600px;
  margin-top: 44px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.identity-row {
  display: flex;
  gap: 10px;
}

.input-shell,
.join-code-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line-strong);
  background: rgba(5, 12, 16, .7);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.input-shell:focus-within,
.join-code-shell:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(121, 230, 208, .1);
}

.input-shell {
  flex: 1;
  height: 58px;
}

.input-prefix,
.input-caret,
.code-caret {
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
}

.input-prefix {
  padding-left: 17px;
}

.input-caret,
.code-caret {
  width: 2px;
  height: 18px;
  margin: 0 15px 0 11px;
  background: var(--cyan);
  opacity: .7;
  animation: blink 1.1s steps(2, end) infinite;
}

.input-shell input,
.join-code-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: .08em;
}

.input-shell input {
  height: 100%;
  padding: 0;
  font-size: 15px;
}

.input-shell input::placeholder,
.join-code-shell input::placeholder {
  color: var(--faint);
}

.field-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .05em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--cyan);
  color: #071014;
  box-shadow: 0 10px 26px rgba(121, 230, 208, .16);
}

.button-primary:hover:not(:disabled) {
  background: var(--cyan-strong);
}

.button-secondary,
.button-ghost {
  border-color: var(--line-strong);
  background: rgba(15, 26, 32, .76);
  color: var(--ink);
}

.button-secondary:hover:not(:disabled),
.button-ghost:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(121, 230, 208, .08);
}

.button-solo {
  flex: 0 0 auto;
  min-width: 185px;
}

.button-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 25px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.text-button:hover {
  color: var(--cyan);
}

.text-button-arrow {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.landing-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 52px;
  color: var(--faint);
}

.note-mark {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 400;
}

.briefing-card {
  border: 1px solid var(--line);
  background: rgba(10, 20, 24, .72);
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
}

.visual-header,
.visual-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.visual-header strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .12em;
}

.visual-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cyan);
  font-size: 9px;
}

.visual-live i,
.pulse-label i,
.lobby-signal i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.briefing-diagram {
  position: relative;
  height: 355px;
  overflow: hidden;
  background: linear-gradient(180deg, #15242a 0%, #243439 51%, #a27b57 52%, #6b4d3a 100%);
}

.briefing-diagram::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 38%, rgba(121, 230, 208, .08) 38.2% 38.5%, transparent 38.7%), linear-gradient(0deg, rgba(0, 0, 0, .25), transparent 48%);
  content: "";
}

.diagram-sun {
  position: absolute;
  top: 54px;
  right: 74px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e5aa6c;
  box-shadow: 0 0 70px rgba(229, 170, 108, .35);
  opacity: .78;
}

.diagram-ridge {
  position: absolute;
  right: -5%;
  left: -5%;
  clip-path: polygon(0 72%, 8% 61%, 16% 70%, 24% 42%, 32% 55%, 42% 28%, 51% 45%, 61% 21%, 70% 48%, 80% 35%, 89% 57%, 100% 42%, 100% 100%, 0 100%);
}

.ridge-back {
  bottom: 35%;
  height: 38%;
  background: #354c4c;
  opacity: .9;
}

.ridge-front {
  bottom: 0;
  height: 43%;
  background: #694b3a;
  opacity: .95;
  clip-path: polygon(0 68%, 12% 54%, 25% 64%, 36% 36%, 49% 60%, 59% 44%, 71% 66%, 84% 39%, 100% 59%, 100% 100%, 0 100%);
}

.diagram-gun {
  position: absolute;
  z-index: 2;
  bottom: 41%;
  width: 58px;
  height: 26px;
  border: 2px solid var(--ink);
  border-radius: 55% 45% 35% 35%;
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(121, 230, 208, .38);
}

.diagram-gun::before,
.diagram-gun::after {
  position: absolute;
  bottom: -10px;
  width: 8px;
  height: 14px;
  border: 2px solid var(--ink);
  background: #1b2527;
  content: "";
}

.diagram-gun::before {
  left: 9px;
}

.diagram-gun::after {
  right: 9px;
}

.diagram-gun i {
  position: absolute;
  top: 5px;
  left: 20px;
  width: 17px;
  height: 17px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #0e171a;
}

.diagram-gun b {
  position: absolute;
  top: -25px;
  left: 39px;
  width: 5px;
  height: 32px;
  border: 2px solid var(--ink);
  background: var(--cyan);
  transform: rotate(-32deg);
  transform-origin: bottom;
}

.gun-left {
  left: 18%;
}

.gun-right {
  right: 17%;
  background: var(--coral);
  transform: scaleX(-1);
}

.gun-right b {
  transform: rotate(-32deg) scaleX(-1);
}

.diagram-shell {
  position: absolute;
  z-index: 3;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 13px var(--amber);
}

.shell-one {
  top: 36%;
  left: 47%;
}

.shell-two {
  top: 48%;
  left: 58%;
  width: 5px;
  height: 5px;
  opacity: .7;
}

.diagram-wind {
  position: absolute;
  top: 27px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .18em;
}

.diagram-wind i {
  display: block;
  width: 44px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 -4px 0 -3px var(--cyan), 0 4px 0 -3px var(--cyan);
}

.visual-footer {
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.visual-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.visual-coordinates {
  margin-left: auto;
  color: var(--faint);
  text-align: right;
}

.legend-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.legend-cyan {
  background: var(--cyan);
}

.legend-coral {
  background: var(--coral);
}

.visual-caption {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 26px 24px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
}

.visual-caption > span:first-child {
  color: var(--cyan);
}

.visual-caption p {
  margin: 0;
  line-height: 1.45;
}

.visual-caption strong {
  color: var(--ink);
}

.caption-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, 100%);
  margin: 0 auto;
  color: var(--faint);
  font-size: 10px;
}

.footer-controls,
.footer-version {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-label {
  margin-right: 3px;
  color: var(--cyan);
}

.control-chip {
  color: var(--faint);
  font-size: 9px;
}

kbd {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-right: 5px;
  padding: 0 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 750 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .05em;
}

.footer-version {
  gap: 8px;
}

.footer-version span:first-of-type {
  color: var(--cyan);
}

.footer-version i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
}

.game-screen {
  position: relative;
  background: var(--deep);
}

.game-frame {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: var(--night);
}

#game-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.game-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.game-ui button,
.game-ui input,
.game-ui a,
.game-ui .lobby-panel,
.game-ui .results-panel,
.game-ui .pause-panel,
.game-ui .help-panel,
.game-ui .connection-overlay {
  pointer-events: auto;
}

.game-topbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(16px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 12, 16, .92), rgba(5, 12, 16, .18));
}

.game-brand-lockup {
  color: var(--ink);
  font-size: 11px;
}

.room-readout,
.match-readout {
  display: flex;
  align-items: center;
  gap: 11px;
}

.room-readout {
  justify-content: center;
}

.match-readout {
  justify-content: flex-end;
}

.room-readout strong,
.match-readout strong {
  color: var(--ink);
  font: 800 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}

.micro-button {
  width: 25px;
  height: 25px;
  color: var(--muted);
}

.hud-left-column,
.hud-right-column {
  position: absolute;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(230px, 20vw);
}

.hud-left-column {
  left: clamp(14px, 2.4vw, 38px);
}

.hud-right-column {
  right: clamp(14px, 2.4vw, 38px);
  width: min(250px, 22vw);
}

.hud-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(11, 22, 27, .88), rgba(7, 14, 18, .76));
  box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
  backdrop-filter: blur(12px);
}

.pilot-readout {
  padding: 15px;
}

.pilot-heading,
.panel-heading,
.selector-heading,
.stat-line,
.condition-row,
.control-heading,
.aim-direction,
.pilot-state,
.lobby-header,
.lobby-actions,
.visual-header,
.visual-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pilot-heading {
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 17px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
}

.you-tag {
  margin-left: auto;
  color: var(--cyan);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .16em;
}

.stat-line {
  margin-top: 12px;
}

.stat-line strong,
.condition-row strong,
.control-heading strong {
  color: var(--ink);
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.meter {
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  background: rgba(121, 230, 208, .12);
}

.meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transition: width .25s ease;
}

.ammo-pips {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.ammo-pip {
  width: 13px;
  height: 5px;
  background: var(--amber);
  box-shadow: 0 0 7px rgba(243, 189, 106, .35);
}

.ammo-pip.is-empty {
  background: rgba(243, 189, 106, .16);
  box-shadow: none;
}

.score-readout {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 19px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.score-readout strong {
  color: var(--cyan);
  font: 800 24px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
}

.score-delta {
  color: var(--lime);
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
}

.pilot-state {
  margin-top: 12px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .11em;
}

.panel-heading {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.pulse-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .14em;
}

.leaderboard-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 5px 8px 9px;
  list-style: none;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 22px 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 5px;
  color: var(--muted);
  font-size: 10px;
}

.leaderboard-row.is-local {
  color: var(--ink);
  background: rgba(121, 230, 208, .07);
}

.leaderboard-rank,
.leaderboard-score,
.condition-row strong,
.map-size,
.feed-count {
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.leaderboard-swatch {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.leaderboard-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-bot {
  margin-left: 5px;
  color: var(--faint);
  font-size: 7px;
  letter-spacing: .08em;
}

.leaderboard-score {
  color: var(--ink);
}

.field-readout,
.kill-feed,
.minimap-panel {
  overflow: hidden;
}

.condition-row {
  gap: 7px;
  min-height: 35px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(160, 185, 194, .09);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.condition-row strong {
  color: var(--cyan);
  letter-spacing: .05em;
}

.condition-row:nth-last-child(1) {
  border-bottom: 0;
}

.wind-bar {
  flex: 1;
  height: 3px;
  margin-left: 3px;
  background: rgba(243, 189, 106, .15);
}

.wind-bar i {
  display: block;
  width: 0;
  height: 100%;
  margin-left: 50%;
  background: var(--amber);
  transition: width .2s ease, margin .2s ease;
}

#turn-status {
  color: var(--amber);
  font-size: 8px;
  letter-spacing: .08em;
}

.kill-feed-list {
  display: grid;
  gap: 7px;
  min-height: 76px;
  padding: 11px 14px;
}

.feed-empty {
  align-self: center;
  color: var(--faint);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.feed-item {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-item.is-important {
  color: var(--coral);
}

.minimap-wrap {
  position: relative;
  height: 106px;
  padding: 9px;
}

#minimap-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(121, 230, 208, .18);
}

.map-corner {
  position: absolute;
  color: var(--faint);
  font: 800 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.map-corner-a {
  top: 13px;
  left: 13px;
}

.map-corner-b {
  right: 13px;
  bottom: 13px;
}

.center-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
}

.countdown-card {
  min-width: 210px;
  padding: 18px 25px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 14, 18, .84);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(12px);
}

.countdown-kicker,
.countdown-detail {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .18em;
}

.countdown-card strong {
  display: block;
  margin: 6px 0;
  color: var(--cyan);
  font: 800 68px/.9 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.match-banner {
  padding: 11px 25px;
  border-left: 2px solid var(--cyan);
  background: rgba(6, 14, 18, .8);
  box-shadow: var(--shadow);
  text-align: left;
}

.match-banner span,
.match-banner strong {
  display: block;
}

.match-banner span {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .18em;
}

.match-banner strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: .04em;
}

.bottom-hud {
  position: absolute;
  right: clamp(14px, 2.4vw, 38px);
  bottom: 20px;
  left: clamp(14px, 2.4vw, 38px);
  display: grid;
  grid-template-columns: minmax(230px, 330px) 1fr auto;
  align-items: end;
  gap: 18px;
}

.shot-controls {
  padding: 13px 15px 12px;
  border: 1px solid var(--line);
  background: rgba(8, 17, 21, .84);
  backdrop-filter: blur(12px);
}

.control-heading {
  color: var(--muted);
}

.power-heading {
  margin-top: 11px;
}

#angle-slider,
#power-slider,
#bot-count {
  width: 100%;
  height: 16px;
  margin: 3px 0 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

#angle-slider::-webkit-slider-runnable-track,
#power-slider::-webkit-slider-runnable-track,
#bot-count::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg, var(--cyan) 0 50%, rgba(121, 230, 208, .16) 50% 100%);
}

#power-slider::-webkit-slider-runnable-track,
#bot-count::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--amber) 0 var(--fill, 60%), rgba(243, 189, 106, .16) var(--fill, 60%) 100%);
}

#angle-slider::-moz-range-track,
#power-slider::-moz-range-track,
#bot-count::-moz-range-track {
  height: 3px;
  background: rgba(121, 230, 208, .16);
}

#angle-slider::-moz-range-progress,
#power-slider::-moz-range-progress,
#bot-count::-moz-range-progress {
  height: 3px;
  background: var(--cyan);
}

#power-slider::-moz-range-progress,
#bot-count::-moz-range-progress {
  background: var(--amber);
}

#angle-slider::-webkit-slider-thumb,
#power-slider::-webkit-slider-thumb,
#bot-count::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  appearance: none;
  border: 2px solid var(--deep);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan), 0 0 10px rgba(121, 230, 208, .45);
}

#power-slider::-webkit-slider-thumb,
#bot-count::-webkit-slider-thumb {
  background: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), 0 0 10px rgba(243, 189, 106, .35);
}

#angle-slider::-moz-range-thumb,
#power-slider::-moz-range-thumb,
#bot-count::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 2px solid var(--deep);
  border-radius: 50%;
  background: var(--cyan);
}

.aim-direction {
  justify-content: flex-start;
  gap: 9px;
  margin-top: 5px;
}

.direction-button {
  padding: 2px 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .14em;
}

.desktop-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding-bottom: 8px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
}

.desktop-controls kbd {
  color: var(--cyan);
}

.mobile-controls,
.mobile-boost {
  display: none;
}

.modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, calc(100vw - 34px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(12, 23, 28, .97), rgba(6, 13, 17, .97));
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(18px);
}

.lobby-panel {
  width: min(850px, calc(100vw - 34px));
}

.panel-header {
  align-items: flex-start;
  gap: 20px;
}

.panel-kicker {
  color: var(--cyan);
}

.panel-header h1,
.results-panel h1,
.pause-panel h1,
.help-panel h1 {
  margin: 12px 0 7px;
  color: var(--ink);
  font-size: clamp(27px, 4vw, 43px);
  letter-spacing: -.05em;
  line-height: 1;
}

.panel-header h1 span,
.results-panel h1 span,
.pause-panel h1 span,
.help-panel h1 span {
  color: var(--cyan);
}

.panel-header p,
.results-panel p,
.pause-panel p,
.help-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.lobby-signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  white-space: nowrap;
}

.racer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  max-height: 265px;
  margin: 30px 0;
  overflow: auto;
  padding-right: 3px;
}

.racer-card {
  position: relative;
  min-height: 108px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(16, 29, 34, .6);
}

.racer-card.is-local {
  border-color: var(--cyan);
  background: rgba(121, 230, 208, .08);
}

.racer-card.is-bot {
  opacity: .78;
}

.racer-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.racer-avatar {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.racer-ready {
  color: var(--faint);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .12em;
}

.racer-name,
.racer-role,
.racer-score {
  display: block;
}

.racer-name {
  overflow: hidden;
  margin-top: 15px;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.racer-role {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .08em;
}

.racer-score {
  position: absolute;
  right: 12px;
  bottom: 11px;
  color: var(--cyan);
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.lobby-footer {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  align-items: end;
  gap: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.bot-selector {
  min-width: 0;
}

.selector-heading {
  color: var(--muted);
}

.bot-selector output {
  color: var(--amber);
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font: 800 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.lobby-actions {
  justify-content: flex-end;
  gap: 8px;
}

.launch-button {
  min-width: 170px;
}

.waiting-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 23px;
  color: var(--amber);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .13em;
}

.waiting-spinner {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(243, 189, 106, .25);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.results-panel {
  width: min(610px, calc(100vw - 34px));
  text-align: center;
}

.results-panel .panel-kicker {
  color: var(--amber);
}

.champion-lockup h1 {
  margin-top: 16px;
  font-size: clamp(36px, 7vw, 66px);
}

.result-score {
  display: grid;
  gap: 6px;
  margin: 27px 0 23px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(121, 230, 208, .05);
}

.result-score strong {
  color: var(--cyan);
  font: 800 42px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.result-rank {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 27px;
  background: var(--line);
}

.result-stats > div {
  display: grid;
  gap: 7px;
  padding: 13px 8px;
  background: rgba(10, 20, 24, .85);
}

.result-stats strong {
  color: var(--ink);
  font: 800 19px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.results-actions,
.pause-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.pause-panel,
.help-panel {
  width: min(500px, calc(100vw - 34px));
  text-align: center;
}

.pause-panel .panel-kicker,
.help-panel .panel-kicker {
  color: var(--cyan);
}

.pause-actions {
  flex-wrap: wrap;
  margin-top: 27px;
}

.help-panel {
  text-align: left;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 27px 0;
}

.help-grid > div {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(13, 26, 31, .6);
}

.help-grid span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.help-panel .button {
  width: 100%;
}

.join-dialog {
  width: min(430px, calc(100vw - 34px));
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.join-dialog::backdrop {
  background: rgba(3, 7, 9, .76);
  backdrop-filter: blur(6px);
}

.join-dialog form {
  position: relative;
  padding: 36px 32px 29px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 29px;
  height: 29px;
  color: var(--muted);
}

.join-dialog h2 {
  margin: 13px 0 8px;
  font-size: 30px;
  letter-spacing: -.05em;
}

.join-dialog h2 span {
  color: var(--cyan);
}

.join-dialog p {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.join-code-shell {
  height: 58px;
}

.join-code-shell input {
  height: 100%;
  padding: 0;
  font: 800 21px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .23em;
}

.form-error {
  min-height: 17px;
  margin: 7px 0 11px !important;
  color: var(--coral) !important;
  font-size: 9px !important;
  font-weight: 800;
  letter-spacing: .08em;
}

.dialog-submit {
  width: 100%;
}

.dialog-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 19px 0 0 !important;
  color: var(--faint) !important;
  font-size: 8px !important;
  font-weight: 800;
  letter-spacing: .12em;
}

.connection-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 9, 12, .72);
  backdrop-filter: blur(5px);
}

.reconnect-card {
  width: min(370px, calc(100vw - 34px));
  padding: 29px;
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
  text-align: center;
  box-shadow: var(--shadow);
}

.reconnect-orbit {
  position: relative;
  width: 42px;
  height: 42px;
  margin: 0 auto 19px;
  border: 1px solid rgba(121, 230, 208, .25);
  border-radius: 50%;
  animation: spin 2.2s linear infinite;
}

.reconnect-orbit::before {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(121, 230, 208, .2);
  border-radius: 50%;
  content: "";
}

.reconnect-orbit span,
.reconnect-orbit i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.reconnect-orbit span {
  top: -3px;
  left: 18px;
}

.reconnect-orbit i {
  right: 0;
  bottom: 4px;
}

.reconnect-card .panel-kicker {
  color: var(--coral);
}

.reconnect-card h2 {
  margin: 12px 0 8px;
  font-size: 28px;
  letter-spacing: -.05em;
}

.reconnect-card h2 span {
  color: var(--cyan);
}

.reconnect-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.reconnect-progress {
  height: 3px;
  margin: 22px 0;
  background: rgba(121, 230, 208, .12);
}

.reconnect-progress span {
  display: block;
  width: 30%;
  height: 100%;
  background: var(--cyan);
  transition: width .25s ease;
}

.loading-dots {
  color: var(--cyan);
}

.toast-region {
  position: fixed;
  z-index: 20;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 44px));
  pointer-events: none;
}

.toast {
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 20, 24, .95);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  animation: toast-in .25s ease both;
}

.toast.is-error {
  border-color: rgba(241, 121, 114, .55);
  color: #ffc0b8;
}

.toast.is-success {
  border-color: rgba(121, 230, 208, .55);
  color: var(--cyan-strong);
}

.toast.is-leaving {
  animation: toast-out .26s ease both;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.danger-button {
  color: #ffaaa2;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 1050px) {
  .landing-main {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 410px);
    gap: 45px;
  }

  .hero-title {
    font-size: clamp(60px, 9vw, 105px);
  }

  .hud-left-column,
  .hud-right-column {
    width: 195px;
  }

  .desktop-controls {
    gap: 8px;
  }

  .desktop-controls span:nth-child(n+3) {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .landing-screen {
    min-height: 100dvh;
    padding: 20px 18px 18px;
  }

  .landing-nav {
    align-items: flex-start;
  }

  .landing-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 48px;
    padding: 78px 0 55px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-title {
    font-size: clamp(61px, 20vw, 112px);
  }

  .hero-description {
    max-width: 550px;
  }

  .identity-row,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button-solo,
  .hero-actions .button,
  .text-button {
    width: 100%;
  }

  .hero-actions {
    gap: 17px;
  }

  .text-button {
    min-height: 38px;
  }

  .landing-note {
    margin-top: 35px;
  }

  .hero-visual {
    width: min(100%, 520px);
    align-self: center;
  }

  .briefing-diagram {
    height: 260px;
  }

  .visual-footer {
    flex-wrap: wrap;
  }

  .visual-coordinates {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .landing-footer {
    display: block;
    line-height: 1.7;
  }

  .footer-controls {
    flex-wrap: wrap;
  }

  .footer-version {
    margin-top: 13px;
  }

  .game-topbar {
    grid-template-columns: 1fr auto;
    min-height: 59px;
    padding: 0 13px;
  }

  .game-brand-lockup {
    font-size: 9px;
  }

  .room-readout {
    position: absolute;
    top: 59px;
    left: 13px;
  }

  .match-readout {
    grid-column: 2;
  }

  .hud-left-column,
  .hud-right-column {
    top: 83px;
    width: calc(50% - 20px);
  }

  .hud-left-column {
    left: 13px;
  }

  .hud-right-column {
    right: 13px;
    width: calc(50% - 20px);
  }

  .pilot-readout {
    padding: 11px;
  }

  .pilot-heading {
    margin-bottom: 11px;
    font-size: 10px;
  }

  .score-readout {
    margin-top: 12px;
  }

  .score-readout strong {
    font-size: 18px;
  }

  .leaderboard-panel,
  .field-readout,
  .minimap-panel {
    display: none;
  }

  .kill-feed {
    min-height: 0;
  }

  .kill-feed-list {
    min-height: 49px;
    padding: 9px 11px;
  }

  .kill-feed-list .feed-item:nth-child(n+3) {
    display: none;
  }

  .bottom-hud {
    right: 12px;
    bottom: 12px;
    left: 12px;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .shot-controls {
    grid-column: 1 / -1;
    padding: 10px 12px 9px;
  }

  .desktop-controls {
    display: none;
  }

  .mobile-controls {
    display: flex;
    gap: 7px;
  }

  .touch-button {
    display: grid;
    place-items: center;
    gap: 1px;
    min-width: 65px;
    height: 58px;
    border: 1px solid var(--line-strong);
    background: rgba(8, 17, 21, .86);
    cursor: pointer;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .1em;
  }

  .touch-button span:first-child {
    color: var(--cyan);
    font-size: 18px;
    line-height: 1;
  }

  .pass-button span:first-child {
    color: var(--amber);
  }

  .fire-button {
    border-color: var(--cyan);
    color: var(--ink);
  }

  .touch-button.is-held {
    background: rgba(121, 230, 208, .17);
    transform: translateY(2px);
  }

  .mobile-boost {
    position: absolute;
    right: 0;
    bottom: 70px;
    display: block;
    padding: 6px 9px;
    border: 1px solid var(--line);
    background: rgba(8, 17, 21, .8);
    color: var(--muted);
    cursor: pointer;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .1em;
  }

  .modal-panel {
    max-height: calc(100dvh - 24px);
    padding: 23px 18px;
  }

  .lobby-footer {
    grid-template-columns: 1fr;
    gap: 19px;
  }

  .lobby-actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
  }

  .lobby-actions .button {
    width: 100%;
    padding: 0 10px;
  }

  .racer-grid {
    max-height: 235px;
    margin: 22px 0;
  }

  .results-actions,
  .pause-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .results-actions .button,
  .pause-actions .button {
    width: 100%;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .center-stage {
    top: 45%;
  }
}

@media (max-width: 430px) {
  .hero-title {
    font-size: 58px;
  }

  .hero-tagline {
    font-size: 24px;
  }

  .hero-description {
    font-size: 13px;
  }

  .hud-left-column,
  .hud-right-column {
    width: calc(50% - 16px);
  }

  .hud-left-column {
    left: 9px;
  }

  .hud-right-column {
    right: 9px;
  }

  .pilot-readout {
    padding: 9px;
  }

  .you-tag {
    display: none;
  }

  .ammo-pip {
    width: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
