:root {
  --bg-night: #070707;
  --bg-night-deep: #000000;
  --surface: rgba(14, 14, 14, 0.86);
  --surface-strong: #1b1b1b;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text-main: #f7f7f7;
  --text-muted: #c9c9c9;
  --accent: #f8f8f8;
  --accent-deep: #a8a8a8;
  --cool: #ffffff;
  --success: #8ef0a8;
  --danger: #ff8d8d;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-main);
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 24%),
    linear-gradient(145deg, var(--bg-night) 0%, var(--bg-night-deep) 58%, #000000 100%);
}

@keyframes turnPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(117, 216, 255, 0.18);
  }

  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 0.45rem rgba(117, 216, 255, 0.08);
  }
}

@keyframes activityPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 180, 84, 0.16);
  }

  50% {
    box-shadow: 0 0 0 0.42rem rgba(255, 180, 84, 0.06);
  }
}

@keyframes coinSpin {
  0% {
    transform: rotateX(12deg) rotateY(0deg);
  }

  100% {
    transform: rotateX(12deg) rotateY(1080deg);
  }
}

h1,
h2,
h3,
.site-brand strong,
.status-chip {
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-backdrop {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.045), transparent 35%),
    linear-gradient(300deg, rgba(255, 255, 255, 0.035), transparent 32%);
  pointer-events: none;
}

.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 1.5rem 0 0.75rem;
}

.site-header-inner,
.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  flex: 0 0 auto;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.36));
  transition: transform 0.24s ease, filter 0.24s ease;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-brand:hover .brand-mark,
.site-brand:focus-visible .brand-mark {
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.42));
}

.brand-copy {
  display: grid;
  gap: 0.1rem;
}

.brand-copy strong {
  font-size: 1.25rem;
}

.brand-copy small {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.site-main {
  padding: 1rem 0 3rem;
}

.page-shell {
  padding-bottom: 1rem;
}

.page-shell-home {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding-inline: clamp(1rem, 2.5vw, 2.5rem);
}

.page-shell-fluid {
  width: 100%;
  max-width: none;
}

.site-main-immersive {
  min-height: 100vh;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.landing-hero,
.game-page-hero,
.game-card,
.instruction-panel,
.game-board-panel,
.game-room-panel,
.help-card {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.landing-hero,
.game-page-hero {
  padding: 2rem;
}

.landing-notice-panel {
  margin-top: 1rem;
}

.game-page-hero-compact {
  padding: 1rem 1.25rem;
  align-items: center;
}

.game-page-hero-compact h1 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
}

.game-page-hero-compact .eyebrow {
  margin-bottom: 0.35rem;
  font-size: 0.76rem;
}

.game-page-hero-compact .room-badge {
  min-width: 12rem;
  padding: 0.75rem 0.9rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-hero h1,
.game-page-hero h1,
.help-layout h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  line-height: 1.02;
}

.lead-copy,
.game-page-hero p,
.help-layout > p {
  max-width: 62rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.primary-action {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #050505;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(255, 255, 255, 0.1);
}

.secondary-action {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.primary-action:hover,
.primary-action:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible {
  transform: translateY(-1px);
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.secondary-action.slim {
  min-height: 2.85rem;
  padding-inline: 1rem;
}

.card-grid,
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card-grid-shell {
  position: relative;
  margin-top: 1.5rem;
}

.card-grid-shell .card-grid {
  margin-top: 0;
}

.home-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(14.75rem, 1fr));
  gap: clamp(1rem, 1.4vw, 1.35rem);
}

.card-grid-shell.is-locked {
  isolation: isolate;
}

.card-grid-shell.is-locked .card-grid {
  pointer-events: none;
  filter: blur(1.5px) saturate(0.82);
}

.card-grid-shell.is-locked .game-card {
  opacity: 0.78;
}

.card-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  border-radius: 1.75rem;
  background: linear-gradient(180deg, rgba(5, 10, 22, 0.3), rgba(5, 10, 22, 0.62));
  backdrop-filter: blur(10px);
}

.game-card,
.help-card {
  padding: 1.5rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  gap: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    var(--surface);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  pointer-events: none;
}

.game-card:hover,
.game-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.42);
}

.game-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: -1.5rem -1.5rem 1.2rem;
  overflow: hidden;
  border-radius: 1.5rem 1.5rem 1rem 1rem;
  background: #06080d;
}

.game-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 7, 0.08) 0%, rgba(7, 7, 7, 0.18) 48%, rgba(7, 7, 7, 0.84) 100%),
    linear-gradient(90deg, rgba(9, 15, 25, 0.2) 0%, transparent 35%, transparent 65%, rgba(28, 12, 8, 0.22) 100%);
}

.game-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.35s ease;
}

.game-card:hover .game-card-media img,
.game-card:focus-within .game-card-media img {
  transform: scale(1.05);
}

.game-card h2,
.help-card h2 {
  margin: 0.6rem 0 0.75rem;
  font-size: 1.6rem;
}

.game-card-title {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  text-decoration-color: rgba(255, 255, 255, 0.7);
}

.game-card p,
.help-card p,
.instruction-copy p,
.status-copy,
.room-note {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.game-room-panel button {
  margin-top: 1.2rem;
}

.game-card-link-form {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
}

.game-card-link {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

.game-card-link:focus-visible {
  outline: none;
}

.age-gate-panel {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.5rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.age-gate-panel-overlay {
  width: min(100%, 42rem);
  margin-top: clamp(0.25rem, 2vw, 1.5rem);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 28px 60px rgba(5, 10, 22, 0.45);
}

.entry-gate-shell {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.entry-gate-panel {
  width: min(100%, 42rem);
  margin-top: 0;
}

.entry-gate-form {
  display: grid;
  gap: 1rem;
}

.age-gate-panel h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.age-gate-copy,
.game-card-lockout {
  color: var(--text-muted);
  line-height: 1.65;
}

.age-gate-emphasis {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
}

.game-card-lockout {
  margin-top: auto;
  padding-top: 1.2rem;
}

.age-gate-alert {
  margin: 0;
  color: #ffd58a;
  font-weight: 700;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.instruction-panel {
  margin-top: 1.5rem;
  padding: 1.15rem 1.35rem;
}

.compact-help-panel {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
}

.compact-help-panel summary {
  font-size: 0.96rem;
}

.instruction-panel summary {
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 700;
  list-style: none;
}

.instruction-panel summary::-webkit-details-marker {
  display: none;
}

.instruction-panel summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-size: 1.2rem;
  transform: translateY(-0.05rem);
}

.instruction-panel[open] summary::after {
  content: "−";
}

.instruction-copy {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.help-layout {
  display: grid;
  gap: 1.5rem;
}

.game-page-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.game-page-hero.has-artwork {
  align-items: stretch;
  overflow: hidden;
}

.game-page-hero.has-artwork .game-page-hero-copy {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  align-content: end;
}

.game-page-hero-artwork {
  position: relative;
  flex: 0 0 clamp(14rem, 28vw, 21rem);
  width: min(100%, clamp(14rem, 28vw, 21rem));
  min-height: 12rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 42%),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 32px rgba(0, 0, 0, 0.22);
}

.game-page-hero-artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0) 28%),
    linear-gradient(180deg, rgba(10, 12, 18, 0) 40%, rgba(10, 12, 18, 0.34));
  pointer-events: none;
}

.game-page-hero-artwork img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.room-badge {
  min-width: 16rem;
  padding: 1rem 1.15rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.room-badge span {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.room-badge strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.05rem;
  word-break: break-word;
}

.game-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.game-shell-grid-board-only {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
}

#tic-tac-toe-root,
#connect-four-root,
#tic-tac-toe-3d-root,
#connect-4-3d-root {
  position: relative;
  display: grid;
  gap: 1rem;
}

.game-board-panel,
.game-room-panel {
  padding: 1.5rem;
}

.compact-match-panel {
  padding: 1rem;
}

.status-stack {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.status-chip.is-connected {
  background: rgba(142, 240, 168, 0.16);
  color: var(--success);
}

.status-chip.is-connecting,
.status-chip.is-reconnecting {
  background: rgba(255, 180, 84, 0.16);
  color: var(--accent);
}

.status-chip.is-error {
  background: rgba(255, 141, 141, 0.16);
  color: var(--danger);
}

.status-headline {
  margin: 0;
  font-size: 2rem;
}

.status-copy {
  min-height: 3.1rem;
}

.status-copy:empty,
.inline-error:empty {
  display: none;
}

.turn-callout {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  min-height: 2.65rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.match-toolbar {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.match-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.8rem;
}

.match-toolbar .status-chip {
  min-height: 1.8rem;
  padding: 0.2rem 0.75rem;
  font-size: 0.82rem;
}

.match-toolbar .status-headline {
  font-size: 1.2rem;
  line-height: 1.15;
}

.match-toolbar .status-copy {
  min-height: 0;
  margin: 0;
  font-size: 0.92rem;
}

.match-toolbar .turn-callout {
  min-height: 2.2rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.match-toolbar .turn-callout::before {
  width: 0.58rem;
  height: 0.58rem;
}

.turn-callout::before {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 1rem currentColor;
}

.board-scene {
  position: relative;
  display: grid;
  gap: 0.9rem;
}

.invite-strip {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.compact-share-link {
  gap: 0.55rem;
}

.compact-share-link input {
  padding: 0.72rem 0.85rem;
  border-radius: 0.9rem;
  font-size: 0.92rem;
}

.match-meta-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 0.85rem;
}

.compact-player-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.compact-player-list .player-card {
  padding: 0.7rem 0.8rem;
  border-radius: 0.95rem;
}

.compact-player-list .player-card strong {
  font-size: 0.95rem;
}

.compact-player-list .player-card > div span,
.compact-player-list .player-state {
  font-size: 0.8rem;
}

.compact-rematch {
  justify-self: end;
}

#tic-tac-toe-tournament-root,
#connect-4-3d-tournament-root {
  display: grid;
  gap: 1rem;
}

.tournament-board-panel,
.tournament-match-board,
.tournament-spotlight-card,
.tournament-match-card,
.dots-side-card {
  display: grid;
  gap: 0.75rem;
}

.tournament-spotlight-card,
.tournament-match-board,
.tournament-match-card {
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.tournament-spotlight-card strong {
  font-size: 1.08rem;
}

.tournament-spotlight-card span {
  color: var(--text-muted);
  line-height: 1.6;
}

.tournament-spotlight-card .primary-action {
  justify-self: start;
}

.tournament-match-list,
.dots-player-list {
  display: grid;
  gap: 0.65rem;
}

.tournament-match-card.is-active {
  border-color: rgba(117, 216, 255, 0.34);
  box-shadow: 0 0 0 0.08rem rgba(117, 216, 255, 0.08);
}

.tournament-match-card.is-complete {
  border-color: rgba(142, 240, 168, 0.24);
}

.tournament-match-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.tournament-match-actions {
  display: flex;
  justify-content: flex-start;
}

.tournament-empty-state {
  padding: 0.95rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 1rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.dots-seat-editor {
  display: grid;
  gap: 0.75rem;
}

.dots-field {
  display: grid;
  gap: 0.35rem;
}

.dots-field input {
  min-width: 0;
  padding: 0.82rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tic-tac-toe-setup-form {
  display: grid;
  gap: 1.1rem;
}

.setup-fieldset {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.setup-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 700;
}

.setup-option-grid {
  display: grid;
  gap: 0.75rem;
}

.setup-option-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.setup-option-card input {
  margin: 0;
}

.setup-option-card strong {
  font-size: 1rem;
}

.setup-option-card span,
.setup-footnote {
  color: var(--text-muted);
  line-height: 1.6;
}

.setup-select-field select {
  min-width: 0;
  padding: 0.82rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tournament-participant-card {
  align-items: flex-start;
}

#tic-tac-toe-tournament-root[data-phase="countdown"] .turn-callout,
#connect-four-tournament-root[data-phase="countdown"] .turn-callout,
#connect-4-3d-tournament-root[data-phase="countdown"] .turn-callout {
  color: #ffd58a;
}

#tic-tac-toe-tournament-root[data-phase="active"] .tournament-board-panel,
#connect-four-tournament-root[data-phase="active"] .tournament-board-panel,
#connect-4-3d-tournament-root[data-phase="active"] .tournament-board-panel {
  border-color: rgba(117, 216, 255, 0.26);
  box-shadow: 0 0 0 0.08rem rgba(117, 216, 255, 0.08), var(--shadow);
}

.scene-toolbar .secondary-action.slim {
  min-height: 2.45rem;
  padding: 0.55rem 0.9rem;
}

.board-viewport {
  position: relative;
  min-height: 34rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 50% 18%, rgba(117, 216, 255, 0.22), transparent 34%),
    radial-gradient(circle at 50% 86%, rgba(255, 180, 84, 0.14), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(132, 187, 255, 0.09), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(145deg, rgba(37, 48, 74, 0.96), rgba(13, 18, 33, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 42px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.board-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.board-scene-hint {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  background: rgba(7, 10, 18, 0.74);
  color: rgba(248, 241, 229, 0.92);
  font-size: 0.94rem;
  line-height: 1.5;
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.two-player-coin-flip {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.two-player-coin-flip[hidden] {
  display: none;
}

.two-player-coin-flip-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(117, 216, 255, 0.12), transparent 28%),
    rgba(4, 8, 16, 0.78);
  backdrop-filter: blur(16px);
}

.two-player-coin-flip-card {
  position: relative;
  width: min(100%, 31rem);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.6rem;
  background:
    linear-gradient(145deg, rgba(30, 39, 62, 0.98), rgba(10, 15, 28, 0.98));
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.two-player-coin-flip-stage,
.two-player-coin-flip-copy,
.two-player-coin-flip-meta {
  margin: 0;
}

.two-player-coin-flip-stage {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.two-player-coin-flip-coin {
  display: grid;
  place-items: center;
  margin: 1.3rem auto 1.1rem;
  width: 9.5rem;
  height: 9.5rem;
  perspective: 1000px;
}

.two-player-coin-flip-coin-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 80ms linear;
}

.two-player-coin-flip-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #081520;
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  font-size: 3.4rem;
  font-weight: 700;
  backface-visibility: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 18px 42px rgba(0, 0, 0, 0.28);
}

.two-player-coin-flip-face.is-front {
  background: linear-gradient(135deg, #8ff0ff, #4e8fc7);
}

.two-player-coin-flip-face.is-back {
  background: linear-gradient(135deg, #ffd093, #ff8d54);
  transform: rotateY(180deg);
}

.two-player-coin-flip.is-revealed .two-player-coin-flip-coin-inner {
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.two-player-coin-flip-headline {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.two-player-coin-flip-copy {
  margin-top: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.two-player-coin-flip-meta {
  margin-top: 1rem;
  color: rgba(248, 241, 229, 0.92);
  font-size: 1rem;
  font-weight: 700;
}

.scene-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.game-room-panel {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.room-metric {
  padding: 1rem 1.1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.room-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.room-metric strong {
  display: block;
  margin-top: 0.45rem;
  word-break: break-word;
}

.field-label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.share-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
}

.share-link input {
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.share-feedback,
.inline-error {
  min-height: 1.5rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.inline-error {
  color: var(--danger);
}

.home-inline-notice {
  margin: 0;
}

.player-list {
  display: grid;
  gap: 0.8rem;
}

.player-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.player-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  transition: width 0.18s ease;
}

.player-card.is-you {
  border-color: rgba(117, 216, 255, 0.42);
  box-shadow: 0 0 0 0.1rem rgba(117, 216, 255, 0.08);
}

.player-card.is-turn-owner {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.player-card strong {
  display: block;
  font-size: 1.05rem;
}

.player-card-copy {
  min-width: 0;
}

.player-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.player-card span {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.player-card[data-player-symbol="x"] {
  border-color: rgba(117, 216, 255, 0.3);
  background:
    linear-gradient(135deg, rgba(117, 216, 255, 0.12), rgba(255, 255, 255, 0.03) 56%),
    rgba(255, 255, 255, 0.04);
}

.player-card[data-player-symbol="o"] {
  border-color: rgba(255, 180, 84, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 180, 84, 0.12), rgba(255, 255, 255, 0.03) 56%),
    rgba(255, 255, 255, 0.04);
}

.player-card[data-player-symbol="red"] {
  border-color: rgba(255, 120, 133, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 120, 133, 0.13), rgba(255, 255, 255, 0.03) 56%),
    rgba(255, 255, 255, 0.04);
}

.player-card[data-player-symbol="black"] {
  border-color: rgba(161, 178, 199, 0.3);
  background:
    linear-gradient(135deg, rgba(161, 178, 199, 0.14), rgba(255, 255, 255, 0.03) 56%),
    rgba(255, 255, 255, 0.04);
}

.player-card[data-player-symbol]::before {
  width: 0.28rem;
}

.player-card[data-player-symbol="x"]::before {
  background: linear-gradient(180deg, #9beeff, #3da9d6);
  box-shadow: 0 0 1.1rem rgba(117, 216, 255, 0.5);
}

.player-card[data-player-symbol="o"]::before {
  background: linear-gradient(180deg, #ffd298, #ff9a54);
  box-shadow: 0 0 1.1rem rgba(255, 180, 84, 0.5);
}

.player-card[data-player-symbol="red"]::before {
  background: linear-gradient(180deg, #ffb0b8, #ff6d7d);
  box-shadow: 0 0 1.1rem rgba(255, 120, 133, 0.48);
}

.player-card[data-player-symbol="black"]::before {
  background: linear-gradient(180deg, #d2deec, #8496ae);
  box-shadow: 0 0 1.1rem rgba(161, 178, 199, 0.38);
}

.player-symbol-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-symbol-badge.is-x {
  color: #04111a;
  background: linear-gradient(135deg, #9cf1ff, #54b3df);
  box-shadow: 0 0 1rem rgba(117, 216, 255, 0.38);
}

.player-symbol-badge.is-o {
  color: #2f1302;
  background: linear-gradient(135deg, #ffd39a, #ff9b55);
  box-shadow: 0 0 1rem rgba(255, 180, 84, 0.34);
}

.player-symbol-badge.is-red {
  color: #2c060b;
  background: linear-gradient(135deg, #ffc1c8, #ff6c7d);
  box-shadow: 0 0 1rem rgba(255, 120, 133, 0.34);
}

.player-symbol-badge.is-black {
  color: #101722;
  background: linear-gradient(135deg, #dbe5f0, #8ea0b7);
  box-shadow: 0 0 1rem rgba(161, 178, 199, 0.28);
}

.player-card .player-state.connected {
  color: var(--success);
}

.player-card .player-state.open {
  color: var(--accent);
}

.player-card .player-state.ready {
  color: var(--cool);
}

.player-card .player-state.waiting {
  color: var(--text-muted);
}

.player-card .player-state.active {
  color: #eef9ff;
  font-weight: 700;
}

.player-card .player-state.working {
  color: #ffe0b8;
  font-weight: 700;
}

.player-card .player-state.won {
  color: var(--success);
  font-weight: 700;
}

.player-card .player-state.draw {
  color: var(--accent);
  font-weight: 700;
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="your-turn"] .game-board-panel {
  border-color: rgba(117, 216, 255, 0.34);
  box-shadow: 0 0 0 0.1rem rgba(117, 216, 255, 0.08), var(--shadow);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="your-turn"] .board-viewport {
  border-color: rgba(117, 216, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.14rem rgba(117, 216, 255, 0.12),
    0 20px 42px rgba(0, 0, 0, 0.3);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="your-turn"] .status-headline {
  color: #f2fbff;
  text-shadow: 0 0 1.4rem rgba(117, 216, 255, 0.18);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="your-turn"] .turn-callout {
  color: #081520;
  border-color: rgba(117, 216, 255, 0.48);
  background: linear-gradient(135deg, rgba(117, 216, 255, 0.96), rgba(174, 239, 255, 0.9));
  animation: turnPulse 1.8s ease-in-out infinite;
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="your-turn"] .player-card.is-turn-owner {
  border-color: rgba(117, 216, 255, 0.5);
  background: rgba(117, 216, 255, 0.12);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="opponent-turn"] .game-room-panel {
  border-color: rgba(255, 180, 84, 0.34);
  box-shadow: 0 0 0 0.1rem rgba(255, 180, 84, 0.06), var(--shadow);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="opponent-turn"] .compact-match-panel,
:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="sending"] .compact-match-panel,
:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="coin-flip"] .compact-match-panel {
  border-color: rgba(255, 180, 84, 0.24);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="opponent-turn"] .turn-callout,
:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="sending"] .turn-callout {
  color: #fff4e6;
  border-color: rgba(255, 180, 84, 0.34);
  background: linear-gradient(135deg, rgba(120, 61, 26, 0.92), rgba(255, 126, 72, 0.34));
  animation: activityPulse 1.6s ease-in-out infinite;
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="opponent-turn"] .player-card.is-turn-owner,
:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="sending"] .player-card.is-turn-owner {
  border-color: rgba(255, 180, 84, 0.42);
  background: rgba(255, 180, 84, 0.12);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="waiting"] .turn-callout {
  color: #eef8ff;
  border-color: rgba(117, 216, 255, 0.22);
  background: rgba(42, 75, 111, 0.62);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="coin-flip"] .game-board-panel,
:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="coin-flip"] .game-room-panel {
  border-color: rgba(255, 180, 84, 0.24);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="coin-flip"] .turn-callout {
  color: #fff6ea;
  border-color: rgba(255, 180, 84, 0.32);
  background: linear-gradient(135deg, rgba(120, 61, 26, 0.88), rgba(51, 81, 110, 0.78));
  animation: activityPulse 1.8s ease-in-out infinite;
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="finished"] .turn-callout {
  color: #fff4df;
  border-color: rgba(255, 180, 84, 0.28);
  background: rgba(120, 73, 26, 0.52);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="offline"] .turn-callout,
:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-turn-state="unavailable"] .turn-callout {
  color: #ffe6e6;
  border-color: rgba(255, 141, 141, 0.3);
  background: rgba(104, 31, 31, 0.52);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-player-symbol="x"] {
  --tic-tac-player-outline: rgba(117, 216, 255, 0.95);
  --tic-tac-player-outline-soft: rgba(117, 216, 255, 0.32);
  --tic-tac-player-outline-glow: rgba(117, 216, 255, 0.44);
  --connect-four-preview-fill: linear-gradient(180deg, rgba(195, 252, 255, 0.82) 0%, rgba(102, 222, 255, 0.6) 44%, rgba(27, 100, 217, 0.52) 100%);
  --connect-four-preview-sheen: rgba(255, 255, 255, 0.36);
  --connect-four-preview-outline: rgba(161, 244, 255, 0.42);
  --connect-four-preview-glow: rgba(102, 222, 255, 0.24);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-player-symbol="o"] {
  --tic-tac-player-outline: rgba(255, 180, 84, 0.95);
  --tic-tac-player-outline-soft: rgba(255, 180, 84, 0.3);
  --tic-tac-player-outline-glow: rgba(255, 180, 84, 0.42);
  --connect-four-preview-fill: linear-gradient(180deg, rgba(255, 228, 179, 0.8) 0%, rgba(255, 183, 103, 0.58) 44%, rgba(255, 111, 51, 0.5) 100%);
  --connect-four-preview-sheen: rgba(255, 255, 255, 0.3);
  --connect-four-preview-outline: rgba(255, 220, 174, 0.4);
  --connect-four-preview-glow: rgba(255, 184, 108, 0.22);
}

#connect-four-root {
  --connect-four-preview-fill: linear-gradient(180deg, rgba(165, 246, 255, 0.3), rgba(36, 92, 178, 0.24));
  --connect-four-preview-sheen: rgba(235, 252, 255, 0.32);
  --connect-four-preview-outline: rgba(176, 248, 255, 0.46);
  --connect-four-preview-glow: rgba(126, 243, 255, 0.24);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-player-symbol] .game-board-panel {
  border-color: var(--tic-tac-player-outline);
  box-shadow:
    0 0 0 0.18rem var(--tic-tac-player-outline-soft),
    0 0 3rem var(--tic-tac-player-outline-glow),
    var(--shadow);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-player-symbol] .compact-match-panel {
  border-color: var(--tic-tac-player-outline);
  box-shadow:
    0 0 0 0.18rem var(--tic-tac-player-outline-soft),
    0 0 3rem var(--tic-tac-player-outline-glow),
    var(--shadow);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-player-symbol] .board-viewport {
  border-color: var(--tic-tac-player-outline);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.2rem var(--tic-tac-player-outline-soft),
    0 0 2.8rem var(--tic-tac-player-outline-glow),
    0 20px 42px rgba(0, 0, 0, 0.3);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-player-symbol] .player-card.is-you {
  border-color: var(--tic-tac-player-outline);
  box-shadow:
    0 0 0 0.14rem var(--tic-tac-player-outline-soft),
    0 0 1.6rem var(--tic-tac-player-outline-glow);
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root)[data-player-symbol] .turn-callout {
  box-shadow: 0 0 1.4rem var(--tic-tac-player-outline-glow);
}

#twixt-root {
  --twixt-player-outline: rgba(255, 120, 133, 0.95);
  --twixt-player-outline-soft: rgba(255, 120, 133, 0.32);
  --twixt-player-outline-glow: rgba(255, 120, 133, 0.38);
}

#twixt-root[data-player-symbol="black"] {
  --twixt-player-outline: rgba(182, 197, 216, 0.94);
  --twixt-player-outline-soft: rgba(182, 197, 216, 0.28);
  --twixt-player-outline-glow: rgba(182, 197, 216, 0.34);
}

#twixt-root[data-turn-state="your-turn"] .game-board-panel {
  border-color: var(--twixt-player-outline);
  box-shadow: 0 0 0 0.1rem var(--twixt-player-outline-soft), var(--shadow);
}

#twixt-root[data-turn-state="your-turn"] .board-viewport {
  border-color: var(--twixt-player-outline);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.14rem var(--twixt-player-outline-soft),
    0 0 2.6rem var(--twixt-player-outline-glow),
    0 20px 42px rgba(0, 0, 0, 0.3);
}

#twixt-root[data-turn-state="your-turn"] .status-headline {
  color: #fff6f7;
  text-shadow: 0 0 1.4rem var(--twixt-player-outline-glow);
}

#twixt-root[data-turn-state="your-turn"] .turn-callout {
  border-color: var(--twixt-player-outline);
  box-shadow: 0 0 1.4rem var(--twixt-player-outline-glow);
  animation: turnPulse 1.8s ease-in-out infinite;
}

#twixt-root[data-turn-state="your-turn"][data-player-symbol="red"] .turn-callout {
  color: #1b0d11;
  background: linear-gradient(135deg, rgba(255, 208, 214, 0.95), rgba(255, 120, 133, 0.94));
}

#twixt-root[data-turn-state="your-turn"][data-player-symbol="black"] .turn-callout {
  color: #121a24;
  background: linear-gradient(135deg, rgba(227, 235, 244, 0.95), rgba(164, 180, 199, 0.94));
}

#twixt-root[data-turn-state="your-turn"] .player-card.is-turn-owner {
  border-color: var(--twixt-player-outline);
  background: color-mix(in srgb, var(--twixt-player-outline-soft) 62%, rgba(255, 255, 255, 0.04));
}

#twixt-root[data-turn-state="opponent-turn"] .compact-match-panel,
#twixt-root[data-turn-state="sending"] .compact-match-panel,
#twixt-root[data-turn-state="coin-flip"] .compact-match-panel {
  border-color: rgba(239, 195, 132, 0.26);
}

#twixt-root[data-turn-state="opponent-turn"] .turn-callout,
#twixt-root[data-turn-state="sending"] .turn-callout {
  color: #fff4e6;
  border-color: rgba(239, 195, 132, 0.34);
  background: linear-gradient(135deg, rgba(120, 61, 26, 0.92), rgba(255, 126, 72, 0.34));
  animation: activityPulse 1.6s ease-in-out infinite;
}

#twixt-root[data-turn-state="opponent-turn"] .player-card.is-turn-owner,
#twixt-root[data-turn-state="sending"] .player-card.is-turn-owner {
  border-color: rgba(239, 195, 132, 0.4);
  background: rgba(239, 195, 132, 0.11);
}

#twixt-root[data-turn-state="waiting"] .turn-callout {
  color: #f6efe5;
  border-color: rgba(190, 167, 130, 0.24);
  background: rgba(64, 46, 32, 0.58);
}

#twixt-root[data-turn-state="coin-flip"] .game-board-panel,
#twixt-root[data-turn-state="coin-flip"] .game-room-panel {
  border-color: rgba(239, 195, 132, 0.24);
}

#twixt-root[data-turn-state="coin-flip"] .turn-callout {
  color: #fff6ea;
  border-color: rgba(239, 195, 132, 0.32);
  background: linear-gradient(135deg, rgba(120, 61, 26, 0.88), rgba(89, 71, 57, 0.78));
  animation: activityPulse 1.8s ease-in-out infinite;
}

#twixt-root[data-turn-state="finished"] .turn-callout {
  color: #fff4df;
  border-color: rgba(239, 195, 132, 0.28);
  background: rgba(120, 73, 26, 0.52);
}

#twixt-root[data-turn-state="offline"] .turn-callout,
#twixt-root[data-turn-state="unavailable"] .turn-callout {
  color: #ffe6e6;
  border-color: rgba(255, 141, 141, 0.3);
  background: rgba(104, 31, 31, 0.52);
}

#twixt-root[data-player-symbol] .game-board-panel,
#twixt-root[data-player-symbol] .compact-match-panel {
  border-color: var(--twixt-player-outline);
  box-shadow:
    0 0 0 0.18rem var(--twixt-player-outline-soft),
    0 0 3rem var(--twixt-player-outline-glow),
    var(--shadow);
}

#twixt-root[data-player-symbol] .board-viewport {
  border-color: var(--twixt-player-outline);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.2rem var(--twixt-player-outline-soft),
    0 0 2.8rem var(--twixt-player-outline-glow),
    0 20px 42px rgba(0, 0, 0, 0.3);
}

#twixt-root[data-player-symbol] .player-card.is-you {
  border-color: var(--twixt-player-outline);
  box-shadow:
    0 0 0 0.14rem var(--twixt-player-outline-soft),
    0 0 1.6rem var(--twixt-player-outline-glow);
}

#twixt-root[data-player-symbol] .turn-callout {
  box-shadow: 0 0 1.4rem var(--twixt-player-outline-glow);
}

.match-finish-celebration {
  --finish-accent: #7fe6ff;
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.match-finish-celebration[hidden] {
  display: none;
}

.match-finish-celebration-backdrop,
.match-finish-celebration-burst,
.match-finish-celebration-rings,
.match-finish-celebration-card {
  position: absolute;
}

.match-finish-celebration-backdrop {
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--finish-accent) 30%, transparent), transparent 52%),
    linear-gradient(180deg, rgba(7, 10, 18, 0.18), rgba(7, 10, 18, 0.72));
  opacity: 0;
}

.match-finish-celebration-burst,
.match-finish-celebration-rings {
  inset: 50% auto auto 50%;
  width: 0;
  height: 0;
}

.match-finish-celebration-shard {
  position: absolute;
  left: 0;
  top: 0;
  width: 0.28rem;
  height: clamp(5.5rem, 18vw, 8.5rem);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--finish-accent) 82%, white));
  box-shadow: 0 0 1.2rem color-mix(in srgb, var(--finish-accent) 58%, transparent);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(calc(var(--shard-index) * 25.714deg)) translateY(-2rem) scaleY(0.12);
  transform-origin: center bottom;
}

.match-finish-celebration-rings span {
  position: absolute;
  left: 0;
  top: 0;
  width: 1rem;
  height: 1rem;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 82%, white);
  border-radius: 999px;
  box-shadow: 0 0 1.5rem color-mix(in srgb, var(--finish-accent) 42%, transparent);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.1);
}

.match-finish-celebration-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  width: min(100%, 24rem);
  padding: 1.15rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 55%, rgba(255, 255, 255, 0.18));
  border-radius: 1.45rem;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--finish-accent) 14%, rgba(18, 29, 48, 0.96)), rgba(7, 11, 20, 0.94));
  box-shadow:
    0 1.2rem 2.8rem rgba(0, 0, 0, 0.42),
    0 0 2rem color-mix(in srgb, var(--finish-accent) 22%, transparent);
  text-align: center;
  opacity: 0;
  pointer-events: auto;
  transform: translateY(1rem) scale(0.92);
}

.match-finish-celebration-kicker {
  display: block;
  color: color-mix(in srgb, var(--finish-accent) 72%, white);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.match-finish-celebration-title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
}

.match-finish-celebration-subtitle {
  margin: 0;
  color: rgba(240, 244, 255, 0.84);
  line-height: 1.55;
}

.match-finish-celebration-action {
  min-width: min(100%, 11rem);
  margin-top: 0.1rem;
}

.match-finish-celebration.is-classic {
  border-radius: 1.35rem;
}

.match-finish-celebration.is-cube {
  border-radius: 1.4rem;
}

.match-finish-celebration.is-rack {
  border-radius: 1.45rem;
}

.match-finish-celebration.is-dots {
  z-index: 5;
}

.match-finish-celebration.is-draw {
  --finish-accent: #ffe27a;
}

.match-finish-celebration.is-defeat .match-finish-celebration-card,
.match-finish-celebration.is-spectator .match-finish-celebration-card {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--finish-accent) 11%, rgba(18, 29, 48, 0.96)), rgba(7, 11, 20, 0.94));
}

.match-finish-celebration.is-animating .match-finish-celebration-backdrop {
  animation: matchFinishBackdrop 2.8s ease forwards;
}

.match-finish-celebration.is-animating .match-finish-celebration-card {
  animation: matchFinishCard 2.4s cubic-bezier(0.17, 0.84, 0.25, 1) forwards;
}

.match-finish-celebration.is-animating .match-finish-celebration-shard {
  animation: matchFinishShard 1.35s cubic-bezier(0.12, 0.8, 0.24, 1) forwards;
}

.match-finish-celebration.is-animating .match-finish-celebration-rings span:nth-child(1) {
  animation: matchFinishRing 1.45s ease-out forwards;
}

.match-finish-celebration.is-animating .match-finish-celebration-rings span:nth-child(2) {
  animation: matchFinishRing 1.45s ease-out 0.12s forwards;
}

.match-finish-celebration.is-animating .match-finish-celebration-rings span:nth-child(3) {
  animation: matchFinishRing 1.45s ease-out 0.24s forwards;
}

:is(#tic-tac-toe-root, #connect-four-root, #tic-tac-toe-3d-root, #connect-4-3d-root, #dots-and-boxes-root)[data-turn-state="finished"] .compact-match-panel,
#dots-and-boxes-root[data-turn-state="finished"] .dots-board-panel {
  animation: matchFinishPanelGlow 2.6s ease-in-out infinite;
}

@keyframes matchFinishBackdrop {
  0% {
    opacity: 0;
  }

  18%,
  62% {
    opacity: 1;
  }

  100% {
    opacity: 0.78;
  }
}

@keyframes matchFinishShard {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(calc(var(--shard-index) * 25.714deg)) translateY(-2rem) scaleY(0.12);
  }

  16% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(calc(var(--shard-index) * 25.714deg)) translateY(calc(-7.5rem - (var(--shard-index) * 0.16rem))) scaleY(1);
  }
}

@keyframes matchFinishRing {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1);
  }

  18% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(14);
  }
}

@keyframes matchFinishCard {
  0% {
    opacity: 0;
    transform: translateY(1rem) scale(0.92);
  }

  18%,
  82% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 1;
    transform: translateY(-0.12rem) scale(1);
  }
}

@keyframes matchFinishPanelGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 0.14rem rgba(255, 255, 255, 0.08),
      0 0 1.8rem rgba(255, 214, 124, 0.18),
      var(--shadow);
  }

  50% {
    box-shadow:
      0 0 0 0.22rem rgba(255, 228, 156, 0.2),
      0 0 3rem rgba(255, 214, 124, 0.28),
      var(--shadow);
  }
}

.tic-tac-panel {
  overflow: hidden;
}

.connect-four-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.connect-four-panel::before,
.connect-four-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.connect-four-panel::before {
  background:
    linear-gradient(120deg, rgba(126, 243, 255, 0.08), rgba(0, 0, 0, 0) 28%),
    linear-gradient(300deg, rgba(255, 184, 108, 0.08), rgba(0, 0, 0, 0) 24%),
    repeating-linear-gradient(180deg, rgba(126, 243, 255, 0.035) 0 1px, rgba(0, 0, 0, 0) 1px 15px);
  opacity: 0.82;
}

.connect-four-panel::after {
  inset: 1rem 1rem auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(126, 243, 255, 0.8) 22%, rgba(255, 184, 108, 0.78) 78%, rgba(0, 0, 0, 0));
  filter: blur(0.18rem);
  opacity: 0.9;
}

.connect-four-panel > * {
  position: relative;
  z-index: 1;
}

.twixt-panel {
  overflow: hidden;
}

.tic-tac-stage {
  display: grid;
  place-items: center;
  min-height: 31rem;
  padding: 1.4rem 1rem;
  background:
    radial-gradient(circle at 50% 22%, rgba(117, 216, 255, 0.16), transparent 32%),
    radial-gradient(circle at 50% 78%, rgba(255, 180, 84, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(12, 18, 32, 0.9), rgba(7, 10, 18, 0.98));
}

.connect-four-stage {
  display: grid;
  place-items: center;
  min-height: 31rem;
  padding: 1.35rem 0.95rem 1.55rem;
  background:
    radial-gradient(circle at 50% 12%, rgba(126, 243, 255, 0.24), transparent 26%),
    radial-gradient(circle at 16% 82%, rgba(126, 243, 255, 0.12), transparent 22%),
    radial-gradient(circle at 84% 82%, rgba(255, 184, 108, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(8, 14, 27, 0.98), rgba(3, 7, 16, 0.99));
}

.connect-four-stage::before,
.connect-four-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.connect-four-stage::before {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(126, 243, 255, 0.08), rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0) 80%, rgba(255, 184, 108, 0.08)),
    repeating-linear-gradient(180deg, rgba(126, 243, 255, 0.035) 0 1px, rgba(0, 0, 0, 0) 1px 14px),
    linear-gradient(90deg, rgba(126, 243, 255, 0.08), rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 84%, rgba(255, 184, 108, 0.08));
  opacity: 0.9;
}

.connect-four-stage::after {
  left: 1.2rem;
  right: 1.2rem;
  top: 1.15rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(126, 243, 255, 0.82) 24%, rgba(255, 184, 108, 0.82) 76%, rgba(0, 0, 0, 0));
  filter: blur(0.2rem);
}

.connect-four-stage > * {
  position: relative;
  z-index: 1;
}

.connect-four-board-shell {
  position: relative;
  width: min(100%, 45rem);
  padding: 0.95rem;
  border: 1px solid rgba(126, 243, 255, 0.18);
  border-radius: 1.85rem;
  background:
    linear-gradient(135deg, rgba(16, 33, 60, 0.72), rgba(5, 11, 24, 0.9)),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(14, 47, 82, 0.42),
    0 28px 52px rgba(0, 0, 0, 0.36);
  isolation: isolate;
}

.connect-four-board-shell::before,
.connect-four-board-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.connect-four-board-shell::before {
  inset: 0.5rem;
  border: 1px solid rgba(126, 243, 255, 0.16);
  border-radius: 1.4rem;
  clip-path: polygon(1rem 0, calc(100% - 1rem) 0, 100% 1rem, 100% calc(100% - 1rem), calc(100% - 1rem) 100%, 1rem 100%, 0 calc(100% - 1rem), 0 1rem);
  opacity: 0.96;
}

.connect-four-board-shell::after {
  left: 1.5rem;
  right: 1.5rem;
  bottom: 0.7rem;
  height: 0.24rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 243, 255, 0.84), rgba(255, 184, 108, 0.84));
  filter: blur(0.36rem);
  opacity: 0.72;
}

.connect-four-lane-bar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.48rem;
  margin-bottom: 0.65rem;
}

.connect-four-lane-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 1.7rem;
  padding: 0;
  border: 1px solid rgba(126, 243, 255, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(8, 17, 31, 0.96), rgba(5, 9, 18, 0.88)),
    rgba(255, 255, 255, 0.02);
  color: #dffcff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0.9rem rgba(126, 243, 255, 0.08);
  cursor: default;
  transition:
    transform 0.12s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    color 0.12s ease,
    opacity 0.12s ease;
  appearance: none;
}

.connect-four-lane-button:nth-child(even) {
  border-color: rgba(255, 184, 108, 0.18);
  color: #ffe7ca;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0.9rem rgba(255, 184, 108, 0.08);
}

.connect-four-lane-button.is-column-open {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 1rem rgba(126, 243, 255, 0.12);
}

.connect-four-lane-button.is-playable {
  cursor: pointer;
}

.connect-four-lane-button.is-playable:hover,
.connect-four-lane-button.is-playable:focus-visible,
.connect-four-lane-button.is-hovered {
  border-color: rgba(188, 248, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(14, 34, 63, 0.98), rgba(6, 13, 25, 0.92)),
    rgba(255, 255, 255, 0.03);
  color: #f0feff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.14rem rgba(126, 243, 255, 0.12),
    0 0 1.3rem rgba(126, 243, 255, 0.24);
  outline: none;
  transform: translateY(-0.12rem) scale(1.01);
}

.connect-four-lane-button.is-remote-hovered {
  border-color: rgba(255, 217, 176, 0.38);
  color: #fff0da;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.12rem rgba(255, 184, 108, 0.12),
    0 0 1.15rem rgba(255, 184, 108, 0.2);
}

.connect-four-lane-button.is-winning {
  border-color: rgba(191, 255, 224, 0.44);
  color: #effff5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.14rem rgba(148, 255, 209, 0.16),
    0 0 1.3rem rgba(148, 255, 209, 0.24);
}

.connect-four-lane-button.is-recent {
  animation: connectFourMovePulse 0.62s cubic-bezier(0.2, 0.86, 0.28, 1) both;
  animation-delay: var(--recent-blink-delay, 0ms);
  will-change: filter, box-shadow, transform;
}

.connect-four-lane-button:disabled:not(.is-remote-hovered):not(.is-winning) {
  opacity: 0.72;
}

.twixt-stage {
  display: grid;
  place-items: center;
  min-height: 38rem;
  padding: 1.3rem 1rem;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 153, 164, 0.18), transparent 26%),
    radial-gradient(circle at 50% 88%, rgba(145, 160, 179, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(30, 20, 16, 0.96), rgba(11, 9, 14, 0.99));
}

.twixt-board {
  position: relative;
  width: min(100%, 42rem);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 236, 214, 0.34);
  border-radius: 1.6rem;
  background:
    linear-gradient(90deg,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 4.1%,
      rgba(224, 83, 96, 0.94) 4.1%,
      rgba(224, 83, 96, 0.94) 5.05%,
      rgba(0, 0, 0, 0) 5.05%,
      rgba(0, 0, 0, 0) 94.95%,
      rgba(224, 83, 96, 0.94) 94.95%,
      rgba(224, 83, 96, 0.94) 95.9%,
      rgba(0, 0, 0, 0) 95.9%),
    linear-gradient(180deg,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 4.1%,
      rgba(36, 42, 49, 0.96) 4.1%,
      rgba(36, 42, 49, 0.96) 5.05%,
      rgba(0, 0, 0, 0) 5.05%,
      rgba(0, 0, 0, 0) 94.95%,
      rgba(36, 42, 49, 0.96) 94.95%,
      rgba(36, 42, 49, 0.96) 95.9%,
      rgba(0, 0, 0, 0) 95.9%),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(180deg, #f7f0e6, #efe4d3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 24px 44px rgba(0, 0, 0, 0.32);
}

.twixt-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(94, 69, 40, 0.06), transparent 72%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 35%);
  pointer-events: none;
}

.twixt-links-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.twixt-link {
  stroke-width: 0.26;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 0.18rem rgba(0, 0, 0, 0.18));
}

.twixt-link.is-red {
  stroke: #ff5b6d;
}

.twixt-link.is-black {
  stroke: #1f2833;
}

.twixt-link.is-winning {
  stroke-width: 0.34;
  filter:
    drop-shadow(0 0 0.2rem rgba(140, 240, 168, 0.4))
    drop-shadow(0 0 0.55rem rgba(140, 240, 168, 0.3));
}

.twixt-holes {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-template-rows: repeat(24, minmax(0, 1fr));
}

.twixt-hole {
  position: relative;
  border: 0;
  background: transparent;
  cursor: default;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.twixt-hole::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(16, 14, 12, 0.88);
  box-shadow:
    0 0 0 0.12rem rgba(255, 255, 255, 0.55),
    0 0.05rem 0.22rem rgba(0, 0, 0, 0.16);
  transform: translate(-50%, -50%);
}

.twixt-hole::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 0.42rem;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.twixt-hole[data-owner="red"]::after,
.twixt-hole[data-owner="black"]::after {
  opacity: 1;
}

.twixt-hole[data-owner="red"]::after {
  background: linear-gradient(180deg, #ffb0b8, #ff6474);
  box-shadow:
    0 0 0 0.1rem rgba(124, 26, 35, 0.18),
    0 0.18rem 0.42rem rgba(165, 44, 57, 0.22);
}

.twixt-hole[data-owner="black"]::after {
  background: linear-gradient(180deg, #4c5d70, #1b242f);
  box-shadow:
    0 0 0 0.1rem rgba(233, 241, 249, 0.2),
    0 0.18rem 0.42rem rgba(11, 16, 23, 0.24);
}

.twixt-hole[data-preview-owner="red"]::after,
#twixt-root[data-player-symbol="red"] .twixt-hole.is-playable:hover::after,
#twixt-root[data-player-symbol="red"] .twixt-hole.is-playable:focus-visible::after {
  background: linear-gradient(180deg, rgba(255, 176, 184, 0.96), rgba(255, 100, 116, 0.96));
  box-shadow:
    0 0 0 0.1rem rgba(124, 26, 35, 0.22),
    0 0.18rem 0.52rem rgba(165, 44, 57, 0.28);
}

.twixt-hole[data-preview-owner="black"]::after,
#twixt-root[data-player-symbol="black"] .twixt-hole.is-playable:hover::after,
#twixt-root[data-player-symbol="black"] .twixt-hole.is-playable:focus-visible::after {
  background: linear-gradient(180deg, rgba(76, 93, 112, 0.96), rgba(27, 36, 47, 0.96));
  box-shadow:
    0 0 0 0.1rem rgba(233, 241, 249, 0.22),
    0 0.18rem 0.52rem rgba(11, 16, 23, 0.3);
}

.twixt-hole[data-preview-owner]::after,
#twixt-root[data-player-symbol] .twixt-hole.is-playable:hover::after,
#twixt-root[data-player-symbol] .twixt-hole.is-playable:focus-visible::after {
  opacity: 0.58;
  transform: translate(-50%, -50%) scale(1.04);
  will-change: opacity, transform, box-shadow, filter;
}

.twixt-hole.is-playable {
  cursor: pointer;
}

.twixt-hole.is-playable:hover,
.twixt-hole.is-playable:focus-visible {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 0.3rem rgba(255, 209, 162, 0.26));
  outline: none;
}

.twixt-hole.is-playable:hover::before,
.twixt-hole.is-playable:focus-visible::before {
  box-shadow:
    0 0 0 0.16rem rgba(255, 173, 133, 0.42),
    0 0 0.8rem rgba(255, 173, 133, 0.22);
}

.twixt-hole.is-remote-hovered::before {
  box-shadow:
    0 0 0 0.18rem rgba(255, 219, 168, 0.5),
    0 0 0.95rem rgba(255, 195, 120, 0.28);
}

.twixt-hole.is-remote-hovered[data-preview-owner]::after {
  opacity: 0.72;
  transform: translate(-50%, -50%) scale(1.08);
}

.twixt-hole.is-pending-placement[data-preview-owner]::after {
  opacity: 0.96;
  transform: translate(-50%, -50%) scale(1.1);
  animation: twixtPendingPegPulse 0.84s ease-in-out infinite;
}

.twixt-hole.is-winning::after {
  box-shadow:
    0 0 0 0.12rem rgba(132, 236, 162, 0.54),
    0 0 1rem rgba(132, 236, 162, 0.36);
}

.twixt-hole.is-recent::after {
  animation: twixtPegBlink 0.75s steps(1, end) both;
  animation-delay: var(--recent-blink-delay, 0ms);
  will-change: opacity, box-shadow, filter, transform;
}

.twixt-hole.is-corner {
  opacity: 0.58;
}

.tic-tac-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  width: min(100%, 22rem);
}

.tic-tac-cell {
  aspect-ratio: 1;
  min-height: 6.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.35rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(10, 16, 28, 0.92);
  color: var(--text-main);
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  font-size: clamp(2.4rem, 8vw, 3.7rem);
  font-weight: 700;
  cursor: default;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.tic-tac-cell.value-x {
  color: #d7f5ff;
  text-shadow: 0 0 1.4rem rgba(117, 216, 255, 0.28);
}

.tic-tac-cell.value-o {
  color: #ffe0bf;
  text-shadow: 0 0 1.4rem rgba(255, 180, 84, 0.24);
}

.tic-tac-cell.is-playable {
  cursor: pointer;
  border-color: rgba(117, 216, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 0.08rem rgba(117, 216, 255, 0.08);
}

.tic-tac-cell.is-playable:hover,
.tic-tac-cell.is-playable:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(117, 216, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.16rem rgba(117, 216, 255, 0.12),
    0 18px 32px rgba(0, 0, 0, 0.25);
  outline: none;
}

.tic-tac-cell.is-winning {
  border-color: rgba(142, 240, 168, 0.56);
  background:
    radial-gradient(circle at top, rgba(142, 240, 168, 0.2), transparent 58%),
    rgba(15, 28, 23, 0.92);
  box-shadow: 0 0 0 0.12rem rgba(142, 240, 168, 0.16);
}

.tic-tac-cell.is-remote-hovered {
  border-color: rgba(255, 208, 147, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.12rem rgba(255, 208, 147, 0.16),
    0 18px 32px rgba(0, 0, 0, 0.2);
}

.tic-tac-cell.is-recent {
  animation: boardMoveBlink 0.75s steps(1, end) both;
  will-change: filter, box-shadow, transform;
}

.connect-four-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.52rem;
  width: 100%;
  padding: 0.95rem;
  border: 1px solid rgba(126, 243, 255, 0.2);
  border-radius: 1.55rem;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, rgba(17, 37, 74, 0.94), rgba(6, 12, 28, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -0.2rem 0 rgba(0, 0, 0, 0.28),
    0 24px 46px rgba(0, 0, 0, 0.34);
  isolation: isolate;
}

.connect-four-grid::before,
.connect-four-grid::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.connect-four-grid::before {
  inset: 0.55rem;
  border-radius: 1.12rem;
  background:
    repeating-linear-gradient(90deg, rgba(126, 243, 255, 0.08) 0 1px, rgba(0, 0, 0, 0) 1px 14.2857%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0) 24%, rgba(255, 184, 108, 0.06) 100%);
  opacity: 0.55;
}

.connect-four-grid::after {
  inset: 0.34rem;
  border: 1px solid rgba(126, 243, 255, 0.14);
  border-radius: 1.26rem;
  box-shadow: inset 0 0 1.25rem rgba(126, 243, 255, 0.08);
}

.connect-four-cell {
  position: relative;
  aspect-ratio: 1;
  min-height: 4rem;
  padding: 0;
  border: none;
  border-radius: 1rem;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(126, 243, 255, 0.08), rgba(0, 0, 0, 0) 34%),
    rgba(8, 17, 33, 0.12);
  cursor: default;
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), filter 0.12s ease;
}

.connect-four-cell::before {
  content: "";
  position: absolute;
  inset: 0.15rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(240, 252, 255, 0.18), rgba(255, 255, 255, 0) 30%),
    radial-gradient(circle at 50% 55%, rgba(10, 22, 43, 0.98), rgba(3, 7, 15, 0.98));
  box-shadow:
    inset 0 0 0 0.14rem rgba(126, 243, 255, 0.16),
    inset 0 0 1.2rem rgba(0, 0, 0, 0.52),
    0 0 0 0.06rem rgba(255, 255, 255, 0.05),
    0 0 0.9rem rgba(16, 67, 114, 0.16);
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.12s ease, filter 0.12s ease, background 0.12s ease;
}

.connect-four-cell::after {
  content: "";
  position: absolute;
  inset: 0.52rem;
  border: 1px solid rgba(126, 243, 255, 0.14);
  border-radius: 999px;
  box-shadow: inset 0 0 0.85rem rgba(126, 243, 255, 0.08);
  pointer-events: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.connect-four-cell[data-cell-symbol="x"]::before {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, #c3fcff 0%, #66deff 42%, #1b64d9 100%);
  box-shadow:
    inset 0 0.14rem 0 rgba(255, 255, 255, 0.26),
    inset 0 -0.34rem 0 rgba(10, 44, 102, 0.44),
    0 0 0 0.08rem rgba(161, 244, 255, 0.14),
    0 0 1.6rem rgba(102, 222, 255, 0.34);
}

.connect-four-cell[data-cell-symbol="x"]::after {
  border-color: rgba(214, 251, 255, 0.42);
  box-shadow:
    inset 0 0 0.9rem rgba(214, 251, 255, 0.22),
    0 0 1rem rgba(102, 222, 255, 0.18);
}

.connect-four-cell[data-cell-symbol="o"]::before {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, #ffe4b3 0%, #ffb767 44%, #ff6f33 100%);
  box-shadow:
    inset 0 0.14rem 0 rgba(255, 255, 255, 0.22),
    inset 0 -0.34rem 0 rgba(128, 57, 20, 0.4),
    0 0 0 0.08rem rgba(255, 220, 174, 0.14),
    0 0 1.5rem rgba(255, 184, 108, 0.32);
}

.connect-four-cell[data-cell-symbol="o"]::after {
  border-color: rgba(255, 232, 194, 0.4);
  box-shadow:
    inset 0 0 0.9rem rgba(255, 232, 194, 0.2),
    0 0 1rem rgba(255, 184, 108, 0.18);
}

.connect-four-cell.is-column-open:not([data-cell-symbol]) {
  cursor: default;
}

.connect-four-cell.is-column-open:not([data-cell-symbol])::before {
  box-shadow:
    inset 0 0 0 0.12rem rgba(126, 243, 255, 0.1),
    inset 0 0 1.25rem rgba(0, 0, 0, 0.54),
    0 0 0 0.06rem rgba(126, 243, 255, 0.04),
    0 0 0.7rem rgba(126, 243, 255, 0.06);
}

.connect-four-cell.is-drop-target:not([data-cell-symbol])::before {
  background:
    radial-gradient(circle at 34% 28%, var(--connect-four-preview-sheen), rgba(255, 255, 255, 0) 36%),
    var(--connect-four-preview-fill);
  box-shadow:
    inset 0 0 0 0.16rem var(--connect-four-preview-outline),
    0 0 0 0.1rem color-mix(in srgb, var(--connect-four-preview-outline) 55%, transparent),
    0 0 1rem var(--connect-four-preview-glow);
}

.connect-four-cell.is-drop-target:not([data-cell-symbol])::after {
  border-color: color-mix(in srgb, var(--connect-four-preview-outline) 88%, white 12%);
  box-shadow:
    inset 0 0 0.9rem color-mix(in srgb, var(--connect-four-preview-outline) 38%, transparent),
    0 0 0.85rem color-mix(in srgb, var(--connect-four-preview-glow) 88%, transparent);
}

.connect-four-cell.is-local-hovered::before {
  box-shadow:
    inset 0 0 0 0.16rem color-mix(in srgb, var(--connect-four-preview-outline) 82%, transparent),
    inset 0 0 1.25rem rgba(0, 0, 0, 0.54),
    0 0 0 0.12rem color-mix(in srgb, var(--connect-four-preview-outline) 55%, transparent),
    0 0 1.1rem color-mix(in srgb, var(--connect-four-preview-glow) 88%, transparent);
}

.connect-four-cell.is-local-hovered::after {
  border-color: color-mix(in srgb, var(--connect-four-preview-outline) 72%, white 8%);
  box-shadow:
    inset 0 0 0.95rem color-mix(in srgb, var(--connect-four-preview-outline) 24%, transparent),
    0 0 0.8rem color-mix(in srgb, var(--connect-four-preview-glow) 68%, transparent);
}

.connect-four-cell.is-winning::before {
  box-shadow:
    inset 0 0 0 0.16rem rgba(181, 255, 221, 0.42),
    inset 0 0 1.25rem rgba(28, 77, 52, 0.3),
    0 0 0 0.14rem rgba(148, 255, 209, 0.24),
    0 0 1.6rem rgba(148, 255, 209, 0.3);
}

.connect-four-cell.is-winning::after {
  border-color: rgba(205, 255, 228, 0.54);
  box-shadow:
    inset 0 0 1rem rgba(205, 255, 228, 0.18),
    0 0 1.15rem rgba(148, 255, 209, 0.18);
}

.connect-four-cell.is-remote-hovered::before {
  box-shadow:
    inset 0 0 0 0.16rem rgba(255, 223, 177, 0.28),
    inset 0 0 1.2rem rgba(0, 0, 0, 0.52),
    0 0 0 0.14rem rgba(255, 200, 126, 0.22),
    0 0 1.2rem rgba(255, 184, 108, 0.22);
}

.connect-four-cell.is-remote-hovered::after {
  border-color: rgba(255, 228, 194, 0.36);
  box-shadow:
    inset 0 0 0.9rem rgba(255, 228, 194, 0.14),
    0 0 1rem rgba(255, 184, 108, 0.12);
}

.connect-four-cell.is-recent::before {
  animation: connectFourMovePulse 0.62s cubic-bezier(0.2, 0.86, 0.28, 1) both;
  animation-delay: var(--recent-blink-delay, 0ms);
  will-change: filter, box-shadow, transform;
}

.connect-four-falling-piece {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transform: translate(0, 0);
  transition-property: transform, opacity, filter;
  transition-timing-function: cubic-bezier(0.14, 0.78, 0.24, 1);
  will-change: transform, opacity, filter;
}

.connect-four-falling-piece::before,
.connect-four-falling-piece::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.connect-four-falling-piece::before {
  inset: 0;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, #c3fcff 0%, #66deff 42%, #1b64d9 100%);
  box-shadow:
    inset 0 0.14rem 0 rgba(255, 255, 255, 0.26),
    inset 0 -0.34rem 0 rgba(10, 44, 102, 0.44),
    0 0 0 0.08rem rgba(161, 244, 255, 0.14),
    0 0 1.6rem rgba(102, 222, 255, 0.34);
}

.connect-four-falling-piece::after {
  inset: 0.34rem;
  border: 1px solid rgba(214, 251, 255, 0.42);
  box-shadow:
    inset 0 0 0.9rem rgba(214, 251, 255, 0.22),
    0 0 1rem rgba(102, 222, 255, 0.18);
}

.connect-four-falling-piece[data-cell-symbol="o"]::before {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, #ffe4b3 0%, #ffb767 44%, #ff6f33 100%);
  box-shadow:
    inset 0 0.14rem 0 rgba(255, 255, 255, 0.22),
    inset 0 -0.34rem 0 rgba(128, 57, 20, 0.4),
    0 0 0 0.08rem rgba(255, 220, 174, 0.14),
    0 0 1.5rem rgba(255, 184, 108, 0.32);
}

.connect-four-falling-piece[data-cell-symbol="o"]::after {
  border-color: rgba(255, 232, 194, 0.4);
  box-shadow:
    inset 0 0 0.9rem rgba(255, 232, 194, 0.2),
    0 0 1rem rgba(255, 184, 108, 0.18);
}

.connect-four-falling-piece.is-dropping {
  opacity: 1;
  filter: drop-shadow(0 0 1.45rem rgba(126, 243, 255, 0.24));
}

.turn-hover-cursor {
  --turn-hover-color: rgba(255, 180, 84, 0.96);
  --turn-hover-color-soft: rgba(255, 180, 84, 0.22);
  --turn-hover-color-glow: rgba(255, 180, 84, 0.34);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.turn-hover-cursor-dot {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(255, 244, 230, 0.96);
  border-radius: 999px;
  background: var(--turn-hover-color);
  box-shadow:
    0 0 0 0.18rem var(--turn-hover-color-soft),
    0 0 1.2rem var(--turn-hover-color-glow);
}

.turn-hover-cursor[data-mover-symbol="x"] {
  --turn-hover-color: rgba(117, 216, 255, 0.96);
  --turn-hover-color-soft: rgba(117, 216, 255, 0.22);
  --turn-hover-color-glow: rgba(117, 216, 255, 0.34);
}

.turn-hover-cursor[data-mover-symbol="o"] {
  --turn-hover-color: rgba(255, 180, 84, 0.96);
  --turn-hover-color-soft: rgba(255, 180, 84, 0.22);
  --turn-hover-color-glow: rgba(255, 180, 84, 0.34);
}

.turn-hover-cursor[data-mover-symbol="red"] {
  --turn-hover-color: rgba(255, 91, 109, 0.96);
  --turn-hover-color-soft: rgba(255, 91, 109, 0.22);
  --turn-hover-color-glow: rgba(255, 91, 109, 0.34);
}

.turn-hover-cursor[data-mover-symbol="black"] {
  --turn-hover-color: rgba(110, 123, 139, 0.96);
  --turn-hover-color-soft: rgba(110, 123, 139, 0.22);
  --turn-hover-color-glow: rgba(110, 123, 139, 0.34);
}

.turn-hover-cursor-label {
  padding: 0.24rem 0.55rem;
  border: 1px solid var(--turn-hover-color-soft);
  border-radius: 999px;
  background: rgba(10, 16, 28, 0.88);
  color: rgba(248, 241, 229, 0.96);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.turn-hover-cursor.is-3d .turn-hover-cursor-dot {
  width: 1rem;
  height: 1rem;
}

.turn-hover-cursor.is-connect-four .turn-hover-cursor-dot {
  width: 1.05rem;
  height: 1.05rem;
  border-width: 2px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 34%),
    var(--turn-hover-color);
  box-shadow:
    0 0 0 0.24rem var(--turn-hover-color-soft),
    0 0 1.35rem var(--turn-hover-color-glow),
    0 0.24rem 0.6rem rgba(0, 0, 0, 0.22);
}

.turn-hover-cursor.is-connect-four .turn-hover-cursor-label {
  border-color: rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(135deg, rgba(7, 16, 31, 0.96), rgba(8, 14, 28, 0.86)),
    rgba(255, 255, 255, 0.02);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 0.08rem rgba(255, 255, 255, 0.03),
    0 0 1rem var(--turn-hover-color-soft),
    0 8px 24px rgba(0, 0, 0, 0.24);
}

.turn-hover-cursor.is-dots {
  z-index: 6;
}

.turn-hover-cursor.is-dots .turn-hover-cursor-dot {
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 0;
}

.turn-hover-cursor.is-twixt {
  z-index: 4;
}

.turn-hover-cursor.is-twixt .turn-hover-cursor-dot {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
  border-radius: 0.32rem;
  box-shadow:
    0 0 0 0.22rem var(--turn-hover-color-soft),
    0 0 1.35rem var(--turn-hover-color-glow),
    0 0.24rem 0.58rem rgba(0, 0, 0, 0.22);
  animation: twixtHoverCursorPulse 1.05s ease-in-out infinite;
}

.page-note {
  margin-top: 1rem;
  color: var(--text-muted);
}

#starfighter-arena-root {
  position: relative;
}

body.starfighter-route {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -8%, rgba(121, 221, 255, 0.18), transparent 28%),
    radial-gradient(circle at 0 35%, rgba(255, 180, 84, 0.14), transparent 32%),
    radial-gradient(circle at 100% 18%, rgba(117, 216, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #050812 0%, #04070d 34%, #02040a 100%);
}

body.starfighter-route .site-backdrop {
  background:
    radial-gradient(circle at 50% 0, rgba(117, 216, 255, 0.16), transparent 24%),
    linear-gradient(90deg, rgba(255, 180, 84, 0.06), transparent 22%, transparent 78%, rgba(117, 216, 255, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0) 18%);
}

body.starfighter-route .site-main {
  padding: 0;
}

body.starfighter-route .page-shell-fluid {
  padding: 0.8rem;
}

.starfighter-page {
  display: grid;
  gap: 0.85rem;
}

body.starfighter-route .starfighter-command-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(117, 216, 255, 0.18);
  border-radius: 1.45rem;
  background:
    linear-gradient(180deg, rgba(9, 15, 26, 0.96), rgba(4, 8, 16, 0.98)),
    linear-gradient(135deg, rgba(117, 216, 255, 0.08), rgba(0, 0, 0, 0) 56%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(117, 216, 255, 0.06),
    0 24px 50px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

body.starfighter-route .starfighter-command-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0) 38%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.016) 0 1px, rgba(0, 0, 0, 0) 1px 14px);
  pointer-events: none;
}

body.starfighter-route .starfighter-command-bar h1 {
  margin: 0;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.starfighter-route .starfighter-command-bar .eyebrow {
  margin-bottom: 0.32rem;
  color: rgba(145, 226, 255, 0.84);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

body.starfighter-route .starfighter-command-bar .room-badge {
  min-width: 12rem;
  border-color: rgba(117, 216, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(7, 12, 23, 0.84), rgba(3, 7, 14, 0.92)),
    rgba(255, 255, 255, 0.03);
}

body.starfighter-route .starfighter-command-bar .room-badge span {
  color: rgba(191, 213, 233, 0.72);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.starfighter-route .starfighter-command-bar .room-badge strong {
  color: rgba(248, 241, 229, 0.98);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.starfighter-route .starfighter-briefing-panel {
  border-color: rgba(117, 216, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(8, 14, 25, 0.88), rgba(4, 8, 16, 0.94)),
    rgba(255, 255, 255, 0.03);
}

.starfighter-panel,
.starfighter-sidebar {
  overflow: hidden;
}

.starfighter-viewport {
  min-height: 42rem;
  background:
    radial-gradient(circle at 50% 18%, rgba(117, 216, 255, 0.24), transparent 30%),
    radial-gradient(circle at 82% 24%, rgba(117, 216, 255, 0.12), transparent 20%),
    radial-gradient(circle at 18% 82%, rgba(255, 180, 84, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(6, 13, 24, 0.82), rgba(4, 8, 16, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 3.5rem rgba(84, 183, 255, 0.08);
}

.starfighter-canvas {
  z-index: 0;
  cursor: crosshair;
}

.starfighter-cockpit-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.28s ease, filter 0.28s ease;
}

.starfighter-cockpit-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(117, 216, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(117, 216, 255, 0.05), rgba(0, 0, 0, 0) 16%, rgba(255, 180, 84, 0.04) 84%, rgba(0, 0, 0, 0) 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, rgba(0, 0, 0, 0) 1px 7px);
}

.starfighter-cockpit-arch,
.starfighter-cockpit-strut,
.starfighter-cockpit-panel {
  position: absolute;
  display: block;
  border: 1px solid rgba(117, 216, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(117, 216, 255, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(6, 13, 24, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 1.2rem rgba(117, 216, 255, 0.08);
}

.starfighter-cockpit-arch {
  left: 10%;
  right: 10%;
  top: 0.85rem;
  height: 18%;
  border-bottom: 0;
  border-top-left-radius: 50% 100%;
  border-top-right-radius: 50% 100%;
  background:
    linear-gradient(180deg, rgba(191, 234, 255, 0.16), rgba(0, 0, 0, 0)),
    rgba(6, 13, 24, 0.14);
}

.starfighter-cockpit-strut {
  top: 12%;
  bottom: 13%;
  width: clamp(0.9rem, 1.9vw, 1.35rem);
  clip-path: polygon(15% 0, 100% 0, 82% 100%, 0 100%);
}

.starfighter-cockpit-strut.is-left {
  left: 11.5%;
}

.starfighter-cockpit-strut.is-right {
  right: 11.5%;
  transform: scaleX(-1);
}

.starfighter-cockpit-panel {
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 12%;
  border-bottom: 0;
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(180deg, rgba(117, 216, 255, 0.14), rgba(255, 180, 84, 0.08)),
    rgba(6, 13, 24, 0.26);
}

#starfighter-arena-root[data-camera-mode="cockpit"] .starfighter-cockpit-overlay {
  opacity: 0.86;
  filter: drop-shadow(0 0 1rem rgba(117, 216, 255, 0.12));
}

#starfighter-arena-root[data-camera-mode="cockpit"] .starfighter-cockpit-arch,
#starfighter-arena-root[data-camera-mode="cockpit"] .starfighter-cockpit-strut,
#starfighter-arena-root[data-camera-mode="cockpit"] .starfighter-cockpit-panel {
  border-color: rgba(117, 216, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 1.45rem rgba(117, 216, 255, 0.12);
}

.starfighter-hud-strip {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  pointer-events: none;
}

.starfighter-hud-chip {
  min-width: 7rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: rgba(5, 9, 18, 0.68);
  backdrop-filter: blur(10px);
}

.starfighter-hud-chip span,
.starfighter-scanner-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.starfighter-hud-chip strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.2rem;
}

.starfighter-threat-chip strong {
  color: #8ef0a8;
}

.starfighter-afterburner-chip strong {
  color: #9fe7ff;
}

.starfighter-weapon-chip strong {
  color: #ffdca8;
}

.starfighter-afterburner-bar,
.starfighter-weapon-bar {
  position: relative;
  margin-top: 0.5rem;
  height: 0.38rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.starfighter-afterburner-bar span,
.starfighter-weapon-bar span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(var(--weapon-charge, 1));
  background: linear-gradient(90deg, rgba(255, 180, 84, 0.88), rgba(248, 241, 229, 0.94));
  box-shadow: 0 0 1rem rgba(255, 180, 84, 0.28);
  transition: transform 0.12s linear, opacity 0.12s linear;
}

.starfighter-afterburner-bar span {
  transform: scaleX(var(--afterburner-charge, 1));
  background: linear-gradient(90deg, rgba(117, 216, 255, 0.9), rgba(247, 248, 255, 0.96));
  box-shadow: 0 0 1rem rgba(117, 216, 255, 0.28);
}

.starfighter-tactical-stack {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: grid;
  gap: 0.75rem;
  width: min(22rem, calc(100% - 2rem));
  pointer-events: none;
}

.starfighter-tactical-panel {
  display: grid;
  gap: 0.32rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(117, 216, 255, 0.16);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(6, 11, 20, 0.86), rgba(6, 11, 20, 0.72)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.starfighter-mission-panel {
  transition: opacity 120ms linear;
  will-change: opacity;
}

.starfighter-tactical-label {
  color: rgba(191, 213, 233, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.starfighter-tactical-panel strong {
  color: rgba(248, 241, 229, 0.96);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.2;
}

.starfighter-tactical-note {
  color: rgba(225, 234, 245, 0.78);
  font-size: 0.88rem;
  line-height: 1.45;
}

.starfighter-focus-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.75rem;
}

.starfighter-focus-panel .starfighter-tactical-label,
.starfighter-focus-panel .starfighter-tactical-note,
.starfighter-focus-panel .starfighter-focus-meta {
  grid-column: 1 / 2;
}

.starfighter-focus-panel strong {
  grid-column: 1 / 2;
}

.starfighter-focus-meta {
  color: rgba(191, 213, 233, 0.78);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.starfighter-focus-distance {
  grid-column: 2 / 3;
  grid-row: 2 / 5;
  align-self: center;
  min-width: 4.9rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(117, 216, 255, 0.08);
  color: rgba(248, 241, 229, 0.96);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.04em;
}

.starfighter-targeting-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.starfighter-contact-indicators {
  position: absolute;
  inset: 0;
}

.starfighter-contact-indicator {
  --contact-color: rgba(117, 216, 255, 0.94);
  --contact-border: rgba(117, 216, 255, 0.22);
  --contact-tint: rgba(117, 216, 255, 0.12);
  position: absolute;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
}

.starfighter-contact-indicator.is-alien {
  --contact-color: rgba(255, 180, 84, 0.96);
  --contact-border: rgba(255, 180, 84, 0.22);
  --contact-tint: rgba(255, 180, 84, 0.12);
}

.starfighter-contact-indicator.is-primary .starfighter-contact-crosshair {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 0 1.2rem rgba(117, 216, 255, 0.2);
}

.starfighter-contact-indicator.is-primary.is-alien .starfighter-contact-crosshair {
  box-shadow: 0 0 1.2rem rgba(255, 180, 84, 0.24);
}

.starfighter-contact-crosshair {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid var(--contact-border);
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--contact-tint) 0%, rgba(0, 0, 0, 0) 72%);
  transform: translate(-50%, -50%);
}

.starfighter-contact-crosshair::before,
.starfighter-contact-crosshair::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--contact-color);
  transform: translate(-50%, -50%);
}

.starfighter-contact-crosshair::before {
  width: 0.12rem;
  height: 1.25rem;
  box-shadow: 0 0 0.8rem rgba(117, 216, 255, 0.22);
}

.starfighter-contact-indicator.is-alien .starfighter-contact-crosshair::before {
  box-shadow: 0 0 0.8rem rgba(255, 180, 84, 0.24);
}

.starfighter-contact-crosshair::after {
  width: 1.25rem;
  height: 0.12rem;
  box-shadow: 0 0 0.8rem rgba(117, 216, 255, 0.22);
}

.starfighter-contact-indicator.is-alien .starfighter-contact-crosshair::after {
  box-shadow: 0 0 0.8rem rgba(255, 180, 84, 0.24);
}

.starfighter-contact-copy {
  position: absolute;
  display: grid;
  gap: 0.14rem;
  min-width: max-content;
  max-width: 10rem;
  padding: 0.38rem 0.58rem;
  border: 1px solid var(--contact-border);
  border-radius: 0.82rem;
  background:
    linear-gradient(135deg, var(--contact-tint), transparent 70%),
    rgba(5, 9, 18, 0.76);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.starfighter-contact-indicator.is-align-right .starfighter-contact-copy {
  left: 0.95rem;
}

.starfighter-contact-indicator.is-align-left .starfighter-contact-copy {
  right: 0.95rem;
  text-align: right;
}

.starfighter-contact-indicator.is-above .starfighter-contact-copy {
  bottom: calc(100% + 0.35rem + var(--marker-stagger, 0rem));
}

.starfighter-contact-indicator.is-below .starfighter-contact-copy {
  top: calc(100% + 0.35rem + var(--marker-stagger, 0rem));
}

.starfighter-contact-copy strong,
.starfighter-contact-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.starfighter-contact-copy strong {
  color: rgba(248, 241, 229, 0.96);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.starfighter-contact-copy span {
  color: rgba(191, 213, 233, 0.84);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.starfighter-lock-bracket {
  --lock-color: rgba(117, 216, 255, 0.9);
  --lock-border: rgba(117, 216, 255, 0.24);
  position: absolute;
  width: 6.6rem;
  height: 6.6rem;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 1.1rem rgba(117, 216, 255, 0.2));
  animation: starfighterLockPulse 1.9s ease-in-out infinite;
}

.starfighter-lock-bracket.is-alien {
  --lock-color: rgba(255, 180, 84, 0.94);
  --lock-border: rgba(255, 180, 84, 0.24);
  filter: drop-shadow(0 0 1.1rem rgba(255, 180, 84, 0.22));
}

.starfighter-lock-corner {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  border-color: var(--lock-color);
  border-style: solid;
  border-width: 0;
}

.starfighter-lock-corner.is-top-left {
  top: 0;
  left: 0;
  border-top-width: 2px;
  border-left-width: 2px;
  border-top-left-radius: 0.75rem;
}

.starfighter-lock-corner.is-top-right {
  top: 0;
  right: 0;
  border-top-width: 2px;
  border-right-width: 2px;
  border-top-right-radius: 0.75rem;
}

.starfighter-lock-corner.is-bottom-left {
  bottom: 0;
  left: 0;
  border-bottom-width: 2px;
  border-left-width: 2px;
  border-bottom-left-radius: 0.75rem;
}

.starfighter-lock-corner.is-bottom-right {
  right: 0;
  bottom: 0;
  border-right-width: 2px;
  border-bottom-width: 2px;
  border-bottom-right-radius: 0.75rem;
}

.starfighter-lock-copy {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%);
  display: grid;
  gap: 0.18rem;
  min-width: max-content;
  max-width: 12rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--lock-border);
  border-radius: 0.8rem;
  background: rgba(5, 9, 18, 0.82);
  backdrop-filter: blur(10px);
  text-align: center;
}

.starfighter-lock-copy strong,
.starfighter-lock-copy span {
  display: block;
  white-space: nowrap;
}

.starfighter-lock-copy strong {
  color: rgba(248, 241, 229, 0.96);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.starfighter-lock-copy span {
  color: rgba(191, 213, 233, 0.84);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.starfighter-lead-pip {
  --lead-color: rgba(142, 240, 168, 0.92);
  position: absolute;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid rgba(142, 240, 168, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0.9rem rgba(142, 240, 168, 0.2);
  animation: starfighterLeadPulse 1.2s ease-in-out infinite;
}

.starfighter-lead-pip::before,
.starfighter-lead-pip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--lead-color);
  transform: translate(-50%, -50%);
}

.starfighter-lead-pip::before {
  width: 0.14rem;
  height: 1.1rem;
}

.starfighter-lead-pip::after {
  width: 1.1rem;
  height: 0.14rem;
}

.starfighter-edge-indicators {
  position: absolute;
  inset: 0;
}

.starfighter-edge-indicator {
  --edge-color: rgba(117, 216, 255, 0.94);
  --edge-border: rgba(117, 216, 255, 0.2);
  --edge-tint: rgba(117, 216, 255, 0.1);
  position: absolute;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: radial-gradient(circle, var(--edge-tint) 0%, rgba(5, 9, 18, 0) 70%);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px var(--edge-border), 0 0 1rem rgba(117, 216, 255, 0.16);
}

.starfighter-edge-indicator.is-alien {
  --edge-color: rgba(255, 180, 84, 0.94);
  --edge-border: rgba(255, 180, 84, 0.2);
  --edge-tint: rgba(255, 180, 84, 0.1);
}

.starfighter-edge-indicator.is-primary {
  box-shadow: 0 0 0 1px var(--edge-border), 0 0 0 0.12rem rgba(117, 216, 255, 0.08), 0 0 1.1rem rgba(117, 216, 255, 0.22);
}

.starfighter-edge-indicator strong,
.starfighter-edge-indicator span:not(.starfighter-edge-arrow) {
  display: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.starfighter-edge-indicator strong {
  color: rgba(248, 241, 229, 0.96);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.starfighter-edge-indicator span {
  color: rgba(191, 213, 233, 0.8);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.starfighter-edge-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  border-top: 2px solid var(--edge-color);
  border-right: 2px solid var(--edge-color);
  transform: translate(-50%, -50%) rotate(var(--indicator-angle, 45deg));
}

.starfighter-reticle,
.starfighter-threat-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.starfighter-threat-vignette {
  background:
    radial-gradient(circle at center, rgba(5, 10, 18, 0) 42%, rgba(8, 16, 28, 0.14) 66%, rgba(10, 18, 30, 0.42) 100%);
  opacity: 0.52;
  transition: opacity 0.22s ease, background 0.22s ease;
}

.starfighter-reticle {
  z-index: 1;
}

.starfighter-reticle-ring,
.starfighter-reticle-line,
.starfighter-reticle-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.starfighter-reticle-ring {
  width: 4.8rem;
  height: 4.8rem;
  border: 1px solid rgba(117, 216, 255, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 1.4rem rgba(117, 216, 255, 0.08);
}

.starfighter-reticle-line {
  background: rgba(117, 216, 255, 0.42);
  box-shadow: 0 0 1rem rgba(117, 216, 255, 0.16);
}

.starfighter-reticle-line.is-top,
.starfighter-reticle-line.is-bottom {
  width: 1px;
  height: 0.95rem;
}

.starfighter-reticle-line.is-left,
.starfighter-reticle-line.is-right {
  width: 0.95rem;
  height: 1px;
}

.starfighter-reticle-line.is-top {
  margin-top: -3.1rem;
}

.starfighter-reticle-line.is-bottom {
  margin-top: 3.1rem;
}

.starfighter-reticle-line.is-left {
  margin-left: -3.1rem;
}

.starfighter-reticle-line.is-right {
  margin-left: 3.1rem;
}

.starfighter-reticle-core {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: rgba(248, 241, 229, 0.92);
  box-shadow: 0 0 0.85rem rgba(255, 255, 255, 0.3);
}

.starfighter-viewport .board-scene-hint {
  left: auto;
  right: 1rem;
  width: min(29rem, max(16rem, calc(100% - 24.5rem)));
}

.starfighter-mobile-controls {
  position: relative;
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(117, 216, 255, 0.16);
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, rgba(9, 15, 27, 0.82), rgba(5, 9, 18, 0.9)),
    rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.starfighter-scene-shell {
  position: relative;
}

.starfighter-scene-toolbar {
  align-items: center;
  justify-content: flex-end;
}

.starfighter-scene-toolbar .secondary-action.slim {
  border-color: rgba(117, 216, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(10, 18, 31, 0.9), rgba(5, 9, 18, 0.92)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.starfighter-scene-toolbar .secondary-action.slim:hover,
.starfighter-scene-toolbar .secondary-action.slim:focus-visible {
  border-color: rgba(117, 216, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.08rem rgba(117, 216, 255, 0.08);
}

.starfighter-scene-toolbar [data-role="view-toggle"] {
  min-width: 7.2rem;
}

#starfighter-arena-root[data-audio-state="live"] [data-role="audio-toggle"] {
  border-color: rgba(117, 216, 255, 0.3);
  box-shadow: 0 0 0 0.08rem rgba(117, 216, 255, 0.08);
}

#starfighter-arena-root[data-audio-state="muted"] [data-role="audio-toggle"] {
  border-color: rgba(255, 255, 255, 0.14);
  opacity: 0.82;
}

.starfighter-controls-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.45rem 0.8rem;
}

.starfighter-controls-header strong {
  color: rgba(248, 241, 229, 0.98);
  font-size: 1.08rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.starfighter-controls-header span {
  color: rgba(191, 213, 233, 0.76);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.starfighter-control-console {
  display: grid;
  gap: 0.9rem;
}

.starfighter-control-bay {
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding: 0.95rem;
  border: 1px solid rgba(117, 216, 255, 0.16);
  border-radius: 1.2rem;
  background:
    linear-gradient(180deg, rgba(9, 16, 29, 0.94), rgba(5, 9, 18, 0.92)),
    linear-gradient(135deg, rgba(117, 216, 255, 0.07), rgba(0, 0, 0, 0) 62%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 0.08rem rgba(117, 216, 255, 0.05),
    0 18px 32px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.starfighter-control-bay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0) 36%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, rgba(0, 0, 0, 0) 1px 14px);
  opacity: 0.5;
  pointer-events: none;
}

.starfighter-control-bay-attitude {
  border-color: rgba(117, 216, 255, 0.18);
}

.starfighter-control-bay-systems {
  border-color: rgba(136, 230, 255, 0.18);
}

.starfighter-control-bay-weapons {
  border-color: rgba(255, 180, 84, 0.22);
}

.starfighter-control-bay-heading {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.12rem;
}

.starfighter-control-bay-label {
  color: rgba(191, 213, 233, 0.68);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.starfighter-control-bay-heading strong {
  color: rgba(248, 241, 229, 0.97);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.starfighter-attitude-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    ". pitch-up ."
    "roll-left core roll-right"
    "yaw-left pitch-down yaw-right";
  gap: 0.7rem;
  align-items: stretch;
}

.starfighter-attitude-core {
  grid-area: core;
  position: relative;
  min-height: 8.2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(117, 216, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(117, 216, 255, 0.16), rgba(0, 0, 0, 0) 56%),
    linear-gradient(180deg, rgba(117, 216, 255, 0.08), rgba(255, 180, 84, 0.04)),
    rgba(5, 10, 18, 0.86);
  box-shadow:
    inset 0 0 1.2rem rgba(117, 216, 255, 0.08),
    0 0 1.6rem rgba(117, 216, 255, 0.08);
}

.starfighter-attitude-ring,
.starfighter-attitude-line,
.starfighter-attitude-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.starfighter-attitude-ring {
  border: 1px solid rgba(117, 216, 255, 0.26);
  border-radius: 50%;
}

.starfighter-attitude-ring.is-outer {
  width: 76%;
  height: 76%;
}

.starfighter-attitude-ring.is-inner {
  width: 42%;
  height: 42%;
  border-color: rgba(255, 180, 84, 0.24);
}

.starfighter-attitude-line.is-vertical {
  width: 1px;
  height: 72%;
  background: linear-gradient(180deg, rgba(117, 216, 255, 0), rgba(117, 216, 255, 0.72), rgba(117, 216, 255, 0));
}

.starfighter-attitude-line.is-horizontal {
  width: 72%;
  height: 1px;
  background: linear-gradient(90deg, rgba(117, 216, 255, 0), rgba(117, 216, 255, 0.72), rgba(117, 216, 255, 0));
}

.starfighter-attitude-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(248, 241, 229, 0.96);
  box-shadow:
    0 0 1rem rgba(248, 241, 229, 0.32),
    0 0 0 0.2rem rgba(117, 216, 255, 0.08);
}

.starfighter-systems-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.starfighter-weapons-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.7rem;
}

.starfighter-control-button {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.46rem;
  min-height: 6.3rem;
  padding: 0.95rem 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top, rgba(117, 216, 255, 0.18), rgba(0, 0, 0, 0) 48%),
    rgba(7, 13, 24, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -0.4rem 1rem rgba(0, 0, 0, 0.16);
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  touch-action: manipulation;
  user-select: none;
}

.starfighter-control-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  transform: translate(-50%, 0.35rem);
  min-width: max-content;
  max-width: 10rem;
  padding: 0.38rem 0.6rem;
  border: 1px solid rgba(117, 216, 255, 0.18);
  border-radius: 0.7rem;
  background: rgba(4, 8, 16, 0.92);
  color: rgba(248, 241, 229, 0.96);
  font-size: 0.8rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 2;
}

.starfighter-control-button:hover,
.starfighter-control-button:focus-visible,
.starfighter-control-button.is-active {
  transform: translateY(-1px) scale(1.01);
  border-color: rgba(117, 216, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at top, rgba(117, 216, 255, 0.28), rgba(0, 0, 0, 0) 52%),
    rgba(117, 216, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 0.08rem rgba(117, 216, 255, 0.08),
    0 0.9rem 1.8rem rgba(0, 0, 0, 0.22);
}

.starfighter-control-bay-weapons .starfighter-control-button,
.starfighter-control-button.fire-control {
  border-color: rgba(255, 180, 84, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top, rgba(255, 180, 84, 0.18), rgba(0, 0, 0, 0) 48%),
    rgba(10, 12, 22, 0.86);
}

.starfighter-control-bay-weapons .starfighter-control-button:hover,
.starfighter-control-bay-weapons .starfighter-control-button:focus-visible,
.starfighter-control-bay-weapons .starfighter-control-button.is-active,
.starfighter-control-button.fire-control:hover,
.starfighter-control-button.fire-control:focus-visible,
.starfighter-control-button.fire-control.is-active {
  border-color: rgba(255, 180, 84, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at top, rgba(255, 180, 84, 0.32), rgba(0, 0, 0, 0) 52%),
    rgba(255, 180, 84, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 0.08rem rgba(255, 180, 84, 0.08),
    0 0.9rem 1.8rem rgba(0, 0, 0, 0.22);
}

.starfighter-control-button.afterburner-control {
  border-color: rgba(117, 216, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at top, rgba(117, 216, 255, 0.2), rgba(0, 0, 0, 0) 48%),
    linear-gradient(180deg, rgba(117, 216, 255, 0.08), rgba(255, 190, 122, 0.08));
}

.starfighter-control-button.afterburner-control:hover,
.starfighter-control-button.afterburner-control:focus-visible,
.starfighter-control-button.afterburner-control.is-active {
  border-color: rgba(255, 214, 150, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at top, rgba(255, 214, 150, 0.34), rgba(0, 0, 0, 0) 52%),
    linear-gradient(180deg, rgba(117, 216, 255, 0.14), rgba(255, 180, 84, 0.16));
}

.starfighter-control-wide {
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr;
  justify-items: start;
  text-align: left;
  min-height: 4.7rem;
  padding-inline: 1rem;
}

.starfighter-control-wide img {
  width: 3.2rem;
}

.starfighter-control-wide .starfighter-control-copy {
  justify-items: start;
}

.starfighter-control-button:hover::after,
.starfighter-control-button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.starfighter-control-button img {
  width: min(100%, 3.2rem);
  max-height: 2.8rem;
  height: auto;
  filter: drop-shadow(0 0 0.9rem rgba(117, 216, 255, 0.18));
  pointer-events: none;
}

.starfighter-control-copy {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  pointer-events: none;
}

.starfighter-control-label {
  color: rgba(248, 241, 229, 0.94);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.starfighter-control-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  padding: 0.12rem 0.5rem;
  border: 1px solid rgba(117, 216, 255, 0.22);
  border-radius: 999px;
  background: rgba(117, 216, 255, 0.08);
  color: rgba(248, 241, 229, 0.88);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.starfighter-control-roll-left {
  grid-area: roll-left;
}

.starfighter-control-pitch-up {
  grid-area: pitch-up;
}

.starfighter-control-roll-right {
  grid-area: roll-right;
}

.starfighter-control-yaw-left {
  grid-area: yaw-left;
}

.starfighter-control-pitch-down {
  grid-area: pitch-down;
}

.starfighter-control-yaw-right {
  grid-area: yaw-right;
}

.starfighter-control-thrust {
  grid-column: 1 / 2;
}

.starfighter-control-brake {
  grid-column: 2 / 3;
}

.starfighter-control-fire {
  grid-column: 1 / -1;
}

.starfighter-controls-utility-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.starfighter-controls-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.74);
  color: rgba(191, 213, 233, 0.84);
  backdrop-filter: blur(10px);
}

.starfighter-controls-hint-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.starfighter-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.starfighter-sidebar {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.starfighter-scanner {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.8rem;
  border: 1px solid rgba(117, 216, 255, 0.18);
  border-radius: 1rem;
  background:
    radial-gradient(circle at center, rgba(117, 216, 255, 0.06), transparent 55%),
    #071120;
}

.starfighter-scoreboard,
.starfighter-contacts {
  gap: 0.7rem;
}

.starfighter-scoreboard .player-card,
.starfighter-contacts .player-card {
  background: rgba(255, 255, 255, 0.03);
}

#starfighter-arena-root[data-flight-state="solo"] .starfighter-panel {
  border-color: rgba(142, 240, 168, 0.28);
  box-shadow: 0 0 0 0.1rem rgba(142, 240, 168, 0.06), var(--shadow);
}

#starfighter-arena-root[data-flight-state="solo"] .starfighter-callout {
  color: #0b1a12;
  background: linear-gradient(135deg, rgba(142, 240, 168, 0.94), rgba(117, 216, 255, 0.86));
  border-color: rgba(142, 240, 168, 0.48);
}

#starfighter-arena-root[data-flight-state="combat"] .starfighter-panel {
  border-color: rgba(255, 180, 84, 0.28);
  box-shadow: 0 0 0 0.1rem rgba(255, 180, 84, 0.06), var(--shadow);
}

#starfighter-arena-root[data-threat-state="watch"] .starfighter-threat-chip strong,
#starfighter-arena-root[data-threat-state="watch"] .starfighter-focus-distance {
  color: #ffe6bf;
}

#starfighter-arena-root[data-threat-state="watch"] .starfighter-focus-distance {
  border-color: rgba(255, 180, 84, 0.26);
  background: rgba(255, 180, 84, 0.12);
}

#starfighter-arena-root[data-threat-state="watch"] .starfighter-tactical-panel {
  border-color: rgba(255, 180, 84, 0.22);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22), 0 0 0 0.08rem rgba(255, 180, 84, 0.08);
}

#starfighter-arena-root[data-threat-state="watch"] .starfighter-lock-bracket {
  --lock-color: rgba(255, 180, 84, 0.92);
  --lock-border: rgba(255, 180, 84, 0.24);
}

#starfighter-arena-root[data-threat-state="watch"] .starfighter-lead-pip {
  --lead-color: rgba(255, 219, 150, 0.92);
  border-color: rgba(255, 219, 150, 0.8);
  box-shadow: 0 0 0.9rem rgba(255, 219, 150, 0.2);
}

#starfighter-arena-root[data-threat-state="watch"] .starfighter-threat-vignette {
  background:
    radial-gradient(circle at center, rgba(16, 10, 5, 0) 42%, rgba(73, 36, 15, 0.12) 68%, rgba(95, 52, 18, 0.3) 100%);
  opacity: 0.62;
}

#starfighter-arena-root[data-threat-state="watch"] .starfighter-reticle-ring {
  border-color: rgba(255, 180, 84, 0.34);
  box-shadow: 0 0 1rem rgba(255, 180, 84, 0.14);
}

#starfighter-arena-root[data-threat-state="watch"] .starfighter-reticle-line {
  background: rgba(255, 180, 84, 0.42);
  box-shadow: 0 0 1rem rgba(255, 180, 84, 0.14);
}

#starfighter-arena-root[data-weapon-state="ready"] .starfighter-weapon-chip strong {
  color: #ffe4b8;
}

#starfighter-arena-root[data-afterburner-state="ready"] .starfighter-afterburner-chip strong {
  color: #c9f3ff;
}

#starfighter-arena-root[data-afterburner-state="ready"] .starfighter-afterburner-bar span {
  opacity: 0.94;
}

#starfighter-arena-root[data-afterburner-state="primed"] .starfighter-afterburner-chip {
  border-color: rgba(196, 243, 255, 0.28);
  box-shadow: inset 0 0 0 0.05rem rgba(196, 243, 255, 0.08);
}

#starfighter-arena-root[data-afterburner-state="primed"] .starfighter-afterburner-chip strong {
  color: #eefcff;
}

#starfighter-arena-root[data-afterburner-state="primed"] .starfighter-afterburner-bar span {
  opacity: 1;
}

#starfighter-arena-root[data-afterburner-state="burning"] .starfighter-afterburner-chip {
  border-color: rgba(255, 198, 132, 0.32);
  box-shadow: inset 0 0 0 0.05rem rgba(255, 198, 132, 0.1), 0 0 1.2rem rgba(255, 180, 84, 0.12);
}

#starfighter-arena-root[data-afterburner-state="burning"] .starfighter-afterburner-chip strong {
  color: #ffe3be;
}

#starfighter-arena-root[data-afterburner-state="burning"] .starfighter-afterburner-bar span {
  background: linear-gradient(90deg, rgba(255, 180, 84, 0.92), rgba(255, 243, 214, 0.96));
  box-shadow: 0 0 1.2rem rgba(255, 180, 84, 0.32);
}

#starfighter-arena-root[data-afterburner-state="recharging"] .starfighter-afterburner-chip strong {
  color: #9fe7ff;
}

#starfighter-arena-root[data-afterburner-state="reforming"] .starfighter-afterburner-chip strong,
#starfighter-arena-root[data-afterburner-state="offline"] .starfighter-afterburner-chip strong {
  color: rgba(191, 213, 233, 0.8);
}

#starfighter-arena-root[data-afterburner-state="reforming"] .starfighter-afterburner-bar span,
#starfighter-arena-root[data-afterburner-state="offline"] .starfighter-afterburner-bar span {
  box-shadow: none;
  background: rgba(191, 213, 233, 0.34);
}

#starfighter-arena-root[data-weapon-state="ready"] .starfighter-weapon-bar span {
  opacity: 0.94;
}

#starfighter-arena-root[data-weapon-state="primed"] .starfighter-reticle-core {
  box-shadow: 0 0 1rem rgba(255, 220, 168, 0.42);
}

#starfighter-arena-root[data-weapon-state="primed"] .starfighter-weapon-chip strong {
  color: #fff0d6;
}

#starfighter-arena-root[data-weapon-state="cycling"] .starfighter-reticle-ring {
  border-color: rgba(255, 180, 84, 0.48);
  box-shadow: 0 0 1.2rem rgba(255, 180, 84, 0.18);
  animation: starfighterWeaponBloom 0.18s ease-out;
}

#starfighter-arena-root[data-weapon-state="cycling"] .starfighter-reticle-line {
  background: rgba(255, 180, 84, 0.56);
  box-shadow: 0 0 1rem rgba(255, 180, 84, 0.24);
}

#starfighter-arena-root[data-weapon-state="cycling"] .starfighter-reticle-core {
  background: rgba(255, 236, 214, 0.98);
  box-shadow: 0 0 1.2rem rgba(255, 180, 84, 0.42);
}

#starfighter-arena-root[data-weapon-state="cycling"] .starfighter-weapon-chip {
  border-color: rgba(255, 180, 84, 0.26);
  box-shadow: inset 0 0 0 0.05rem rgba(255, 180, 84, 0.08);
}

#starfighter-arena-root[data-weapon-state="cycling"] .starfighter-weapon-chip strong {
  color: #ffd4a1;
}

#starfighter-arena-root[data-weapon-state="cycling"] .starfighter-weapon-bar span {
  opacity: 1;
}

#starfighter-arena-root[data-weapon-state="heating"] .starfighter-reticle-ring {
  border-color: rgba(255, 164, 102, 0.42);
  box-shadow: 0 0 1.2rem rgba(255, 164, 102, 0.18);
}

#starfighter-arena-root[data-weapon-state="heating"] .starfighter-reticle-line {
  background: rgba(255, 164, 102, 0.52);
  box-shadow: 0 0 1rem rgba(255, 164, 102, 0.2);
}

#starfighter-arena-root[data-weapon-state="heating"] .starfighter-weapon-chip {
  border-color: rgba(255, 164, 102, 0.26);
  box-shadow: inset 0 0 0 0.05rem rgba(255, 164, 102, 0.08);
}

#starfighter-arena-root[data-weapon-state="heating"] .starfighter-weapon-chip strong {
  color: #ffd1a6;
}

#starfighter-arena-root[data-weapon-state="heating"] .starfighter-weapon-bar span {
  background: linear-gradient(90deg, rgba(255, 214, 133, 0.92), rgba(255, 132, 76, 0.96));
  box-shadow: 0 0 1.1rem rgba(255, 148, 86, 0.28);
  opacity: 1;
}

#starfighter-arena-root[data-weapon-state="venting"] .starfighter-reticle-ring {
  border-color: rgba(255, 121, 121, 0.48);
  box-shadow: 0 0 1.3rem rgba(255, 121, 121, 0.22);
  animation: starfighterWeaponVentPulse 0.48s ease-in-out infinite;
}

#starfighter-arena-root[data-weapon-state="venting"] .starfighter-reticle-line {
  background: rgba(255, 121, 121, 0.56);
  box-shadow: 0 0 1rem rgba(255, 121, 121, 0.22);
}

#starfighter-arena-root[data-weapon-state="venting"] .starfighter-reticle-core {
  background: rgba(255, 232, 214, 0.98);
  box-shadow: 0 0 1.25rem rgba(255, 121, 121, 0.36);
}

#starfighter-arena-root[data-weapon-state="venting"] .starfighter-weapon-chip {
  border-color: rgba(255, 121, 121, 0.28);
  box-shadow: inset 0 0 0 0.05rem rgba(255, 121, 121, 0.08), 0 0 1rem rgba(255, 121, 121, 0.08);
}

#starfighter-arena-root[data-weapon-state="venting"] .starfighter-weapon-chip strong {
  color: #ffbfab;
}

#starfighter-arena-root[data-weapon-state="venting"] .starfighter-weapon-bar span {
  background: linear-gradient(90deg, rgba(255, 111, 111, 0.92), rgba(255, 183, 112, 0.96));
  box-shadow: 0 0 1.2rem rgba(255, 111, 111, 0.28);
  opacity: 0.96;
}

#starfighter-arena-root[data-weapon-state="reforming"] .starfighter-weapon-chip strong,
#starfighter-arena-root[data-weapon-state="offline"] .starfighter-weapon-chip strong {
  color: rgba(191, 213, 233, 0.8);
}

#starfighter-arena-root[data-weapon-state="reforming"] .starfighter-weapon-bar span,
#starfighter-arena-root[data-weapon-state="offline"] .starfighter-weapon-bar span {
  box-shadow: none;
  background: rgba(191, 213, 233, 0.34);
}

#starfighter-arena-root[data-threat-state="hot"] .starfighter-threat-chip strong,
#starfighter-arena-root[data-threat-state="hot"] .starfighter-focus-distance {
  color: #ffd1ca;
}

#starfighter-arena-root[data-threat-state="hot"] .starfighter-focus-distance {
  border-color: rgba(255, 118, 118, 0.32);
  background: rgba(255, 118, 118, 0.12);
}

#starfighter-arena-root[data-threat-state="hot"] .starfighter-tactical-panel {
  border-color: rgba(255, 118, 118, 0.26);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22), 0 0 0 0.08rem rgba(255, 118, 118, 0.1);
}

#starfighter-arena-root[data-threat-state="hot"] .starfighter-lock-bracket {
  --lock-color: rgba(255, 128, 128, 0.94);
  --lock-border: rgba(255, 128, 128, 0.26);
}

#starfighter-arena-root[data-threat-state="hot"] .starfighter-lead-pip {
  --lead-color: rgba(255, 196, 196, 0.92);
  border-color: rgba(255, 196, 196, 0.82);
  box-shadow: 0 0 0.9rem rgba(255, 196, 196, 0.2);
}

#starfighter-arena-root[data-threat-state="hot"] .starfighter-threat-vignette {
  background:
    radial-gradient(circle at center, rgba(28, 10, 10, 0) 40%, rgba(112, 34, 34, 0.18) 70%, rgba(118, 34, 34, 0.42) 100%);
  opacity: 0.78;
}

#starfighter-arena-root[data-threat-state="hot"] .starfighter-reticle-ring {
  border-color: rgba(255, 118, 118, 0.42);
  box-shadow: 0 0 1rem rgba(255, 118, 118, 0.2);
}

#starfighter-arena-root[data-threat-state="hot"] .starfighter-reticle-line {
  background: rgba(255, 118, 118, 0.5);
  box-shadow: 0 0 1rem rgba(255, 118, 118, 0.2);
}

#starfighter-arena-root .starfighter-scene-shell:fullscreen,
#starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "viewport toolbar"
    "viewport controls";
  align-items: start;
  gap: 1rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 50% 12%, rgba(117, 216, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(4, 8, 16, 0.98), rgba(4, 8, 16, 1));
  border: 0;
  border-radius: 0;
  overflow: auto;
}

#starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-viewport,
#starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-viewport {
  grid-area: viewport;
  min-height: 0;
  height: calc(100vh - 2rem);
}

#starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-scene-toolbar,
#starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-scene-toolbar {
  grid-area: toolbar;
  margin: 0;
}

#starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-scene-toolbar > *,
#starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-scene-toolbar > * {
  width: auto;
}

#starfighter-arena-root .starfighter-scene-shell:fullscreen .board-scene-hint,
#starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .board-scene-hint {
  right: 1rem;
  max-width: min(30rem, calc(100% - 2rem));
}

#starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-tactical-stack,
#starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-tactical-stack {
  bottom: 1rem;
  max-width: min(23rem, calc(100% - 2rem));
}

#starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-mobile-controls,
#starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-mobile-controls {
  grid-area: controls;
  margin-top: 0;
  max-width: none;
  align-self: start;
}

#starfighter-arena-root[data-flight-state="combat"] .starfighter-callout {
  color: #fff4e6;
  border-color: rgba(255, 180, 84, 0.42);
  background: linear-gradient(135deg, rgba(132, 58, 24, 0.95), rgba(255, 126, 72, 0.38));
  animation: activityPulse 1.8s ease-in-out infinite;
}

#starfighter-arena-root[data-flight-state="respawning"] .starfighter-callout {
  color: #fff4e6;
  border-color: rgba(255, 141, 141, 0.42);
  background: linear-gradient(135deg, rgba(103, 27, 27, 0.95), rgba(255, 141, 141, 0.38));
}

#starfighter-arena-root[data-flight-state="offline"] .starfighter-callout {
  color: #ffe6e6;
  border-color: rgba(255, 141, 141, 0.3);
  background: rgba(104, 31, 31, 0.52);
}

@media (max-width: 991.98px) {
  .game-shell-grid {
    grid-template-columns: 1fr;
  }

  .game-page-hero,
  .site-header-inner,
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-page-hero.has-artwork .game-page-hero-artwork {
    width: 100%;
    max-width: none;
    min-height: 11rem;
  }

  .board-viewport,
  .board-canvas {
    min-height: 28rem;
  }

  .starfighter-viewport {
    min-height: 34rem;
  }

  .tic-tac-stage,
  .connect-four-stage {
    min-height: 28rem;
  }

  .twixt-stage {
    min-height: 32rem;
  }
}

@media (max-width: 767.98px) {
  .site-header {
    padding-top: 1rem;
  }

  .brand-mark {
    width: 3rem;
    height: 3rem;
  }

  .landing-hero,
  .game-page-hero,
  .game-board-panel,
  .game-room-panel,
  .game-card,
  .help-card,
  .instruction-panel {
    padding: 1.25rem;
  }

  .share-link {
    grid-template-columns: 1fr;
  }

  .card-grid-overlay {
    padding: 0.75rem;
  }

  .age-gate-panel-overlay {
    width: 100%;
    margin-top: 0;
  }

  .game-page-hero-compact {
    padding: 0.9rem 1rem;
  }

  .match-meta-bar {
    grid-template-columns: 1fr;
  }

  .compact-player-list {
    grid-template-columns: 1fr;
  }

  .compact-rematch {
    justify-self: stretch;
  }

  .board-viewport,
  .board-canvas {
    min-height: 23rem;
  }

  .starfighter-viewport {
    min-height: 24rem;
  }

  .scene-toolbar > button {
    width: 100%;
  }

  .starfighter-scene-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-player-coin-flip-card {
    padding: 1.2rem;
  }

  .two-player-coin-flip-coin {
    width: 7.5rem;
    height: 7.5rem;
  }

  .two-player-coin-flip-face {
    font-size: 2.75rem;
  }

  .board-scene-hint {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    font-size: 0.88rem;
  }

  .tic-tac-stage {
    min-height: 24rem;
    padding: 1rem 0.8rem;
  }

  .connect-four-stage {
    min-height: 24rem;
    padding: 0.95rem 0.55rem;
  }

  .connect-four-board-shell {
    padding: 0.7rem;
    border-radius: 1.4rem;
  }

  .connect-four-board-shell::before {
    inset: 0.38rem;
    border-radius: 1rem;
  }

  .connect-four-board-shell::after {
    left: 1rem;
    right: 1rem;
    bottom: 0.45rem;
  }

  .connect-four-lane-bar {
    gap: 0.32rem;
    margin-bottom: 0.45rem;
  }

  .connect-four-lane-button {
    min-height: 1.42rem;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }

  .twixt-stage {
    min-height: 25rem;
    padding: 0.85rem 0.65rem;
  }

  .tic-tac-grid {
    width: min(100%, 18rem);
    gap: 0.65rem;
  }

  .tic-tac-cell {
    min-height: 5rem;
    border-radius: 1.1rem;
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .connect-four-grid {
    gap: 0.32rem;
    padding: 0.55rem;
    border-radius: 1.15rem;
  }

  .connect-four-cell {
    min-height: 2.8rem;
    border-radius: 0.78rem;
  }

  .connect-four-cell::after {
    inset: 0.34rem;
  }

  .twixt-board {
    width: min(100%, 22rem);
    border-radius: 1.1rem;
  }

  .twixt-hole::after {
    width: 0.56rem;
    height: 0.56rem;
  }

  .starfighter-controls-header {
    align-items: flex-start;
  }

  .starfighter-control-button {
    min-height: 5.6rem;
    padding: 0.8rem 0.4rem 0.7rem;
  }

  .starfighter-tactical-stack {
    width: min(100%, calc(100% - 1.5rem));
    bottom: 0.75rem;
    left: 0.75rem;
  }

  .starfighter-tactical-panel {
    padding: 0.8rem 0.85rem;
  }

  .starfighter-focus-distance {
    min-width: 4.2rem;
    font-size: 0.82rem;
  }

  .starfighter-contact-crosshair {
    width: 1.1rem;
    height: 1.1rem;
  }

  .starfighter-contact-crosshair::before {
    height: 1rem;
  }

  .starfighter-contact-crosshair::after {
    width: 1rem;
  }

  .starfighter-contact-copy {
    max-width: 8rem;
    padding: 0.32rem 0.48rem;
  }

  .starfighter-contact-copy strong {
    font-size: 0.66rem;
  }

  .starfighter-contact-copy span {
    font-size: 0.6rem;
  }

  .starfighter-control-label {
    font-size: 0.76rem;
  }

  .starfighter-control-key {
    font-size: 0.68rem;
  }

  .starfighter-hud-strip {
    gap: 0.5rem;
  }

  .starfighter-hud-chip {
    min-width: calc(50% - 0.3rem);
    padding: 0.65rem 0.75rem;
  }

  .starfighter-reticle {
    display: none;
  }

  .starfighter-lock-bracket,
  .starfighter-lead-pip {
    display: none;
  }

  .starfighter-edge-indicator {
    min-width: 0;
    max-width: none;
    padding: 0;
  }

  .starfighter-viewport .board-scene-hint {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    bottom: auto;
    top: 0.75rem;
    margin-top: 5.7rem;
  }

  .starfighter-stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .site-nav {
    width: 100%;
  }

  .hero-actions > *,
  .hero-actions a,
  .hero-actions button,
  .site-nav a {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  #starfighter-arena-root .starfighter-scene-shell:fullscreen,
  #starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, auto) auto auto;
    grid-template-areas:
      "viewport"
      "toolbar"
      "controls";
  }

  #starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-viewport,
  #starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-viewport {
    height: min(64vh, 34rem);
  }

  #starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-tactical-stack,
  #starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-tactical-stack {
    max-width: none;
  }
}

@media (min-width: 768px) {
  .starfighter-scene-shell {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18.75rem, 21rem);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "viewport toolbar"
      "viewport controls";
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(117, 216, 255, 0.14);
    border-radius: 1.35rem;
    background:
      radial-gradient(circle at 50% 12%, rgba(117, 216, 255, 0.16), transparent 28%),
      linear-gradient(180deg, rgba(4, 8, 16, 0.96), rgba(4, 8, 16, 0.99));
    overflow: hidden;
  }

  .starfighter-viewport {
    grid-area: viewport;
    min-height: 42rem;
  }

  .starfighter-scene-toolbar {
    grid-area: toolbar;
    margin: 0;
  }

  .starfighter-scene-toolbar > * {
    width: auto;
  }

  .starfighter-mobile-controls {
    display: grid;
    grid-area: controls;
    gap: 0.8rem;
    margin-top: 0;
    padding: 0.8rem;
    border-radius: 1.2rem;
    max-width: none;
    align-self: start;
  }

  .starfighter-controls-utility-bar {
    justify-content: flex-start;
  }

  .starfighter-control-console {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .starfighter-control-bay-attitude {
    grid-column: auto;
    grid-row: auto;
  }

  .starfighter-control-bay-systems {
    grid-column: auto;
    grid-row: auto;
  }

  .starfighter-control-bay-weapons {
    grid-column: auto;
    grid-row: auto;
  }

  .starfighter-control-bay {
    padding: 0.85rem;
  }

  .starfighter-attitude-grid,
  .starfighter-systems-grid,
  .starfighter-weapons-grid {
    gap: 0.55rem;
  }

  .starfighter-attitude-core {
    min-height: 6.8rem;
  }

  .starfighter-control-button {
    gap: 0.32rem;
    min-height: 4.9rem;
    padding: 0.72rem 0.46rem 0.66rem;
    border-radius: 0.92rem;
  }

  .starfighter-control-button::after {
    bottom: calc(100% + 0.35rem);
    font-size: 0.72rem;
  }

  .starfighter-control-button img,
  .starfighter-control-wide img {
    width: min(100%, 2.25rem);
    max-height: 2rem;
  }

  .starfighter-control-label {
    display: block;
    font-size: 0.68rem;
  }

  .starfighter-control-key {
    min-height: 1.28rem;
    padding: 0.08rem 0.34rem;
    font-size: 0.64rem;
    letter-spacing: 0.04em;
  }

  .starfighter-control-wide {
    min-height: 4.3rem;
    padding-inline: 0.8rem;
  }

  .starfighter-viewport .board-scene-hint {
    right: 1rem;
    width: auto;
    max-width: min(30rem, calc(100% - 2rem));
  }

  #starfighter-arena-root .starfighter-scene-shell:fullscreen,
  #starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen {
    grid-template-columns: minmax(0, 1fr) minmax(19.5rem, 22.5rem);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "viewport toolbar"
      "viewport controls";
  }

  #starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-control-console,
  #starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-control-console {
    grid-template-columns: 1fr;
  }

  #starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-control-bay-attitude,
  #starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-control-bay-attitude,
  #starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-control-bay-systems,
  #starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-control-bay-systems,
  #starfighter-arena-root .starfighter-scene-shell:fullscreen .starfighter-control-bay-weapons,
  #starfighter-arena-root .starfighter-scene-shell:-webkit-full-screen .starfighter-control-bay-weapons {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 767.98px) {
  body.starfighter-route .page-shell-fluid {
    padding: 0.75rem;
  }

  body.starfighter-route .starfighter-command-bar {
    align-items: flex-start;
  }
}

@media (min-width: 768px) {
  body.starfighter-route {
    overflow: hidden;
  }

  body.starfighter-route .site-main {
    min-height: 100vh;
    height: 100vh;
  }

  body.starfighter-route .page-shell-fluid {
    height: 100vh;
    padding: 0.9rem;
  }

  body.starfighter-route .starfighter-page {
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    height: calc(100vh - 1.8rem);
  }

  body.starfighter-route .starfighter-briefing-panel {
    display: none;
  }

  body.starfighter-route #starfighter-arena-root,
  body.starfighter-route .game-shell-grid,
  body.starfighter-route .starfighter-panel,
  body.starfighter-route .starfighter-sidebar,
  body.starfighter-route .starfighter-scene-shell {
    min-height: 0;
  }

  body.starfighter-route #starfighter-arena-root {
    display: grid;
  }

  body.starfighter-route .game-shell-grid {
    grid-template-columns: minmax(0, 1fr) clamp(20.5rem, 23vw, 25.5rem);
    gap: 0.9rem;
    margin-top: 0;
    height: 100%;
    min-height: 0;
    align-items: stretch;
  }

  body.starfighter-route .starfighter-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    overflow: visible;
  }

  body.starfighter-route .starfighter-panel .status-stack {
    grid-template-columns: auto minmax(14rem, 24rem) minmax(16rem, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    margin: 0 0 0.8rem;
    padding: 0.78rem 0.95rem;
    border: 1px solid rgba(117, 216, 255, 0.16);
    border-radius: 1.35rem;
    background:
      linear-gradient(180deg, rgba(8, 14, 25, 0.94), rgba(4, 8, 16, 0.96)),
      linear-gradient(135deg, rgba(117, 216, 255, 0.08), rgba(0, 0, 0, 0) 58%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 24px 48px rgba(0, 0, 0, 0.3);
  }

  body.starfighter-route .starfighter-panel .status-headline {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-panel .status-copy {
    min-height: 0;
    font-size: 0.88rem;
    line-height: 1.35;
  }

  body.starfighter-route .starfighter-panel .status-chip {
    min-height: 2.3rem;
    padding-inline: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-panel .starfighter-callout {
    justify-self: end;
    min-height: 2.9rem;
    padding-inline: 1.1rem;
    white-space: nowrap;
  }

  body.starfighter-route .starfighter-scene-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(20rem, 22vw, 24.5rem);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "viewport toolbar"
      "viewport controls";
    gap: 0.95rem;
    height: 100%;
    padding: 1.1rem;
    border: 1px solid rgba(117, 216, 255, 0.16);
    border-radius: 1.6rem;
    background:
      radial-gradient(circle at 50% 0, rgba(117, 216, 255, 0.16), transparent 24%),
      linear-gradient(180deg, rgba(5, 10, 19, 0.98), rgba(3, 7, 14, 1));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      inset 0 0 0 1px rgba(117, 216, 255, 0.04),
      0 32px 64px rgba(0, 0, 0, 0.36);
    overflow: hidden;
  }

  body.starfighter-route .starfighter-scene-shell::before,
  body.starfighter-route .starfighter-scene-shell::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }

  body.starfighter-route .starfighter-scene-shell::before {
    inset: 0;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0) 34%),
      linear-gradient(90deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 12%, rgba(0, 0, 0, 0) 88%, rgba(255, 180, 84, 0.05));
    opacity: 0.9;
  }

  body.starfighter-route .starfighter-scene-shell::after {
    inset: 0.7rem;
    border: 1px solid rgba(117, 216, 255, 0.08);
    border-radius: 1.2rem;
    box-shadow: inset 0 0 2rem rgba(117, 216, 255, 0.04);
  }

  body.starfighter-route .starfighter-viewport {
    min-height: 0;
    height: 100%;
    border-radius: 1.35rem;
    box-shadow:
      inset 0 0 4rem rgba(117, 216, 255, 0.08),
      0 18px 36px rgba(0, 0, 0, 0.3);
  }

  body.starfighter-route .starfighter-scene-toolbar {
    position: relative;
    z-index: 2;
    gap: 0.65rem;
    margin: 0;
  }

  body.starfighter-route .starfighter-scene-toolbar .secondary-action.slim {
    min-height: 3rem;
    padding-inline: 1.1rem;
  }

  body.starfighter-route .starfighter-mobile-controls {
    grid-area: controls;
    align-self: stretch;
    gap: 0.95rem;
    margin-top: 0;
    padding: 1rem;
    border-radius: 1.35rem;
    border-color: rgba(117, 216, 255, 0.18);
    background:
      linear-gradient(180deg, rgba(8, 14, 25, 0.96), rgba(4, 8, 16, 0.98)),
      linear-gradient(145deg, rgba(117, 216, 255, 0.08), rgba(0, 0, 0, 0) 58%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 20px 36px rgba(0, 0, 0, 0.26);
  }

  body.starfighter-route .starfighter-controls-header strong {
    font-size: 1.14rem;
  }

  body.starfighter-route .starfighter-controls-header span {
    font-size: 0.78rem;
  }

  body.starfighter-route .starfighter-control-console {
    gap: 1rem;
    grid-template-columns: 1fr;
  }

  body.starfighter-route .starfighter-control-bay {
    padding: 1rem;
    border-radius: 1.28rem;
  }

  body.starfighter-route .starfighter-attitude-grid,
  body.starfighter-route .starfighter-systems-grid,
  body.starfighter-route .starfighter-weapons-grid {
    gap: 0.7rem;
  }

  body.starfighter-route .starfighter-attitude-core {
    min-height: 8rem;
  }

  body.starfighter-route .starfighter-control-button {
    gap: 0.42rem;
    min-height: 6rem;
    padding: 0.92rem 0.62rem 0.82rem;
    border-radius: 1rem;
  }

  body.starfighter-route .starfighter-control-button img,
  body.starfighter-route .starfighter-control-wide img {
    width: min(100%, 3rem);
    max-height: 2.6rem;
  }

  body.starfighter-route .starfighter-control-label {
    display: block;
    font-size: 0.78rem;
  }

  body.starfighter-route .starfighter-control-key {
    min-height: 1.45rem;
    padding: 0.12rem 0.45rem;
    font-size: 0.7rem;
  }

  body.starfighter-route .starfighter-control-wide {
    min-height: 4.9rem;
    padding-inline: 1rem;
  }

  body.starfighter-route .starfighter-sidebar {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.95rem;
    padding: 1rem;
    border: 1px solid rgba(117, 216, 255, 0.16);
    border-radius: 1.55rem;
    background:
      linear-gradient(180deg, rgba(8, 14, 25, 0.96), rgba(4, 8, 16, 0.98)),
      linear-gradient(180deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 28%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 24px 48px rgba(0, 0, 0, 0.32);
    max-height: 100%;
    overflow: auto;
  }

  body.starfighter-route .starfighter-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(120deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0) 34%),
      repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.014) 0 1px, rgba(0, 0, 0, 0) 1px 15px);
    pointer-events: none;
  }

  body.starfighter-route .starfighter-sidebar > * {
    position: relative;
    z-index: 1;
  }

  body.starfighter-route .starfighter-stat-grid {
    gap: 0.75rem;
  }

  body.starfighter-route .starfighter-scanner {
    margin-top: 0.65rem;
  }
}

@media (min-width: 768px) {
  body.starfighter-route .page-shell-fluid {
    padding: 0.35rem;
  }

  body.starfighter-route .starfighter-page {
    gap: 0;
    height: calc(100vh - 0.7rem);
  }

  body.starfighter-route .starfighter-command-bar {
    display: none;
  }

  body.starfighter-route #starfighter-arena-root,
  body.starfighter-route .game-shell-grid {
    height: 100%;
  }

  body.starfighter-route .game-shell-grid {
    position: relative;
    display: block;
  }

  body.starfighter-route .starfighter-panel {
    position: relative;
    height: 100%;
    display: block;
  }

  body.starfighter-route .starfighter-panel .status-stack {
    position: absolute;
    top: 0.95rem;
    left: 1rem;
    right: calc(clamp(16.5rem, 17vw, 18rem) + 2rem);
    z-index: 6;
    display: grid;
    grid-template-columns: auto minmax(12rem, 18rem) minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    margin: 0;
    padding: 0.72rem 0.9rem;
    border: 1px solid rgba(117, 216, 255, 0.14);
    border-radius: 1.15rem;
    background:
      linear-gradient(180deg, rgba(5, 9, 17, 0.92), rgba(4, 8, 15, 0.82)),
      linear-gradient(135deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 55%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 16px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
  }

  body.starfighter-route .starfighter-panel .status-chip {
    min-height: 2rem;
    padding: 0.28rem 0.9rem;
    border-radius: 999px;
    letter-spacing: 0.12em;
  }

  body.starfighter-route .starfighter-panel .status-headline {
    font-size: 0.95rem;
    letter-spacing: 0.11em;
  }

  body.starfighter-route .starfighter-panel .status-copy {
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(225, 234, 245, 0.78);
  }

  body.starfighter-route .starfighter-panel .starfighter-callout {
    min-height: 2.45rem;
    padding-inline: 1rem;
    border-color: rgba(117, 216, 255, 0.18);
    background:
      linear-gradient(135deg, rgba(117, 216, 255, 0.18), rgba(142, 240, 168, 0.22)),
      rgba(255, 255, 255, 0.04);
    color: #effff7;
    box-shadow: 0 0 1.4rem rgba(117, 216, 255, 0.14);
  }

  body.starfighter-route .starfighter-scene-shell {
    position: relative;
    display: block;
    height: 100%;
    padding: 0;
    border: 1px solid rgba(117, 216, 255, 0.18);
    border-radius: 1.55rem;
    background:
      radial-gradient(circle at 50% 0, rgba(117, 216, 255, 0.18), transparent 24%),
      linear-gradient(180deg, rgba(4, 8, 15, 0.98), rgba(2, 6, 12, 1));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      inset 0 0 0 1px rgba(117, 216, 255, 0.04),
      0 32px 70px rgba(0, 0, 0, 0.38);
    overflow: hidden;
  }

  body.starfighter-route .starfighter-scene-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(90deg, rgba(117, 216, 255, 0.08), rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0) 90%, rgba(255, 180, 84, 0.08)),
      linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0) 32%);
    pointer-events: none;
  }

  body.starfighter-route .starfighter-viewport {
    position: relative;
    min-height: 100%;
    height: 100%;
    border-radius: 1.5rem;
    overflow: hidden;
  }

  body.starfighter-route .starfighter-viewport::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
      linear-gradient(135deg, rgba(0, 0, 0, 0) 0 7%, rgba(118, 229, 255, 0.75) 7% 17%, rgba(0, 0, 0, 0) 17% 73%, rgba(0, 0, 0, 0) 73%),
      linear-gradient(-135deg, rgba(0, 0, 0, 0) 0 7%, rgba(118, 229, 255, 0.75) 7% 17%, rgba(0, 0, 0, 0) 17% 73%, rgba(0, 0, 0, 0) 73%),
      linear-gradient(180deg, rgba(67, 104, 151, 0.4), rgba(0, 0, 0, 0) 18%);
    background-repeat: no-repeat;
    background-size:
      18rem 2.1rem,
      18rem 2.1rem,
      100% 18%;
    background-position:
      1.4rem 1.2rem,
      calc(100% - 1.4rem) 1.2rem,
      0 0;
    pointer-events: none;
    opacity: 0.9;
  }

  body.starfighter-route .starfighter-cockpit-overlay {
    opacity: 0.84;
    filter: drop-shadow(0 0 1rem rgba(117, 216, 255, 0.12));
  }

  body.starfighter-route .starfighter-cockpit-overlay::before {
    background:
      radial-gradient(circle at 50% 42%, rgba(117, 216, 255, 0.1), transparent 40%),
      linear-gradient(180deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 15%, rgba(255, 180, 84, 0.05) 84%, rgba(0, 0, 0, 0) 100%),
      repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.014) 0 1px, rgba(0, 0, 0, 0) 1px 10px);
  }

  body.starfighter-route .starfighter-cockpit-arch {
    left: 7%;
    right: 7%;
    top: 2.8rem;
    height: 16%;
    border-width: 2px;
  }

  body.starfighter-route .starfighter-cockpit-strut {
    top: 9%;
    bottom: 14%;
    width: clamp(1.15rem, 1.8vw, 1.8rem);
    border-width: 2px;
  }

  body.starfighter-route .starfighter-cockpit-strut.is-left {
    left: 4.4%;
  }

  body.starfighter-route .starfighter-cockpit-strut.is-right {
    right: 4.4%;
  }

  body.starfighter-route .starfighter-cockpit-panel {
    left: 13%;
    right: 13%;
    bottom: 0;
    height: 15%;
    border-width: 2px;
  }

  body.starfighter-route .starfighter-scene-toolbar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 7;
    display: flex;
    gap: 0.55rem;
    margin: 0;
  }

  body.starfighter-route .starfighter-scene-toolbar .secondary-action.slim {
    min-height: 2.4rem;
    padding-inline: 0.9rem;
    border-radius: 999px;
    font-size: 0.86rem;
    backdrop-filter: blur(12px);
  }

  body.starfighter-route .starfighter-hud-strip {
    top: 5.8rem;
    left: 1.15rem;
    right: calc(clamp(16.5rem, 17vw, 18rem) + 2rem);
    gap: 0.55rem;
    max-width: none;
  }

  body.starfighter-route .starfighter-hud-chip {
    min-width: 6.2rem;
    padding: 0.58rem 0.72rem;
    border-radius: 0.9rem;
    background:
      linear-gradient(180deg, rgba(6, 11, 20, 0.82), rgba(6, 11, 20, 0.68)),
      rgba(255, 255, 255, 0.03);
  }

  body.starfighter-route .starfighter-hud-chip span {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  body.starfighter-route .starfighter-hud-chip strong {
    margin-top: 0.26rem;
    font-size: 0.96rem;
    letter-spacing: 0.03em;
  }

  body.starfighter-route .starfighter-tactical-stack {
    left: 1.15rem;
    bottom: 1.1rem;
    width: min(17.5rem, calc(100% - clamp(16.5rem, 17vw, 18rem) - 24rem));
    gap: 0.55rem;
  }

  body.starfighter-route .starfighter-tactical-panel {
    padding: 0.75rem 0.88rem;
    border-radius: 0.95rem;
  }

  body.starfighter-route .starfighter-tactical-label {
    font-size: 0.65rem;
  }

  body.starfighter-route .starfighter-tactical-panel strong {
    font-size: 0.88rem;
  }

  body.starfighter-route .starfighter-tactical-note,
  body.starfighter-route .starfighter-focus-meta {
    font-size: 0.74rem;
  }

  body.starfighter-route .starfighter-focus-distance {
    min-width: 4.1rem;
    padding: 0.36rem 0.55rem;
    font-size: 0.78rem;
  }

  body.starfighter-route .starfighter-mobile-controls {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    z-index: 7;
    width: min(52rem, calc(100% - clamp(16.5rem, 17vw, 18rem) - 4rem));
    max-width: 52rem;
    transform: translateX(-50%);
    gap: 0.7rem;
    margin: 0;
    padding: 0.85rem 1rem 0.9rem;
    border: 1px solid rgba(117, 216, 255, 0.18);
    border-radius: 1.25rem;
    background:
      linear-gradient(180deg, rgba(5, 9, 17, 0.94), rgba(4, 8, 15, 0.84)),
      linear-gradient(145deg, rgba(117, 216, 255, 0.08), rgba(0, 0, 0, 0) 58%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 22px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
  }

  body.starfighter-route .starfighter-controls-header {
    align-items: center;
  }

  body.starfighter-route .starfighter-controls-header strong {
    font-size: 1.02rem;
    letter-spacing: 0.1em;
  }

  body.starfighter-route .starfighter-controls-header span {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }

  body.starfighter-route .starfighter-control-console {
    grid-template-columns: minmax(17rem, 1.5fr) minmax(10rem, 0.9fr) minmax(9rem, 0.78fr);
    gap: 0.75rem;
    align-items: stretch;
  }

  body.starfighter-route .starfighter-control-bay-attitude {
    grid-column: 1 / 2;
  }

  body.starfighter-route .starfighter-control-bay-systems {
    grid-column: 2 / 3;
  }

  body.starfighter-route .starfighter-control-bay-weapons {
    grid-column: 3 / 4;
  }

  body.starfighter-route .starfighter-control-bay {
    gap: 0.65rem;
    padding: 0.82rem;
    border-radius: 1.05rem;
  }

  body.starfighter-route .starfighter-control-bay-heading strong {
    font-size: 0.92rem;
  }

  body.starfighter-route .starfighter-attitude-grid,
  body.starfighter-route .starfighter-systems-grid,
  body.starfighter-route .starfighter-weapons-grid {
    gap: 0.55rem;
  }

  body.starfighter-route .starfighter-attitude-core {
    min-height: 7.2rem;
  }

  body.starfighter-route .starfighter-control-button {
    min-height: 5.2rem;
    padding: 0.75rem 0.42rem 0.65rem;
    border-radius: 0.95rem;
  }

  body.starfighter-route .starfighter-control-button img,
  body.starfighter-route .starfighter-control-wide img {
    width: min(100%, 2.4rem);
    max-height: 2.1rem;
  }

  body.starfighter-route .starfighter-control-label {
    font-size: 0.68rem;
  }

  body.starfighter-route .starfighter-control-key {
    min-height: 1.2rem;
    padding: 0.08rem 0.35rem;
    font-size: 0.62rem;
  }

  body.starfighter-route .starfighter-control-wide {
    min-height: 4.15rem;
    padding-inline: 0.75rem;
  }

  body.starfighter-route .starfighter-controls-utility-bar {
    display: none;
  }

  body.starfighter-route .starfighter-sidebar {
    position: absolute;
    top: 4.4rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 7;
    width: clamp(16.5rem, 17vw, 18rem);
    display: grid;
    align-content: start;
    gap: 0.7rem;
    padding: 0.8rem;
    border-radius: 1.2rem;
    border-color: rgba(117, 216, 255, 0.18);
    background:
      linear-gradient(180deg, rgba(5, 9, 17, 0.94), rgba(4, 8, 15, 0.84)),
      linear-gradient(180deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 28%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 20px 36px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
    overflow: auto;
  }

  body.starfighter-route .starfighter-sidebar .room-metric,
  body.starfighter-route .starfighter-sidebar .player-card {
    padding: 0.72rem 0.8rem;
    border-radius: 0.95rem;
    border-color: rgba(117, 216, 255, 0.12);
    background:
      linear-gradient(180deg, rgba(12, 20, 34, 0.84), rgba(7, 12, 22, 0.88)),
      rgba(255, 255, 255, 0.03);
  }

  body.starfighter-route .starfighter-sidebar .room-metric span,
  body.starfighter-route .starfighter-sidebar .field-label,
  body.starfighter-route .starfighter-sidebar .share-feedback {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-sidebar .room-metric strong {
    margin-top: 0.32rem;
    font-size: 0.98rem;
    letter-spacing: 0.03em;
  }

  body.starfighter-route .starfighter-sidebar .share-link {
    gap: 0.5rem;
  }

  body.starfighter-route .starfighter-sidebar .share-link input {
    padding: 0.72rem 0.82rem;
    border-radius: 0.88rem;
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.03);
  }

  body.starfighter-route .starfighter-sidebar .secondary-action.slim {
    min-height: 2.55rem;
    padding-inline: 0.85rem;
  }

  body.starfighter-route .starfighter-sidebar .player-list {
    gap: 0.55rem;
  }

  body.starfighter-route .starfighter-sidebar .starfighter-scoreboard {
    max-height: 7.25rem;
    overflow: auto;
  }

  body.starfighter-route .starfighter-sidebar .starfighter-contacts {
    max-height: 10rem;
    overflow: auto;
  }

  body.starfighter-route .starfighter-sidebar .player-card strong {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-sidebar .player-card span,
  body.starfighter-route .starfighter-sidebar .player-card .player-state {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }

  body.starfighter-route .starfighter-sidebar .starfighter-scanner {
    margin-top: 0.4rem;
    border-radius: 0.9rem;
  }
}

#dots-and-boxes-root {
  --dots-accent: #7fe6ff;
  --dots-accent-strong: #9ff8b1;
  --dots-panel: linear-gradient(180deg, rgba(10, 18, 33, 0.94), rgba(6, 10, 18, 0.96));
  --dots-board-glow: rgba(127, 230, 255, 0.22);
  --dots-line-open: rgba(255, 255, 255, 0.14);
  --dots-line-idle: rgba(255, 255, 255, 0.48);
}

.dots-shell-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(19rem, 0.9fr);
  align-items: start;
}

.dots-board-panel,
.dots-room-panel,
.dots-side-card,
.dots-order-strip,
.dots-winner-banner {
  background: var(--dots-panel);
}

.dots-board-panel {
  display: grid;
  gap: 1rem;
}

.dots-room-panel {
  padding: 1rem;
}

.dots-side-stack {
  display: grid;
  gap: 0.95rem;
}

.dots-side-card {
  border: 1px solid rgba(127, 230, 255, 0.12);
  border-radius: 1.15rem;
  padding: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dots-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.dots-field {
  display: grid;
  gap: 0.42rem;
}

.dots-field span {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dots-field select,
.dots-field input[type="text"],
.dots-field input[type="color"] {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
}

.dots-field select {
  color-scheme: dark;
}

.dots-field select option {
  background: #111827;
  color: var(--text-main);
}

.dots-field select option:disabled {
  color: rgba(247, 247, 247, 0.45);
}

.dots-field input[type="color"] {
  padding: 0.3rem;
}

.dots-action-row,
.dots-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.dots-name-editor {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dots-order-strip {
  border: 1px solid rgba(127, 230, 255, 0.14);
  border-radius: 1.1rem;
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.7rem;
}

.dots-order-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dots-order-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dots-order-chip {
  min-width: 9.25rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--player-color) 24%, rgba(255, 255, 255, 0.04)) 0%, rgba(7, 11, 18, 0.95) 72%);
  display: grid;
  gap: 0.2rem;
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.dots-order-chip strong {
  font-size: 0.92rem;
}

.dots-order-number {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dots-order-chip.is-hidden {
  opacity: 0.38;
  filter: saturate(0.3);
}

.dots-order-chip.is-picking {
  border-color: color-mix(in srgb, var(--player-color) 60%, white);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--player-color) 18%, transparent);
  animation: dotsRevealPulse 0.27s ease-in-out infinite;
}

.dots-order-chip.is-revealed {
  transform: translateY(-1px);
}

.dots-board-scene {
  position: relative;
  border: 1px solid rgba(127, 230, 255, 0.12);
  border-radius: 1.3rem;
  padding: 1rem;
  background:
    radial-gradient(circle at top, rgba(127, 230, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(11, 22, 44, 0.96), rgba(5, 8, 15, 0.98));
}

.dots-board-stage {
  min-height: 24rem;
  position: relative;
  overflow: hidden;
}

.dots-board {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
}

.dots-board-placeholder {
  min-height: 20rem;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dots-node {
  position: absolute;
  border-radius: 0;
  background: linear-gradient(145deg, #ffffff 0%, #cbe2ff 38%, #79b9ff 100%);
  box-shadow:
    0 0 0 0.18rem rgba(127, 230, 255, 0.08),
    0 0 0.7rem rgba(127, 230, 255, 0.18);
}

.dots-line {
  position: absolute;
  border: 0;
  padding: 0;
  margin: 0;
  background: var(--dots-line-open);
  border-radius: 0;
  cursor: default;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.dots-line.is-playable {
  cursor: pointer;
  background: color-mix(in srgb, var(--dots-accent) 22%, rgba(255, 255, 255, 0.06));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(127, 230, 255, 0.05);
}

.dots-line.is-playable:hover,
.dots-line.is-playable:focus-visible {
  transform: scale(1.05);
  background: color-mix(in srgb, var(--dots-accent) 42%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 0 0 0.26rem rgba(127, 230, 255, 0.12);
}

.dots-line.is-claimed {
  background: var(--player-color, var(--dots-line-idle));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 0.75rem color-mix(in srgb, var(--player-color, #7fe6ff) 30%, transparent);
}

.dots-line.is-pending {
  opacity: 0.7;
}

.dots-line.is-recent {
  animation: dotsLineBlink 0.75s steps(1, end) both;
  will-change: opacity, box-shadow, filter, transform;
}

.dots-box-fill {
  position: absolute;
  border-radius: 0;
  background: transparent;
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.dots-box-fill.is-filled {
  background: color-mix(in srgb, var(--player-color, #7fe6ff) 44%, rgba(255, 255, 255, 0.04));
  border-color: color-mix(in srgb, var(--player-color, #7fe6ff) 58%, rgba(255, 255, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.dots-box-fill.is-fading-in {
  animation: dotsBoxFill 0.5s linear both;
  will-change: opacity;
}

.dots-box-owner {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.dots-winner-banner {
  position: absolute;
  inset: 1rem 1rem auto;
  z-index: 2;
  border: 1px solid rgba(127, 230, 255, 0.2);
  border-radius: 1.2rem;
  padding: 1rem 1.15rem;
  display: grid;
  gap: 0.2rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--player-color, #7fe6ff) 18%, rgba(6, 10, 18, 0.95)) 0%, rgba(6, 10, 18, 0.95) 70%);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.32);
}

.dots-winner-banner span,
.dots-winner-banner em {
  color: var(--text-muted);
}

.dots-winner-banner strong {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.dots-winner-banner.is-tie {
  --player-color: #ffe27a;
}

.dots-player-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  position: relative;
  overflow: hidden;
}

.dots-player-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.3rem;
  background: var(--player-color, var(--dots-accent));
}

.dots-player-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}

.dots-player-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: var(--player-color, var(--dots-accent));
  box-shadow: 0 0 0.6rem color-mix(in srgb, var(--player-color, #7fe6ff) 34%, transparent);
}

.dots-player-card-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dots-player-card.is-winner {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--player-color) 46%, transparent);
}

.dots-player-card.is-turn-owner {
  transform: translateY(-1px);
}

#dots-and-boxes-root[data-turn-state="your-turn"] .dots-board-panel {
  box-shadow: 0 0 0 1px rgba(127, 230, 255, 0.16), 0 0 2rem rgba(127, 230, 255, 0.1);
}

#dots-and-boxes-root[data-turn-state="your-turn"] .turn-callout {
  color: #07131e;
  background: linear-gradient(135deg, #99efff, #d4fff0);
}

#dots-and-boxes-root[data-turn-state="bot-turn"] .turn-callout,
#dots-and-boxes-root[data-turn-state="watching"] .turn-callout,
#dots-and-boxes-root[data-turn-state="locked"] .turn-callout {
  background: linear-gradient(135deg, rgba(255, 182, 95, 0.94), rgba(255, 229, 144, 0.92));
  color: #1a1204;
}

@keyframes dotsRevealPulse {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes boardMoveBlink {
  0%,
  10%,
  20%,
  30%,
  40%,
  50%,
  60%,
  70%,
  80% {
    transform: translateY(-2px) scale(1.03);
    filter: saturate(1.18) brightness(1.14);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 0 0 0.16rem rgba(255, 222, 156, 0.18),
      0 0 1.6rem rgba(255, 210, 120, 0.26);
  }

  10.01%,
  20.01%,
  30.01%,
  40.01%,
  50.01%,
  60.01%,
  70.01%,
  80.01%,
  90.01% {
    transform: translateY(0) scale(1);
    filter: none;
  }

  100% {
    transform: translateY(0) scale(1);
    filter: none;
  }
}

@keyframes connectFourMovePulse {
  0% {
    transform: translateY(-0.22rem) scale(0.92);
    filter: saturate(1.18) brightness(1.08);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 0 0 0.12rem rgba(255, 222, 156, 0.12),
      0 0 0.9rem rgba(255, 210, 120, 0.16);
  }

  38% {
    transform: translateY(0.08rem) scale(1.05);
    filter: saturate(1.28) brightness(1.16);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 0 0.18rem rgba(255, 222, 156, 0.18),
      0 0 1.35rem rgba(255, 210, 120, 0.24);
  }

  68% {
    transform: translateY(-0.03rem) scale(0.99);
    filter: saturate(1.08) brightness(1.04);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 0 0 0.1rem rgba(255, 222, 156, 0.1),
      0 0 0.85rem rgba(255, 210, 120, 0.14);
  }

  100% {
    transform: translateY(0) scale(1);
    filter: none;
  }
}

@keyframes twixtPegBlink {
  0%,
  10%,
  20%,
  30%,
  40%,
  50%,
  60%,
  70%,
  80% {
    transform: translate(-50%, -50%) scale(1.18);
    filter: saturate(1.18) brightness(1.12);
    box-shadow:
      0 0 0 0.14rem rgba(255, 235, 192, 0.46),
      0 0 1.05rem rgba(255, 205, 126, 0.34);
  }

  10.01%,
  20.01%,
  30.01%,
  40.01%,
  50.01%,
  60.01%,
  70.01%,
  80.01%,
  90.01% {
    transform: translate(-50%, -50%) scale(1);
    filter: none;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    filter: none;
  }
}

@keyframes twixtPendingPegPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1.04);
    filter: saturate(1.02);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.12);
    filter: saturate(1.12) brightness(1.06);
  }
}

@keyframes twixtHoverCursorPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

@keyframes dotsLineBlink {
  0%,
  10%,
  20%,
  30%,
  40%,
  50%,
  60%,
  70%,
  80% {
    opacity: 1;
    transform: scale(1.08);
    filter: saturate(1.25) brightness(1.28);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.12),
      0 0 1.15rem color-mix(in srgb, var(--player-color, #7fe6ff) 86%, white),
      0 0 1.75rem color-mix(in srgb, var(--player-color, #7fe6ff) 72%, transparent);
  }

  10.01%,
  20.01%,
  30.01%,
  40.01%,
  50.01%,
  60.01%,
  70.01%,
  80.01%,
  90% {
    opacity: 0.05;
    transform: scale(0.96);
    filter: saturate(0.65) brightness(0.7);
    box-shadow: none;
  }

  100% {
    opacity: 1;
    transform: scale(1);
    filter: none;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.05),
      0 0 0.75rem color-mix(in srgb, var(--player-color, #7fe6ff) 30%, transparent);
  }
}

@keyframes dotsBoxFill {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .dots-shell-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dots-room-panel {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
}

@media (max-width: 720px) {
  .dots-setup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dots-order-chip {
    min-width: 0;
    width: 100%;
  }

  .dots-board-scene {
    padding: 0.7rem;
    overflow: auto;
  }

  .dots-winner-banner {
    position: static;
    margin-bottom: 0.8rem;
  }
}

/* Starfighter Edge HUD Final Override */
@media (min-width: 768px) {
  body.starfighter-route,
  body.starfighter-route .site-main-immersive,
  body.starfighter-route .page-shell-fluid,
  body.starfighter-route .starfighter-page,
  body.starfighter-route #starfighter-arena-root,
  body.starfighter-route .game-shell-grid,
  body.starfighter-route .starfighter-panel,
  body.starfighter-route .starfighter-scene-shell,
  body.starfighter-route .starfighter-viewport {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding: 0;
  }

  body.starfighter-route {
    overflow: hidden;
    background: #030711;
  }

  body.starfighter-route .starfighter-command-bar,
  body.starfighter-route .starfighter-briefing-panel {
    display: none;
  }

  body.starfighter-route #starfighter-arena-root {
    --sf-top-height: clamp(4.3rem, 7.4vh, 5rem);
    --sf-bottom-height: clamp(13rem, 24vh, 15rem);
    --sf-left-width: clamp(15.5rem, 18vw, 18rem);
    --sf-right-width: clamp(16.5rem, 18vw, 19rem);
    position: fixed;
    inset: 0;
  }

  body.starfighter-route .game-shell-grid,
  body.starfighter-route .starfighter-panel,
  body.starfighter-route .starfighter-scene-shell,
  body.starfighter-route .starfighter-viewport {
    position: absolute;
    inset: 0;
    display: block;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.starfighter-route .starfighter-scene-shell {
    overflow: hidden;
    background:
      radial-gradient(circle at 50% 8%, rgba(117, 216, 255, 0.18), transparent 26%),
      linear-gradient(180deg, rgba(4, 8, 16, 0.96), rgba(2, 5, 11, 1));
  }

  body.starfighter-route .starfighter-viewport::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
      linear-gradient(135deg, rgba(0, 0, 0, 0) 0 8%, rgba(116, 236, 255, 0.84) 8% 18%, rgba(0, 0, 0, 0) 18% 100%),
      linear-gradient(-135deg, rgba(0, 0, 0, 0) 0 8%, rgba(116, 236, 255, 0.84) 8% 18%, rgba(0, 0, 0, 0) 18% 100%),
      linear-gradient(180deg, rgba(88, 138, 196, 0.42), rgba(0, 0, 0, 0) 18%);
    background-repeat: no-repeat;
    background-size:
      19rem 2.05rem,
      19rem 2.05rem,
      100% 18%;
    background-position:
      1.4rem 1rem,
      calc(100% - 1.4rem) 1rem,
      0 0;
    pointer-events: none;
    opacity: 0.92;
  }

  body.starfighter-route .starfighter-cockpit-overlay {
    opacity: 0.9;
  }

  body.starfighter-route .starfighter-cockpit-arch {
    left: 6%;
    right: 6%;
    top: 2.55rem;
    height: 17%;
    border-width: 2px;
  }

  body.starfighter-route .starfighter-cockpit-strut {
    top: 8%;
    bottom: 14%;
    width: clamp(1.15rem, 1.7vw, 1.7rem);
    border-width: 2px;
  }

  body.starfighter-route .starfighter-cockpit-strut.is-left {
    left: 4%;
  }

  body.starfighter-route .starfighter-cockpit-strut.is-right {
    right: 4%;
  }

  body.starfighter-route .starfighter-cockpit-panel {
    left: 12%;
    right: 12%;
    bottom: 0;
    height: 16%;
    border-width: 2px;
  }

  body.starfighter-route .starfighter-hud {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: block;
    margin: 0;
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-frame {
    display: block;
    position: absolute;
    inset: 0;
  }

  body.starfighter-route .starfighter-hud-frame-line,
  body.starfighter-route .starfighter-hud-frame-corner {
    position: absolute;
    display: block;
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-frame-line.is-top,
  body.starfighter-route .starfighter-hud-frame-line.is-bottom {
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(118, 236, 255, 0), rgba(118, 236, 255, 0.95) 12%, rgba(118, 236, 255, 0.95) 88%, rgba(118, 236, 255, 0));
    box-shadow: 0 0 14px rgba(118, 236, 255, 0.3);
  }

  body.starfighter-route .starfighter-hud-frame-line.is-top {
    top: 0;
  }

  body.starfighter-route .starfighter-hud-frame-line.is-bottom {
    bottom: 0;
  }

  body.starfighter-route .starfighter-hud-frame-line.is-left,
  body.starfighter-route .starfighter-hud-frame-line.is-right {
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(118, 236, 255, 0), rgba(118, 236, 255, 0.95) 12%, rgba(118, 236, 255, 0.95) 88%, rgba(118, 236, 255, 0));
    box-shadow: 0 0 14px rgba(118, 236, 255, 0.3);
  }

  body.starfighter-route .starfighter-hud-frame-line.is-left {
    left: 0;
  }

  body.starfighter-route .starfighter-hud-frame-line.is-right {
    right: 0;
  }

  body.starfighter-route .starfighter-hud-frame-corner {
    width: 6rem;
    height: 6rem;
    border-color: rgba(118, 236, 255, 0.88);
    box-shadow: 0 0 16px rgba(118, 236, 255, 0.2);
  }

  body.starfighter-route .starfighter-hud-frame-corner.is-top-left {
    top: 0;
    left: 0;
    border-top: 2px solid rgba(118, 236, 255, 0.88);
    border-left: 2px solid rgba(118, 236, 255, 0.88);
    clip-path: polygon(0 0, 100% 0, 66% 34%, 34% 34%, 34% 66%, 0 100%);
  }

  body.starfighter-route .starfighter-hud-frame-corner.is-top-right {
    top: 0;
    right: 0;
    border-top: 2px solid rgba(118, 236, 255, 0.88);
    border-right: 2px solid rgba(118, 236, 255, 0.88);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 66% 66%, 66% 34%, 34% 34%);
  }

  body.starfighter-route .starfighter-hud-frame-corner.is-bottom-left {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid rgba(118, 236, 255, 0.88);
    border-left: 2px solid rgba(118, 236, 255, 0.88);
    clip-path: polygon(0 0, 34% 34%, 34% 66%, 66% 66%, 100% 100%, 0 100%);
  }

  body.starfighter-route .starfighter-hud-frame-corner.is-bottom-right {
    right: 0;
    bottom: 0;
    border-right: 2px solid rgba(118, 236, 255, 0.88);
    border-bottom: 2px solid rgba(118, 236, 255, 0.88);
    clip-path: polygon(34% 34%, 66% 34%, 66% 66%, 100% 100%, 0 100%, 100% 0);
  }

  body.starfighter-route .starfighter-hud-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: minmax(17rem, 1fr) minmax(20rem, 40vw) minmax(17rem, 1fr);
    align-items: start;
    gap: 0.7rem;
  }

  body.starfighter-route .starfighter-status-stack,
  body.starfighter-route .starfighter-status-brief,
  body.starfighter-route .starfighter-top-utility,
  body.starfighter-route .starfighter-mobile-controls,
  body.starfighter-route .starfighter-sidebar,
  body.starfighter-route .starfighter-status-rail {
    pointer-events: auto;
  }

  body.starfighter-route .starfighter-hud-module,
  body.starfighter-route .starfighter-mobile-controls,
  body.starfighter-route .starfighter-sidebar,
  body.starfighter-route .starfighter-status-rail {
    border: 1px solid rgba(117, 216, 255, 0.16);
    background:
      linear-gradient(180deg, rgba(6, 11, 20, 0.94), rgba(4, 8, 15, 0.82)),
      linear-gradient(135deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 58%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 18px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
  }

  body.starfighter-route .starfighter-status-stack {
    display: grid;
    gap: 0.35rem;
    min-height: var(--sf-top-height);
    padding: 0.72rem 1rem 0.78rem;
    border-top: 0;
    border-left: 0;
    border-radius: 0 0 1rem 0;
  }

  body.starfighter-route .starfighter-status-stack .status-headline {
    margin: 0;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-status-brief {
    min-height: calc(var(--sf-top-height) - 0.7rem);
    padding: 0.7rem 1rem 0.8rem;
    border-top: 0;
    border-radius: 0 0 1rem 1rem;
  }

  body.starfighter-route .starfighter-status-brief .status-copy {
    min-height: 0;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
    text-align: center;
  }

  body.starfighter-route .starfighter-hud-top-right {
    display: grid;
    gap: 0.55rem;
    justify-items: end;
  }

  body.starfighter-route .starfighter-top-utility {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
    min-height: var(--sf-top-height);
    padding: 0.7rem 0.85rem 0.8rem 1rem;
    border-top: 0;
    border-right: 0;
    border-radius: 0 0 0 1rem;
  }

  body.starfighter-route .starfighter-sector-badge {
    display: grid;
    min-width: 10.5rem;
    margin: 0;
  }

  body.starfighter-route .starfighter-hud .starfighter-scene-toolbar {
    position: static;
    display: flex;
    gap: 0.5rem;
  }

  body.starfighter-route .starfighter-hud-middle {
    position: absolute;
    top: var(--sf-top-height);
    left: 0;
    right: 0;
    bottom: var(--sf-bottom-height);
  }

  body.starfighter-route .starfighter-hud .starfighter-tactical-stack {
    position: absolute;
    left: 0;
    top: 50%;
    width: var(--sf-left-width);
    transform: translateY(-50%);
    gap: 0.55rem;
    padding-right: 0.7rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-tactical-panel {
    padding: 0.72rem 0.82rem;
    border-left: 0;
    border-radius: 0 1rem 1rem 0;
  }

  body.starfighter-route .starfighter-hud-middle-right {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--sf-right-width);
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 0.78rem 0.75rem;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 1rem 0 0 1rem;
    overflow: auto;
  }

  body.starfighter-route .starfighter-hud-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: var(--sf-left-width) minmax(26rem, 1fr) var(--sf-right-width);
    align-items: end;
  }

  body.starfighter-route .starfighter-hud .starfighter-hud-strip {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.8rem 0.72rem 0.7rem 1rem;
    border: 1px solid rgba(117, 216, 255, 0.16);
    border-left: 0;
    border-bottom: 0;
    border-radius: 0 1rem 0 0;
    background:
      linear-gradient(180deg, rgba(6, 11, 20, 0.94), rgba(4, 8, 15, 0.82)),
      linear-gradient(135deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 58%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 -12px 28px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
    pointer-events: auto;
  }

  body.starfighter-route .starfighter-hud .starfighter-mobile-controls {
    position: static;
    width: min(56rem, calc(100vw - var(--sf-left-width) - var(--sf-right-width)));
    justify-self: center;
    padding: 0.82rem 0.95rem 0.92rem;
    border-top: 1px solid rgba(117, 216, 255, 0.16);
    border-right: 1px solid rgba(117, 216, 255, 0.12);
    border-bottom: 0;
    border-left: 1px solid rgba(117, 216, 255, 0.12);
    border-radius: 1rem 1rem 0 0;
    transform: none;
    left: auto;
    right: auto;
    bottom: auto;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-console {
    grid-template-columns: minmax(15rem, 1.5fr) minmax(10rem, 0.9fr) minmax(8.5rem, 0.78fr);
    gap: 0.68rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-status-rail {
    height: var(--sf-bottom-height);
    padding: 0.8rem 0.75rem 0.72rem;
    border-right: 0;
    border-bottom: 0;
    border-radius: 1rem 0 0 0;
    overflow: auto;
  }
}

.starfighter-hud {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.starfighter-hud-frame {
  display: none;
}

.starfighter-hud-top,
.starfighter-hud-middle,
.starfighter-hud-bottom,
.starfighter-hud-top-right,
.starfighter-hud-middle-left,
.starfighter-hud-middle-right,
.starfighter-hud-bottom-left,
.starfighter-hud-bottom-center,
.starfighter-hud-bottom-right,
.starfighter-top-utility,
.starfighter-status-rail {
  display: grid;
  gap: 0.85rem;
}

.starfighter-hud-module,
.starfighter-status-rail {
  border: 1px solid rgba(117, 216, 255, 0.16);
  border-radius: 1.15rem;
  background:
    linear-gradient(180deg, rgba(7, 12, 23, 0.86), rgba(4, 8, 16, 0.9)),
    linear-gradient(135deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 55%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.starfighter-status-stack,
.starfighter-status-brief {
  padding: 0.95rem 1rem;
}

.starfighter-status-stack {
  gap: 0.4rem;
}

.starfighter-status-stack .status-headline,
.starfighter-status-brief .status-copy {
  margin: 0;
}

.starfighter-status-brief .status-copy {
  min-height: 0;
}

.starfighter-top-utility {
  padding: 0.8rem 0.95rem;
}

.starfighter-sector-badge {
  display: none;
}

.starfighter-hud .starfighter-scene-toolbar {
  position: static;
  margin: 0;
}

.starfighter-hud .starfighter-hud-strip,
.starfighter-hud .starfighter-tactical-stack,
.starfighter-hud .starfighter-mobile-controls,
.starfighter-hud .starfighter-sidebar {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  width: auto;
  max-width: none;
  transform: none;
  margin: 0;
}

.starfighter-hud .starfighter-hud-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.starfighter-hud .starfighter-tactical-stack {
  gap: 0.65rem;
}

.starfighter-hud .starfighter-mobile-controls,
.starfighter-hud .starfighter-sidebar,
.starfighter-hud .starfighter-status-rail {
  pointer-events: auto;
}

.starfighter-hud .starfighter-sidebar::before {
  content: none;
}

.starfighter-hud .starfighter-status-rail {
  padding: 0.85rem 0.95rem;
}

.starfighter-hud .starfighter-status-rail .inline-error {
  min-height: 0;
}

@media (min-width: 768px) {
  body.starfighter-route,
  body.starfighter-route .site-main-immersive,
  body.starfighter-route .page-shell-fluid,
  body.starfighter-route .starfighter-page,
  body.starfighter-route #starfighter-arena-root,
  body.starfighter-route .game-shell-grid,
  body.starfighter-route .starfighter-panel,
  body.starfighter-route .starfighter-scene-shell,
  body.starfighter-route .starfighter-viewport {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.starfighter-route {
    overflow: hidden !important;
  }

  body.starfighter-route .starfighter-command-bar,
  body.starfighter-route .starfighter-briefing-panel {
    display: none !important;
  }

  body.starfighter-route #starfighter-arena-root {
    --sf-top-height: clamp(4.3rem, 7.4vh, 5rem);
    --sf-bottom-height: clamp(13rem, 24vh, 15rem);
    --sf-left-width: clamp(15.5rem, 18vw, 18rem);
    --sf-right-width: clamp(16.5rem, 18vw, 19rem);
    position: fixed !important;
    inset: 0 !important;
  }

  body.starfighter-route .game-shell-grid,
  body.starfighter-route .starfighter-panel,
  body.starfighter-route .starfighter-scene-shell,
  body.starfighter-route .starfighter-viewport {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.starfighter-route .starfighter-hud {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    margin: 0 !important;
    pointer-events: none !important;
  }

  body.starfighter-route .starfighter-hud-top {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(17rem, 1fr) minmax(20rem, 40vw) minmax(17rem, 1fr) !important;
    align-items: start !important;
    gap: 0.7rem !important;
  }

  body.starfighter-route .starfighter-status-stack,
  body.starfighter-route .starfighter-status-brief,
  body.starfighter-route .starfighter-top-utility,
  body.starfighter-route .starfighter-mobile-controls,
  body.starfighter-route .starfighter-sidebar,
  body.starfighter-route .starfighter-status-rail,
  body.starfighter-route .starfighter-hud .starfighter-scene-toolbar {
    pointer-events: auto !important;
  }

  body.starfighter-route .starfighter-status-stack {
    display: grid !important;
    gap: 0.35rem !important;
    min-height: var(--sf-top-height) !important;
    padding: 0.72rem 1rem 0.78rem !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-radius: 0 0 1rem 0 !important;
  }

  body.starfighter-route .starfighter-status-brief {
    min-height: calc(var(--sf-top-height) - 0.7rem) !important;
    padding: 0.7rem 1rem 0.8rem !important;
    border-top: 0 !important;
    border-radius: 0 0 1rem 1rem !important;
  }

  body.starfighter-route .starfighter-status-brief .status-copy {
    min-height: 0 !important;
    margin: 0 !important;
    text-align: center !important;
  }

  body.starfighter-route .starfighter-hud-top-right {
    display: grid !important;
    gap: 0.55rem !important;
    justify-items: end !important;
  }

  body.starfighter-route .starfighter-top-utility {
    display: flex !important;
    align-items: stretch !important;
    gap: 0.55rem !important;
    min-height: var(--sf-top-height) !important;
    padding: 0.7rem 0.85rem 0.8rem 1rem !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-radius: 0 0 0 1rem !important;
  }

  body.starfighter-route .starfighter-sector-badge {
    display: grid !important;
    min-width: 10.5rem !important;
    margin: 0 !important;
  }

  body.starfighter-route .starfighter-hud .starfighter-scene-toolbar {
    position: static !important;
    display: flex !important;
    gap: 0.5rem !important;
    margin: 0 !important;
  }

  body.starfighter-route .starfighter-hud-middle {
    position: absolute !important;
    top: var(--sf-top-height) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: var(--sf-bottom-height) !important;
  }

  body.starfighter-route .starfighter-hud .starfighter-tactical-stack {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    width: var(--sf-left-width) !important;
    transform: translateY(-50%) !important;
    gap: 0.55rem !important;
    padding-right: 0.7rem !important;
  }

  body.starfighter-route .starfighter-hud .starfighter-tactical-panel {
    padding: 0.72rem 0.82rem !important;
    border-left: 0 !important;
    border-radius: 0 1rem 1rem 0 !important;
  }

  body.starfighter-route .starfighter-hud-middle-right {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: var(--sf-right-width) !important;
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    padding: 0.78rem 0.75rem !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 1rem 0 0 1rem !important;
    overflow: auto !important;
  }

  body.starfighter-route .starfighter-hud-bottom {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: grid !important;
    grid-template-columns: var(--sf-left-width) minmax(26rem, 1fr) var(--sf-right-width) !important;
    align-items: end !important;
  }

  body.starfighter-route .starfighter-hud .starfighter-hud-strip {
    position: static !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem !important;
    padding: 0.8rem 0.72rem 0.7rem 1rem !important;
    border-left: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 1rem 0 0 !important;
    pointer-events: auto !important;
  }

  body.starfighter-route .starfighter-hud .starfighter-mobile-controls {
    position: static !important;
    width: min(56rem, calc(100vw - var(--sf-left-width) - var(--sf-right-width))) !important;
    justify-self: center !important;
    padding: 0.82rem 0.95rem 0.92rem !important;
    border-top: 1px solid rgba(117, 216, 255, 0.16) !important;
    border-right: 1px solid rgba(117, 216, 255, 0.12) !important;
    border-bottom: 0 !important;
    border-left: 1px solid rgba(117, 216, 255, 0.12) !important;
    border-radius: 1rem 1rem 0 0 !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-console {
    grid-template-columns: minmax(15rem, 1.5fr) minmax(10rem, 0.9fr) minmax(8.5rem, 0.78fr) !important;
    gap: 0.68rem !important;
  }

  body.starfighter-route .starfighter-hud .starfighter-status-rail {
    height: var(--sf-bottom-height) !important;
    padding: 0.8rem 0.75rem 0.72rem !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 1rem 0 0 0 !important;
    overflow: auto !important;
  }
}

@media (min-width: 768px) {
  body.starfighter-route,
  body.starfighter-route .site-main-immersive,
  body.starfighter-route .page-shell-fluid,
  body.starfighter-route .starfighter-page,
  body.starfighter-route #starfighter-arena-root,
  body.starfighter-route .game-shell-grid,
  body.starfighter-route .starfighter-panel,
  body.starfighter-route .starfighter-scene-shell,
  body.starfighter-route .starfighter-viewport {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding: 0;
  }

  body.starfighter-route {
    overflow: hidden;
    background: #030711;
  }

  body.starfighter-route .site-main-immersive {
    position: fixed;
    inset: 0;
  }

  body.starfighter-route .site-backdrop {
    opacity: 0.18;
  }

  body.starfighter-route .starfighter-command-bar,
  body.starfighter-route .starfighter-briefing-panel {
    display: none;
  }

  body.starfighter-route #starfighter-arena-root {
    --sf-top-height: clamp(4.3rem, 7.4vh, 5rem);
    --sf-bottom-height: clamp(13rem, 24vh, 15rem);
    --sf-left-width: clamp(15.5rem, 18vw, 18rem);
    --sf-right-width: clamp(16.5rem, 18vw, 19rem);
    position: fixed;
    inset: 0;
  }

  body.starfighter-route .game-shell-grid {
    position: absolute;
    inset: 0;
    display: block;
  }

  body.starfighter-route .starfighter-panel {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    overflow: hidden;
  }

  body.starfighter-route .starfighter-scene-shell {
    position: absolute;
    inset: 0;
    display: block;
    border: 0;
    border-radius: 0;
    background:
      radial-gradient(circle at 50% 8%, rgba(117, 216, 255, 0.18), transparent 26%),
      linear-gradient(180deg, rgba(4, 8, 16, 0.96), rgba(2, 5, 11, 1));
    box-shadow: none;
    overflow: hidden;
  }

  body.starfighter-route .starfighter-scene-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(90deg, rgba(117, 216, 255, 0.08), rgba(0, 0, 0, 0) 9%, rgba(0, 0, 0, 0) 91%, rgba(117, 216, 255, 0.08)),
      linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0) 18%);
    pointer-events: none;
  }

  body.starfighter-route .starfighter-scene-shell::after {
    content: none;
  }

  body.starfighter-route .starfighter-viewport {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.starfighter-route .starfighter-viewport::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
      linear-gradient(135deg, rgba(0, 0, 0, 0) 0 8%, rgba(116, 236, 255, 0.84) 8% 18%, rgba(0, 0, 0, 0) 18% 100%),
      linear-gradient(-135deg, rgba(0, 0, 0, 0) 0 8%, rgba(116, 236, 255, 0.84) 8% 18%, rgba(0, 0, 0, 0) 18% 100%),
      linear-gradient(180deg, rgba(88, 138, 196, 0.42), rgba(0, 0, 0, 0) 18%);
    background-repeat: no-repeat;
    background-size:
      19rem 2.05rem,
      19rem 2.05rem,
      100% 18%;
    background-position:
      1.4rem 1rem,
      calc(100% - 1.4rem) 1rem,
      0 0;
    pointer-events: none;
    opacity: 0.92;
  }

  body.starfighter-route .starfighter-cockpit-overlay {
    opacity: 0.9;
    filter: drop-shadow(0 0 1rem rgba(117, 216, 255, 0.14));
  }

  body.starfighter-route .starfighter-cockpit-overlay::before {
    background:
      radial-gradient(circle at 50% 42%, rgba(117, 216, 255, 0.1), transparent 40%),
      linear-gradient(180deg, rgba(117, 216, 255, 0.05), rgba(0, 0, 0, 0) 18%, rgba(255, 180, 84, 0.04) 82%, rgba(0, 0, 0, 0) 100%),
      repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0 1px, rgba(0, 0, 0, 0) 1px 12px);
  }

  body.starfighter-route .starfighter-cockpit-arch {
    left: 6%;
    right: 6%;
    top: 2.55rem;
    height: 17%;
    border-width: 2px;
  }

  body.starfighter-route .starfighter-cockpit-strut {
    top: 8%;
    bottom: 14%;
    width: clamp(1.15rem, 1.7vw, 1.7rem);
    border-width: 2px;
  }

  body.starfighter-route .starfighter-cockpit-strut.is-left {
    left: 4%;
  }

  body.starfighter-route .starfighter-cockpit-strut.is-right {
    right: 4%;
  }

  body.starfighter-route .starfighter-cockpit-panel {
    left: 12%;
    right: 12%;
    bottom: 0;
    height: 16%;
    border-width: 2px;
  }

  body.starfighter-route .starfighter-hud {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: block;
    margin: 0;
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-frame {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-frame-line,
  body.starfighter-route .starfighter-hud-frame-corner {
    position: absolute;
    display: block;
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-frame-line.is-top,
  body.starfighter-route .starfighter-hud-frame-line.is-bottom {
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(118, 236, 255, 0), rgba(118, 236, 255, 0.95) 12%, rgba(118, 236, 255, 0.95) 88%, rgba(118, 236, 255, 0));
    box-shadow: 0 0 14px rgba(118, 236, 255, 0.3);
  }

  body.starfighter-route .starfighter-hud-frame-line.is-top {
    top: 0;
  }

  body.starfighter-route .starfighter-hud-frame-line.is-bottom {
    bottom: 0;
  }

  body.starfighter-route .starfighter-hud-frame-line.is-left,
  body.starfighter-route .starfighter-hud-frame-line.is-right {
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(118, 236, 255, 0), rgba(118, 236, 255, 0.95) 12%, rgba(118, 236, 255, 0.95) 88%, rgba(118, 236, 255, 0));
    box-shadow: 0 0 14px rgba(118, 236, 255, 0.3);
  }

  body.starfighter-route .starfighter-hud-frame-line.is-left {
    left: 0;
  }

  body.starfighter-route .starfighter-hud-frame-line.is-right {
    right: 0;
  }

  body.starfighter-route .starfighter-hud-frame-corner {
    width: 6rem;
    height: 6rem;
    border-color: rgba(118, 236, 255, 0.88);
    box-shadow: 0 0 16px rgba(118, 236, 255, 0.2);
  }

  body.starfighter-route .starfighter-hud-frame-corner.is-top-left {
    top: 0;
    left: 0;
    border-top: 2px solid rgba(118, 236, 255, 0.88);
    border-left: 2px solid rgba(118, 236, 255, 0.88);
    clip-path: polygon(0 0, 100% 0, 66% 34%, 34% 34%, 34% 66%, 0 100%);
  }

  body.starfighter-route .starfighter-hud-frame-corner.is-top-right {
    top: 0;
    right: 0;
    border-top: 2px solid rgba(118, 236, 255, 0.88);
    border-right: 2px solid rgba(118, 236, 255, 0.88);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 66% 66%, 66% 34%, 34% 34%);
  }

  body.starfighter-route .starfighter-hud-frame-corner.is-bottom-left {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid rgba(118, 236, 255, 0.88);
    border-left: 2px solid rgba(118, 236, 255, 0.88);
    clip-path: polygon(0 0, 34% 34%, 34% 66%, 66% 66%, 100% 100%, 0 100%);
  }

  body.starfighter-route .starfighter-hud-frame-corner.is-bottom-right {
    right: 0;
    bottom: 0;
    border-right: 2px solid rgba(118, 236, 255, 0.88);
    border-bottom: 2px solid rgba(118, 236, 255, 0.88);
    clip-path: polygon(34% 34%, 66% 34%, 66% 66%, 100% 100%, 0 100%, 100% 0);
  }

  body.starfighter-route .starfighter-hud-module,
  body.starfighter-route .starfighter-status-rail,
  body.starfighter-route .starfighter-mobile-controls,
  body.starfighter-route .starfighter-sidebar {
    border: 1px solid rgba(117, 216, 255, 0.16);
    background:
      linear-gradient(180deg, rgba(6, 11, 20, 0.94), rgba(4, 8, 15, 0.82)),
      linear-gradient(135deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 58%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 18px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
  }

  body.starfighter-route .starfighter-hud-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: minmax(17rem, 1fr) minmax(20rem, 40vw) minmax(17rem, 1fr);
    align-items: start;
    gap: 0.7rem;
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-top-left,
  body.starfighter-route .starfighter-hud-top-center,
  body.starfighter-route .starfighter-hud-top-right {
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-top-left {
    justify-self: start;
  }

  body.starfighter-route .starfighter-hud-top-center {
    justify-self: center;
    width: 100%;
  }

  body.starfighter-route .starfighter-hud-top-right {
    justify-self: end;
    display: grid;
    gap: 0.55rem;
    justify-items: end;
  }

  body.starfighter-route .starfighter-status-stack {
    display: grid;
    gap: 0.35rem;
    min-height: var(--sf-top-height);
    padding: 0.72rem 1rem 0.78rem;
    border-top: 0;
    border-left: 0;
    border-radius: 0 0 1rem 0;
    pointer-events: auto;
  }

  body.starfighter-route .starfighter-status-stack .status-chip {
    min-height: 1.95rem;
    padding: 0.26rem 0.82rem;
    font-size: 0.84rem;
    letter-spacing: 0.12em;
  }

  body.starfighter-route .starfighter-status-stack .status-headline {
    margin: 0;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-status-brief {
    min-height: calc(var(--sf-top-height) - 0.7rem);
    margin-top: 0;
    padding: 0.7rem 1rem 0.8rem;
    border-top: 0;
    border-radius: 0 0 1rem 1rem;
    pointer-events: auto;
  }

  body.starfighter-route .starfighter-status-brief .status-copy {
    min-height: 0;
    margin: 0;
    color: rgba(225, 234, 245, 0.78);
    font-size: 0.8rem;
    line-height: 1.35;
    text-align: center;
  }

  body.starfighter-route .starfighter-top-utility {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
    min-height: var(--sf-top-height);
    padding: 0.7rem 0.85rem 0.8rem 1rem;
    border-top: 0;
    border-right: 0;
    border-radius: 0 0 0 1rem;
    pointer-events: auto;
  }

  body.starfighter-route .starfighter-sector-badge {
    display: grid;
    min-width: 10.5rem;
    margin: 0;
    padding: 0.55rem 0.75rem;
    border-color: rgba(117, 216, 255, 0.14);
    background:
      linear-gradient(180deg, rgba(10, 16, 28, 0.9), rgba(5, 9, 18, 0.92)),
      rgba(255, 255, 255, 0.03);
  }

  body.starfighter-route .starfighter-sector-badge span {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-sector-badge strong {
    margin-top: 0.22rem;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-hud-top-right .starfighter-callout {
    min-height: 2.45rem;
    padding-inline: 0.95rem;
    white-space: nowrap;
  }

  body.starfighter-route .starfighter-hud .starfighter-scene-toolbar {
    display: flex;
    gap: 0.5rem;
    pointer-events: auto;
  }

  body.starfighter-route .starfighter-hud .starfighter-scene-toolbar .secondary-action.slim {
    min-height: 2.35rem;
    padding-inline: 0.88rem;
    font-size: 0.82rem;
  }

  body.starfighter-route .starfighter-hud-middle {
    position: absolute;
    top: var(--sf-top-height);
    left: 0;
    right: 0;
    bottom: var(--sf-bottom-height);
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-middle-left {
    position: absolute;
    left: 0;
    top: 50%;
    width: var(--sf-left-width);
    transform: translateY(-50%);
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-middle-right {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--sf-right-width);
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud .starfighter-tactical-stack {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    gap: 0.55rem;
    padding-right: 0.7rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-tactical-panel {
    padding: 0.72rem 0.82rem;
    border-left: 0;
    border-radius: 0 1rem 1rem 0;
  }

  body.starfighter-route .starfighter-hud .starfighter-tactical-label {
    font-size: 0.64rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-tactical-panel strong {
    font-size: 0.86rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-tactical-note,
  body.starfighter-route .starfighter-hud .starfighter-focus-meta {
    font-size: 0.73rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-focus-distance {
    min-width: 4rem;
    padding: 0.34rem 0.55rem;
    font-size: 0.76rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    display: grid;
    align-content: start;
    gap: 0.65rem;
    padding: 0.78rem 0.75rem;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 1rem 0 0 1rem;
    pointer-events: auto;
    overflow: auto;
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar::before {
    content: none;
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar .room-metric,
  body.starfighter-route .starfighter-hud .starfighter-sidebar .player-card {
    padding: 0.72rem 0.8rem;
    border-radius: 0.92rem;
    border-color: rgba(117, 216, 255, 0.12);
    background:
      linear-gradient(180deg, rgba(12, 20, 34, 0.84), rgba(7, 12, 22, 0.88)),
      rgba(255, 255, 255, 0.03);
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar .room-metric span,
  body.starfighter-route .starfighter-hud .starfighter-sidebar .field-label,
  body.starfighter-route .starfighter-hud .starfighter-sidebar .share-feedback {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar .room-metric strong {
    margin-top: 0.28rem;
    font-size: 0.94rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar .share-link {
    gap: 0.45rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar .share-link input {
    padding: 0.68rem 0.78rem;
    border-radius: 0.85rem;
    font-size: 0.88rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar .secondary-action.slim {
    min-height: 2.4rem;
    padding-inline: 0.78rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-sidebar .starfighter-scanner {
    margin-top: 0.35rem;
    border-radius: 0.88rem;
  }

  body.starfighter-route .starfighter-hud-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: var(--sf-left-width) minmax(26rem, 1fr) var(--sf-right-width);
    align-items: end;
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-bottom-left,
  body.starfighter-route .starfighter-hud-bottom-center,
  body.starfighter-route .starfighter-hud-bottom-right {
    pointer-events: none;
  }

  body.starfighter-route .starfighter-hud-bottom-left {
    justify-self: start;
  }

  body.starfighter-route .starfighter-hud-bottom-center {
    justify-self: center;
    width: 100%;
  }

  body.starfighter-route .starfighter-hud-bottom-right {
    justify-self: end;
  }

  body.starfighter-route .starfighter-hud .starfighter-hud-strip {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.8rem 0.72rem 0.7rem 1rem;
    border: 1px solid rgba(117, 216, 255, 0.16);
    border-left: 0;
    border-bottom: 0;
    border-radius: 0 1rem 0 0;
    background:
      linear-gradient(180deg, rgba(6, 11, 20, 0.94), rgba(4, 8, 15, 0.82)),
      linear-gradient(135deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 58%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 -12px 28px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
    pointer-events: auto;
  }

  body.starfighter-route .starfighter-hud .starfighter-hud-chip {
    min-width: 0;
    padding: 0.54rem 0.68rem;
    border-radius: 0.88rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-hud-chip span {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  body.starfighter-route .starfighter-hud .starfighter-hud-chip strong {
    margin-top: 0.22rem;
    font-size: 0.92rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-mobile-controls {
    width: min(56rem, calc(100vw - var(--sf-left-width) - var(--sf-right-width)));
    justify-self: center;
    padding: 0.82rem 0.95rem 0.92rem;
    border-top: 1px solid rgba(117, 216, 255, 0.16);
    border-right: 1px solid rgba(117, 216, 255, 0.12);
    border-bottom: 0;
    border-left: 1px solid rgba(117, 216, 255, 0.12);
    border-radius: 1rem 1rem 0 0;
    pointer-events: auto;
  }

  body.starfighter-route .starfighter-hud .starfighter-controls-header {
    align-items: center;
  }

  body.starfighter-route .starfighter-hud .starfighter-controls-header strong {
    font-size: 0.98rem;
    letter-spacing: 0.1em;
  }

  body.starfighter-route .starfighter-hud .starfighter-controls-header span {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-console {
    grid-template-columns: minmax(15rem, 1.5fr) minmax(10rem, 0.9fr) minmax(8.5rem, 0.78fr);
    gap: 0.68rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-bay-attitude {
    grid-column: 1 / 2;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-bay-systems {
    grid-column: 2 / 3;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-bay-weapons {
    grid-column: 3 / 4;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-bay {
    gap: 0.62rem;
    padding: 0.8rem;
    border-radius: 1rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-bay-heading strong {
    font-size: 0.88rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-attitude-grid,
  body.starfighter-route .starfighter-hud .starfighter-systems-grid,
  body.starfighter-route .starfighter-hud .starfighter-weapons-grid {
    gap: 0.52rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-attitude-core {
    min-height: 6.8rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-button {
    min-height: 4.95rem;
    padding: 0.72rem 0.4rem 0.62rem;
    border-radius: 0.9rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-button img,
  body.starfighter-route .starfighter-hud .starfighter-control-wide img {
    width: min(100%, 2.3rem);
    max-height: 2rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-label {
    font-size: 0.64rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-key {
    min-height: 1.15rem;
    padding: 0.08rem 0.32rem;
    font-size: 0.6rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-control-wide {
    min-height: 4rem;
    padding-inline: 0.72rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-controls-utility-bar {
    display: none;
  }

  body.starfighter-route .starfighter-hud .starfighter-status-rail {
    height: var(--sf-bottom-height);
    padding: 0.8rem 0.75rem 0.72rem;
    border-right: 0;
    border-bottom: 0;
    border-radius: 1rem 0 0 0;
    overflow: auto;
    pointer-events: auto;
  }

  body.starfighter-route .starfighter-hud .starfighter-status-rail .player-list {
    gap: 0.55rem;
  }

  body.starfighter-route .starfighter-hud .starfighter-status-rail .player-card {
    padding: 0.72rem 0.8rem;
    border-radius: 0.92rem;
    border-color: rgba(117, 216, 255, 0.12);
    background:
      linear-gradient(180deg, rgba(12, 20, 34, 0.84), rgba(7, 12, 22, 0.88)),
      rgba(255, 255, 255, 0.03);
  }

  body.starfighter-route .starfighter-hud .starfighter-status-rail .player-card strong {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-hud .starfighter-status-rail .player-card span,
  body.starfighter-route .starfighter-hud .starfighter-status-rail .player-card .player-state {
    font-size: 0.65rem;
    letter-spacing: 0.04em;
  }
}

@keyframes starfighterLockPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.98);
    opacity: 0.94;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.02);
    opacity: 1;
  }
}

@keyframes starfighterLeadPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0.78;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 1;
  }
}

@keyframes starfighterWeaponBloom {
  0% {
    transform: translate(-50%, -50%) scale(0.92);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes starfighterWeaponVentPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.98);
    opacity: 0.82;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.03);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(0.98);
    opacity: 0.82;
  }
}

@media (min-width: 768px) {
  body.starfighter-route,
  body.starfighter-route .site-main-immersive,
  body.starfighter-route .page-shell-fluid,
  body.starfighter-route .starfighter-page {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding: 0;
  }

  body.starfighter-route {
    overflow: hidden;
    background: #040812;
  }

  body.starfighter-route .site-main-immersive {
    position: fixed;
    inset: 0;
  }

  body.starfighter-route .site-backdrop {
    opacity: 0.22;
  }

  body.starfighter-route .starfighter-command-bar,
  body.starfighter-route .starfighter-briefing-panel {
    display: none;
  }

  body.starfighter-route #starfighter-arena-root {
    --sf-sidebar-width: clamp(17rem, 18vw, 19rem);
    --sf-topbar-height: clamp(4.1rem, 7vh, 4.85rem);
    --sf-bottom-height: clamp(13rem, 25vh, 15.5rem);
    --sf-edge-gap: 1rem;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
  }

  body.starfighter-route .game-shell-grid {
    position: absolute;
    inset: 0;
    display: block;
    margin: 0;
  }

  body.starfighter-route .starfighter-panel {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    overflow: hidden;
  }

  body.starfighter-route .starfighter-scene-shell {
    position: absolute;
    inset: 0;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background:
      radial-gradient(circle at 50% 0, rgba(117, 216, 255, 0.18), transparent 24%),
      linear-gradient(180deg, rgba(4, 8, 15, 0.98), rgba(2, 6, 12, 1));
    box-shadow: none;
    overflow: hidden;
  }

  body.starfighter-route .starfighter-scene-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(90deg, rgba(117, 216, 255, 0.08), rgba(0, 0, 0, 0) 9%, rgba(0, 0, 0, 0) 91%, rgba(255, 180, 84, 0.08)),
      linear-gradient(135deg, rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0) 32%);
    pointer-events: none;
  }

  body.starfighter-route .starfighter-scene-shell::after {
    content: none;
  }

  body.starfighter-route .starfighter-viewport {
    position: absolute;
    inset: 0;
    min-height: 0;
    height: auto;
    border-radius: 0;
    box-shadow: none;
  }

  body.starfighter-route .starfighter-viewport::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
      linear-gradient(135deg, rgba(0, 0, 0, 0) 0 7%, rgba(112, 236, 255, 0.78) 7% 18%, rgba(0, 0, 0, 0) 18% 100%),
      linear-gradient(-135deg, rgba(0, 0, 0, 0) 0 7%, rgba(112, 236, 255, 0.78) 7% 18%, rgba(0, 0, 0, 0) 18% 100%),
      linear-gradient(180deg, rgba(88, 138, 196, 0.4), rgba(0, 0, 0, 0) 18%);
    background-repeat: no-repeat;
    background-size:
      18rem 2rem,
      18rem 2rem,
      100% 18%;
    background-position:
      1.8rem 1.25rem,
      calc(100% - 1.8rem) 1.25rem,
      0 0;
    pointer-events: none;
    opacity: 0.92;
  }

  body.starfighter-route .starfighter-cockpit-overlay {
    opacity: 0.88;
    filter: drop-shadow(0 0 1rem rgba(117, 216, 255, 0.12));
  }

  body.starfighter-route .starfighter-cockpit-overlay::before {
    background:
      radial-gradient(circle at 50% 42%, rgba(117, 216, 255, 0.1), transparent 40%),
      linear-gradient(180deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 15%, rgba(255, 180, 84, 0.05) 84%, rgba(0, 0, 0, 0) 100%),
      repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.014) 0 1px, rgba(0, 0, 0, 0) 1px 10px);
  }

  body.starfighter-route .starfighter-cockpit-arch {
    left: 6%;
    right: 6%;
    top: 2.8rem;
    height: 16.5%;
    border-width: 2px;
  }

  body.starfighter-route .starfighter-cockpit-strut {
    top: 8%;
    bottom: 14%;
    width: clamp(1.2rem, 1.8vw, 1.8rem);
    border-width: 2px;
  }

  body.starfighter-route .starfighter-cockpit-strut.is-left {
    left: 4.2%;
  }

  body.starfighter-route .starfighter-cockpit-strut.is-right {
    right: 4.2%;
  }

  body.starfighter-route .starfighter-cockpit-panel {
    left: 11%;
    right: 11%;
    bottom: 0;
    height: 16%;
    border-width: 2px;
  }

  body.starfighter-route .starfighter-panel .status-stack {
    position: absolute;
    top: 0;
    left: 0;
    right: var(--sf-sidebar-width);
    z-index: 7;
    display: grid;
    grid-template-columns: auto minmax(12rem, 18rem) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    min-height: var(--sf-topbar-height);
    margin: 0;
    padding: 0.7rem 1.15rem 0.7rem 1rem;
    border: 0;
    border-bottom: 1px solid rgba(117, 216, 255, 0.18);
    border-right: 1px solid rgba(117, 216, 255, 0.12);
    border-radius: 0 0 1.1rem 0;
    background:
      linear-gradient(180deg, rgba(6, 11, 20, 0.94), rgba(4, 8, 15, 0.82)),
      linear-gradient(135deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 55%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 16px 28px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(16px);
  }

  body.starfighter-route .starfighter-panel .status-chip {
    min-height: 2rem;
    padding: 0.28rem 0.88rem;
    border-radius: 999px;
    font-size: 0.86rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-panel .status-headline {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-panel .status-copy {
    min-height: 0;
    font-size: 0.79rem;
    line-height: 1.35;
    color: rgba(225, 234, 245, 0.76);
  }

  body.starfighter-route .starfighter-panel .starfighter-callout {
    justify-self: end;
    min-height: 2.6rem;
    padding-inline: 1rem;
    border-color: rgba(117, 216, 255, 0.18);
    background:
      linear-gradient(135deg, rgba(117, 216, 255, 0.18), rgba(142, 240, 168, 0.22)),
      rgba(255, 255, 255, 0.04);
    color: #effff7;
    white-space: nowrap;
    box-shadow: 0 0 1.35rem rgba(117, 216, 255, 0.14);
  }

  body.starfighter-route .starfighter-scene-toolbar {
    position: absolute;
    top: calc(var(--sf-topbar-height) + 0.7rem);
    right: calc(var(--sf-sidebar-width) + var(--sf-edge-gap));
    z-index: 8;
    display: flex;
    gap: 0.55rem;
    margin: 0;
  }

  body.starfighter-route .starfighter-scene-toolbar .secondary-action.slim {
    min-height: 2.4rem;
    padding-inline: 0.92rem;
    border-radius: 999px;
    font-size: 0.84rem;
    backdrop-filter: blur(12px);
  }

  body.starfighter-route .starfighter-hud-strip {
    top: calc(var(--sf-topbar-height) + 0.85rem);
    left: 1rem;
    right: calc(var(--sf-sidebar-width) + 15rem);
    z-index: 5;
    gap: 0.55rem;
    max-width: none;
  }

  body.starfighter-route .starfighter-hud-chip {
    min-width: 6.2rem;
    padding: 0.56rem 0.72rem;
    border-radius: 0.92rem;
    background:
      linear-gradient(180deg, rgba(6, 11, 20, 0.82), rgba(6, 11, 20, 0.68)),
      rgba(255, 255, 255, 0.03);
  }

  body.starfighter-route .starfighter-hud-chip span {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  body.starfighter-route .starfighter-hud-chip strong {
    margin-top: 0.24rem;
    font-size: 0.96rem;
    letter-spacing: 0.03em;
  }

  body.starfighter-route .starfighter-tactical-stack {
    left: 1rem;
    bottom: calc(var(--sf-bottom-height) + 1.1rem);
    z-index: 6;
    width: clamp(15rem, 18vw, 18rem);
    gap: 0.55rem;
  }

  body.starfighter-route .starfighter-tactical-panel {
    padding: 0.72rem 0.86rem;
    border-radius: 0.95rem;
  }

  body.starfighter-route .starfighter-tactical-label {
    font-size: 0.64rem;
  }

  body.starfighter-route .starfighter-tactical-panel strong {
    font-size: 0.88rem;
  }

  body.starfighter-route .starfighter-tactical-note,
  body.starfighter-route .starfighter-focus-meta {
    font-size: 0.74rem;
  }

  body.starfighter-route .starfighter-focus-distance {
    min-width: 4.1rem;
    padding: 0.34rem 0.55rem;
    font-size: 0.78rem;
  }

  body.starfighter-route .starfighter-mobile-controls {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 8;
    width: min(56rem, calc(100vw - var(--sf-sidebar-width) - 2rem));
    max-width: none;
    transform: translateX(calc(-50% - (var(--sf-sidebar-width) / 2)));
    gap: 0.7rem;
    margin: 0;
    padding: 0.85rem 1rem 0.95rem;
    border: 0;
    border-top: 1px solid rgba(117, 216, 255, 0.18);
    border-right: 1px solid rgba(117, 216, 255, 0.08);
    border-radius: 1.25rem 1.25rem 0 0;
    background:
      linear-gradient(180deg, rgba(5, 9, 17, 0.95), rgba(4, 8, 15, 0.84)),
      linear-gradient(145deg, rgba(117, 216, 255, 0.08), rgba(0, 0, 0, 0) 58%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 -18px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
  }

  body.starfighter-route .starfighter-controls-header {
    align-items: center;
  }

  body.starfighter-route .starfighter-controls-header strong {
    font-size: 1rem;
    letter-spacing: 0.1em;
  }

  body.starfighter-route .starfighter-controls-header span {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
  }

  body.starfighter-route .starfighter-control-console {
    grid-template-columns: minmax(16rem, 1.55fr) minmax(10rem, 0.95fr) minmax(8.5rem, 0.8fr);
    gap: 0.7rem;
    align-items: stretch;
  }

  body.starfighter-route .starfighter-control-bay-attitude {
    grid-column: 1 / 2;
  }

  body.starfighter-route .starfighter-control-bay-systems {
    grid-column: 2 / 3;
  }

  body.starfighter-route .starfighter-control-bay-weapons {
    grid-column: 3 / 4;
  }

  body.starfighter-route .starfighter-control-bay {
    gap: 0.65rem;
    padding: 0.82rem;
    border-radius: 1.04rem;
  }

  body.starfighter-route .starfighter-control-bay-heading strong {
    font-size: 0.9rem;
  }

  body.starfighter-route .starfighter-attitude-grid,
  body.starfighter-route .starfighter-systems-grid,
  body.starfighter-route .starfighter-weapons-grid {
    gap: 0.55rem;
  }

  body.starfighter-route .starfighter-attitude-core {
    min-height: 7rem;
  }

  body.starfighter-route .starfighter-control-button {
    min-height: 5.1rem;
    padding: 0.74rem 0.42rem 0.64rem;
    border-radius: 0.92rem;
  }

  body.starfighter-route .starfighter-control-button img,
  body.starfighter-route .starfighter-control-wide img {
    width: min(100%, 2.35rem);
    max-height: 2.05rem;
  }

  body.starfighter-route .starfighter-control-label {
    font-size: 0.66rem;
  }

  body.starfighter-route .starfighter-control-key {
    min-height: 1.2rem;
    padding: 0.08rem 0.34rem;
    font-size: 0.62rem;
  }

  body.starfighter-route .starfighter-control-wide {
    min-height: 4.1rem;
    padding-inline: 0.74rem;
  }

  body.starfighter-route .starfighter-controls-utility-bar {
    display: none;
  }

  body.starfighter-route .starfighter-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    width: var(--sf-sidebar-width);
    display: grid;
    align-content: start;
    gap: 0.65rem;
    padding: calc(var(--sf-topbar-height) + 0.8rem) 0.75rem 0.75rem;
    border: 0;
    border-left: 1px solid rgba(117, 216, 255, 0.14);
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(5, 9, 17, 0.95), rgba(4, 8, 15, 0.84)),
      linear-gradient(180deg, rgba(117, 216, 255, 0.06), rgba(0, 0, 0, 0) 28%);
    box-shadow:
      inset 1px 0 0 rgba(255, 255, 255, 0.04),
      -22px 0 36px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
    overflow: auto;
  }

  body.starfighter-route .starfighter-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(120deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0) 34%),
      repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0 1px, rgba(0, 0, 0, 0) 1px 16px);
    pointer-events: none;
  }

  body.starfighter-route .starfighter-sidebar > * {
    position: relative;
    z-index: 1;
  }

  body.starfighter-route .starfighter-sidebar .room-metric,
  body.starfighter-route .starfighter-sidebar .player-card {
    padding: 0.72rem 0.8rem;
    border-radius: 0.95rem;
    border-color: rgba(117, 216, 255, 0.12);
    background:
      linear-gradient(180deg, rgba(12, 20, 34, 0.84), rgba(7, 12, 22, 0.88)),
      rgba(255, 255, 255, 0.03);
  }

  body.starfighter-route .starfighter-sidebar .room-metric span,
  body.starfighter-route .starfighter-sidebar .field-label,
  body.starfighter-route .starfighter-sidebar .share-feedback {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-sidebar .room-metric strong {
    margin-top: 0.3rem;
    font-size: 0.96rem;
    letter-spacing: 0.03em;
  }

  body.starfighter-route .starfighter-sidebar .share-link {
    gap: 0.5rem;
  }

  body.starfighter-route .starfighter-sidebar .share-link input {
    padding: 0.72rem 0.8rem;
    border-radius: 0.88rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
  }

  body.starfighter-route .starfighter-sidebar .secondary-action.slim {
    min-height: 2.5rem;
    padding-inline: 0.84rem;
  }

  body.starfighter-route .starfighter-sidebar .starfighter-stat-grid {
    gap: 0.55rem;
  }

  body.starfighter-route .starfighter-sidebar .player-list {
    gap: 0.55rem;
  }

  body.starfighter-route .starfighter-sidebar .starfighter-scoreboard {
    max-height: 7.2rem;
    overflow: auto;
  }

  body.starfighter-route .starfighter-sidebar .starfighter-contacts {
    max-height: 10rem;
    overflow: auto;
  }

  body.starfighter-route .starfighter-sidebar .player-card strong {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.starfighter-route .starfighter-sidebar .player-card span,
  body.starfighter-route .starfighter-sidebar .player-card .player-state {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }

  body.starfighter-route .starfighter-sidebar .starfighter-scanner {
    margin-top: 0.4rem;
    border-radius: 0.9rem;
  }
}
