:root {
  /* Neon barn / combat-farm — match menu-bg.png */
  --bg: #0a0c18;
  --ink: #f7f2e8;
  --muted: #9aa3b8;
  --pink: #ff2d6a;
  --cyan: #5ef0ff;
  --gold: #ffc857;
  --green: #3dff8a;
  --brand: #8b7cf7;
  --brand-cyan: #00d4c8;
  --wood: #1a1410;
  --wood-mid: #2a2118;
  --panel: rgba(22, 16, 12, 0.72);
  --panel-solid: rgba(18, 14, 12, 0.92);
  --line: rgba(255, 210, 160, 0.10);
  --line-pink: rgba(255, 45, 106, 0.45);
  --line-cyan: rgba(94, 240, 255, 0.38);
  --glow-pink: 0 0 18px rgba(255, 45, 106, 0.45), 0 0 40px rgba(255, 45, 106, 0.18);
  --glow-cyan: 0 0 16px rgba(94, 240, 255, 0.35), 0 0 36px rgba(0, 212, 200, 0.14);
  --fs-kicker: 11px;
  --fs-body: 13px;
  --fs-meta: 11px;
  --fs-title: clamp(26px, 4.6vw, 36px);
  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button { appearance: none; -webkit-appearance: none; background: none; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: var(--fs-body);
  user-select: none;

  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

canvas#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #d9c8a8;
}

#scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.035) 2px 3px
  );
  z-index: 8;
}

#vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, 0.22) 100%);
  z-index: 7;
}

.hidden { display: none !important; }

.panel,
.board,
.profile-panel,
.join-form,
.auth-panel,
.go-stats,
#pvp-board,
#respawn-pick {
  background:
    linear-gradient(165deg, rgba(255, 45, 106, 0.06), transparent 42%),
    linear-gradient(345deg, rgba(94, 240, 255, 0.05), transparent 40%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.06),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}

.screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  background: rgba(5, 6, 10, 0.74);
  text-align: center;
  padding: 28px 18px 36px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen-inner {
  position: relative;
  z-index: 2;
  width: min(860px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 8px 0 20px;
}
.screen-inner.narrow { width: min(640px, 100%); }
.screen-inner.wide { width: min(1040px, 100%); }
.screen-inner.join-wide { width: min(860px, 100%); }
.screen-nav {
  position: sticky;
  top: 0;
  z-index: 6;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: -4px;
  margin-bottom: 2px;
  padding: 8px 10px 10px;
  border-radius: var(--radius);
  background:
    linear-gradient(105deg, rgba(0, 206, 201, 0.1) 0%, transparent 42%, rgba(108, 92, 231, 0.12) 100%),
    rgba(8, 10, 16, 0.42);
  border: 1px solid var(--line);
  border-bottom-color: rgba(106, 240, 255, 0.2);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(106, 240, 255, 0.08),
    0 0 24px rgba(108, 92, 231, 0.1),
    0 10px 28px rgba(0, 0, 0, 0.16);
}
.screen-nav .btn {
  min-width: 132px;
}
.screen-nav .btn.ghost {
  background: rgba(8, 10, 16, 0.28);
  border-color: rgba(106, 240, 255, 0.28);
  color: var(--ink);
  box-shadow: 0 0 14px rgba(0, 206, 201, 0.06);
}
.screen-nav .btn.ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(106, 240, 255, 0.08);
  box-shadow: 0 0 18px rgba(106, 240, 255, 0.14);
}
.screen-nav .btn::before {
  content: "← ";
}
.screen-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  position: relative;
  z-index: 2;
}
.screen-head .hint,
.screen-head .tagline {
  margin: 0;
  position: relative;
  z-index: 0;
  max-width: 640px;
}

.title-lockup {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.title-lockup h1 {
  margin: 0;
}
.brand-by-row {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  pointer-events: none;
}
.brand-by-label {
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.brand-by {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.brand-by img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: 0 0 auto;
}
.eazy-wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 2px;
}
.eazy-name {
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.eazy-name .l-e,
.eazy-name .l-y {
  font-weight: 600;
  color: #71758a;
}
.eazy-name .l-A {
  font-weight: 900;
  color: #fff;
}
.eazy-name .l-dash {
  font-weight: 400;
  color: #71758a;
}
.eazy-name .l-Z {
  font-weight: 900;
  color: #81ecec;
}
.eazy-it {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(103, 232, 249, 0.75);
}
.brand-by:hover .eazy-it,
.brand-by:focus-visible .eazy-it {
  color: var(--brand-cyan);
}
.title-mark {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

#title-screen .screen-inner {
  width: min(1180px, 100%);
}

.title-boards-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 18px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.title-identity {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex: 0 0 280px;
  width: 280px;
  max-width: 280px;
  position: relative;
  z-index: 2;
  align-self: stretch;
}
.profile-line {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border: 1px solid var(--line-pink);
  background: rgba(255, 45, 106, 0.08);
  border-radius: var(--radius);
}
.profile-line b { color: var(--pink); font-family: Orbitron, sans-serif; }
.guest-save-notice {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  border: 1px solid rgba(255, 200, 87, 0.34);
  background: rgba(255, 200, 87, 0.08);
  padding: 12px 16px;
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius);
}
.guest-save-notice b { color: var(--pink); }

.btn.mini {
  padding: 8px 16px;
  font-size: 10px;
  min-height: 36px;
  margin-left: 0;
}
.title-auth {
  width: 100%;
  background: rgba(8, 9, 16, 0.94);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 14px;
  gap: 10px;
}
.title-auth .err {
  min-height: 0;
}
.title-auth .mode-row {
  width: 100%;
  justify-content: stretch;
  flex-wrap: wrap;
  gap: 8px;
}
.title-auth .mode-row .btn {
  flex: 1 1 100%;
  min-width: 0;
}
.title-auth .name-input {
  width: 100%;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 10px 12px;
  min-height: 40px;
}

.name-input, .guest-wrap input {
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255, 210, 160, 0.16);
  color: var(--ink);
  padding: 12px 16px;
  text-align: center;
  font-size: 16px;
  width: min(280px, 80vw);
  min-height: 44px;
  border-radius: var(--radius);
}

.name-input:focus, .guest-wrap input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 1px rgba(255, 45, 106, 0.35);
}

.err { color: var(--pink); min-height: 1.2em; font-size: 12px; }
.guest-wrap {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  text-align: left;
  width: 100%;
}
.guest-wrap input { width: 100%; margin-left: 0; }

.join-form {
  width: min(420px, 100%);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.auth-panel {
  width: min(420px, 100%);
  padding: 18px;
  gap: 12px;
}
.auth-panel .name-input { width: 100%; }

.boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(680px, 100%);
  text-align: left;
}
.boards.home-boards {
  flex: 1 1 auto;
  width: 100%;
  max-width: 960px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start; /* no equal-height stretch → no empty under titles */
}
/* Guest: leave room for the login column */
.title-boards-row:has(.title-identity:not(.hidden)) .boards.home-boards {
  max-width: none;
  flex: 1 1 0;
}
.title-boards-row:has(.title-identity:not(.hidden)) {
  justify-content: flex-start;
}
.boards.home-boards .board {
  min-width: 0;
  padding: 10px 12px 10px;
}
.boards.home-boards .board h3 {
  margin-bottom: 6px;
  line-height: 1.2;
  letter-spacing: 0.1em;
}
.boards.home-boards .score-table {
  table-layout: fixed;
  width: 100%;
}
.boards.home-boards .score-table th {
  padding: 0 4px 5px 0;
}
.boards.home-boards .score-table td {
  padding: 5px 4px 5px 0;
}
.boards.home-boards .score-table .empty td {
  padding: 6px 0 0;
}
.boards.home-boards .score-table th:nth-child(1),
.boards.home-boards .score-table td:nth-child(1) { width: 28px; }
.boards.home-boards .score-table th:nth-child(2),
.boards.home-boards .score-table td:nth-child(2) {
  width: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 12px;
}
/* Score / Vague : ancrés à droite, pas de répartition égale avec Lama */
.boards.home-boards .score-table th:nth-child(3),
.boards.home-boards .score-table td:nth-child(3) {
  width: 96px;
  text-align: right;
  padding-left: 20px;
  padding-right: 16px;
  white-space: nowrap;
}
.boards.home-boards .score-table th:nth-child(4),
.boards.home-boards .score-table td:nth-child(4) {
  width: 72px;
  text-align: right;
  padding-left: 8px;
  padding-right: 0;
  white-space: nowrap;
}

@media (max-width: 1020px) {
  .title-boards-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .title-identity {
    order: -1;
    flex: 0 0 auto;
    width: min(420px, 100%);
    max-width: 420px;
    align-self: center;
  }
  .boards.home-boards {
    width: 100%;
    max-width: 860px;
  }
  .title-boards-row:has(.title-identity:not(.hidden)) .boards.home-boards {
    max-width: 860px;
  }
  .title-auth .mode-row .btn {
    flex: 1 1 42%;
  }
}
@media (max-width: 720px) {
  .boards.home-boards {
    grid-template-columns: 1fr;
  }
}
.personal-bests {
  display: grid;
  gap: 10px;
}
.personal-best {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.personal-best:first-child { border-top: 0; padding-top: 2px; }
.personal-best .pb-lab { color: var(--cyan); letter-spacing: 0.08em; font-size: 11px; }
.personal-best .pb-val { color: var(--ink); }
.personal-best.empty .pb-val { color: var(--muted); }

.board {
  padding: 14px 16px 16px;
}

.board h3 {
  font-family: Orbitron, sans-serif;
  font-size: var(--fs-kicker);
  letter-spacing: 0.16em;
  color: var(--pink);
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(255, 45, 106, 0.4);
}

.board ol {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.board li { display: flex; justify-content: space-between; gap: 12px; }
.board .nm { color: var(--ink); }
.board .empty { color: var(--muted); }

.screen.overlay {
  background: rgba(5, 6, 10, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Fond atmosphérique unifié — menus / lobby (pas le HUD en jeu).
   background-attachment + ::before/::after fixed = pas de coupure au scroll. */
#title-screen.screen,
#solo-path-screen.screen,
#campaign-screen.screen,
#upgrade-screen.screen,
#net-hub-screen.screen,
#join-screen.screen,
#lobby-screen.screen,
#loadout-screen.screen,
#profile-screen.screen {
  isolation: isolate;
  /* Transparent so ::before art shows through (overrides .screen rgba fill) */
  background: transparent !important;
}

#upgrade-screen.screen.overlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#title-screen.screen::before,
#solo-path-screen.screen::before,
#campaign-screen.screen::before,
#upgrade-screen.screen::before,
#net-hub-screen.screen::before,
#join-screen.screen::before,
#lobby-screen.screen::before,
#loadout-screen.screen::before,
#profile-screen.screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #07080d;
  background-image: url("/img/menu-bg.png");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  transform: none;
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
  animation: none;
}

#title-screen.screen::after,
#solo-path-screen.screen::after,
#campaign-screen.screen::after,
#upgrade-screen.screen::after,
#net-hub-screen.screen::after,
#join-screen.screen::after,
#lobby-screen.screen::after,
#loadout-screen.screen::after,
#profile-screen.screen::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Light scrim only — keep llamas visible on the sides */
  background:
    radial-gradient(ellipse at 50% 28%, rgba(7, 8, 13, 0.42) 0%, rgba(7, 8, 13, 0.22) 42%, rgba(7, 8, 13, 0.55) 100%),
    linear-gradient(180deg, rgba(7, 8, 13, 0.35) 0%, transparent 22%, transparent 68%, rgba(7, 8, 13, 0.5) 100%);
  animation: none;
  opacity: 1;
}

@keyframes menuGridPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 0.9; }
}

@keyframes menuRingBreathe {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #title-screen.screen::before,
  #solo-path-screen.screen::before,
  #campaign-screen.screen::before,
  #upgrade-screen.screen::before,
  #net-hub-screen.screen::before,
  #join-screen.screen::before,
  #lobby-screen.screen::before,
  #loadout-screen.screen::before,
  #profile-screen.screen::before,
  #title-screen.screen::after,
  #solo-path-screen.screen::after,
  #campaign-screen.screen::after,
  #upgrade-screen.screen::after,
  #net-hub-screen.screen::after,
  #join-screen.screen::after,
  #lobby-screen.screen::after,
  #loadout-screen.screen::after,
  #profile-screen.screen::after {
    animation: none;
  }
}



/* arena-chrome — wood + dual neon to match menu backdrop */
.board {
  border-color: rgba(255, 210, 160, 0.14);
}
.boards.home-boards .board:nth-child(odd) {
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.06),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 45, 106, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.35);
}
.boards.home-boards .board:nth-child(even) {
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.06),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(94, 240, 255, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.35);
}
.title-auth {
  border: 1px solid rgba(255, 45, 106, 0.28);
  box-shadow: var(--glow-pink), inset 0 1px 0 rgba(255, 220, 180, 0.06);
}
.tagline {
  color: rgba(244, 241, 234, 0.78);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.kicker {
  letter-spacing: 0.42em;
  font-size: var(--fs-kicker);
  color: var(--pink);
  text-shadow: 0 0 12px rgba(255, 45, 106, 0.55), 0 0 28px rgba(255, 45, 106, 0.25);
}
#title-screen .kicker {
  font-size: clamp(16px, 2.8vw, 22px);
  letter-spacing: 0.28em;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 0 14px rgba(255, 45, 106, 0.65), 0 0 32px rgba(255, 45, 106, 0.3);
}

h1, h2 {
  font-family: Orbitron, sans-serif;
  font-weight: 900;
  letter-spacing: 0.08em;
}

h1 {
  font-size: clamp(40px, 7.2vw, 84px);
  line-height: 0.92;
  margin-top: 2px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 0 40px rgba(10, 12, 24, 0.55);
}

h1 span, .logo span {
  color: var(--brand-cyan);
  text-shadow: 0 0 18px rgba(0, 212, 200, 0.45), 0 0 40px rgba(94, 240, 255, 0.2);
}

h2 { font-size: var(--fs-title); line-height: 1.05; }

.tagline, .hint {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.55;
  font-size: var(--fs-body);
}

.btn {
  font-family: Orbitron, sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  border: 0;
  cursor: pointer;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 12px;
  min-height: 44px;
  transition: transform 0.12s ease, filter 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}
.btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
  filter: none;
  pointer-events: none;
}

.btn.primary {
  background: linear-gradient(180deg, #ff4d82 0%, var(--pink) 55%, #d91652 100%);
  color: #fff;
  border: 1px solid rgba(255, 180, 200, 0.35);
  box-shadow: var(--glow-pink), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(255, 45, 106, 0.6), 0 0 48px rgba(255, 45, 106, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn.ghost {
  background: rgba(22, 16, 12, 0.45);
  color: var(--ink);
  border: 1px solid rgba(94, 240, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 12px rgba(94, 240, 255, 0.08);
}

.btn.ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(94, 240, 255, 0.08);
  box-shadow: var(--glow-cyan);
}

.mode-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.title-modes .btn { min-width: 128px; }

.controls {
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 0;
  margin-top: 4px;
  width: min(680px, 100%);
  text-align: left;
  padding: 4px 18px;
  background:
    linear-gradient(90deg, rgba(255, 45, 106, 0.07), transparent 28%, transparent 72%, rgba(94, 240, 255, 0.07)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.05), 0 8px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.controls li {
  padding: 10px 0;
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}
.controls li:last-child { border-bottom: 0; }
.controls b { color: var(--ink); }

kbd {
  display: inline-block;
  background: rgba(26, 20, 16, 0.85);
  border: 1px solid rgba(94, 240, 255, 0.32);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--cyan);
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  box-shadow: 0 0 8px rgba(94, 240, 255, 0.15);
  letter-spacing: 0.04em;
}

.loadout-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.loadout-block {
  width: 100%;
  text-align: left;
  padding: 16px 16px 18px;
}
.loadout-block .sub { margin-top: 0; }
.loadout-block .choice-row,
.loadout-block .map-row { justify-content: flex-start; }

.diff-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  width: 100%;
}

.dcard,
.wcard,
.path-card,
.map-card {
  text-align: left;
  background:
    linear-gradient(160deg, rgba(255, 45, 106, 0.05), transparent 50%),
    rgba(26, 20, 16, 0.55);
  border: 1px solid rgba(255, 210, 160, 0.12);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.04);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, opacity 0.14s ease;
}
.dcard:disabled,
.map-card:disabled,
.wcard:disabled,
.path-card:disabled {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}
.dcard.locked,
.map-card.locked {
  cursor: default;
}

.dcard:hover, .dcard.selected,
.wcard:hover, .wcard.selected,
.path-card:hover, .path-card:focus, .path-card.selected {
  border-color: var(--pink);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 106, 0.55), var(--glow-pink);
  background:
    linear-gradient(160deg, rgba(255, 45, 106, 0.14), transparent 55%),
    rgba(40, 18, 24, 0.65);
}

.dcard .dn {
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.dcard .ds { color: var(--muted); font-size: var(--fs-meta); line-height: 1.4; }

.choice-row .dcard {
  min-width: 132px;
  flex: 1 1 140px;
}
.choice-row .dcard:not(:has(.dn)) {
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-align: center;
}

#weapon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  width: 100%;
}

.super-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  width: 100%;
}

.wcard { padding: 14px; }

.wcard .wn {
  font-family: Orbitron, sans-serif;
  font-size: 14px;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.wcard .wk { color: var(--muted); font-size: var(--fs-meta); }
.wcard .ws { color: var(--cyan); font-size: 12px; margin-top: 8px; line-height: 1.45; }

#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#hud-top, #hud-bottom {
  position: absolute;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

#hud-top {
  top: 14px;
  align-items: flex-start;
  padding-right: 168px;
}
#hud-bottom { bottom: 16px; align-items: flex-end; }

#hud-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.logo {
  font-family: Orbitron, sans-serif;
  font-weight: 900;
  letter-spacing: 0.12em;
  font-size: 12px;
  opacity: 0.95;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 12px rgba(94, 240, 255, 0.25);
}
.logo img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex: 0 0 auto;
}

#hud-wave {
  display: block;
  color: var(--ink);
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 rgba(8, 10, 16, 0.7);
}

#hud-scorebox {
  text-align: right;
  padding: 8px 12px 9px;
  background:
    linear-gradient(160deg, rgba(255, 45, 106, 0.1), transparent 55%),
    var(--panel);
  border: 1px solid rgba(255, 210, 160, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.06), 0 0 0 1px rgba(255, 45, 106, 0.1), 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  min-width: 104px;
}
#score {
  font-family: Orbitron, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
#best { color: var(--muted); font-size: 9px; letter-spacing: 0.1em; margin-top: 3px; }
#combo-wrap { color: var(--gold); font-size: 18px; font-family: Orbitron, sans-serif; margin-bottom: 2px; }

#player-huds {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.phud {
  min-width: 196px;
  max-width: 248px;
  background:
    linear-gradient(165deg, rgba(255, 45, 106, 0.1), transparent 48%),
    var(--panel);
  padding: 9px 12px 10px;
  border: 1px solid rgba(255, 210, 160, 0.14);
  border-left: 3px solid var(--pc, var(--pink));
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 180, 0.06),
    0 0 18px rgba(255, 45, 106, 0.16),
    0 8px 22px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
}

.phud-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.phud-name { color: var(--pc, var(--ink)); font-family: Orbitron, sans-serif; letter-spacing: 0.1em; }
.phud-ammo {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.phud-weapon {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.phud-mods {
  color: #ffd166;
  font-size: 9px;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.phud-vital {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}
.phud-bar {
  margin-top: 0;
  height: 9px;
  flex: 1;
  background: rgba(12, 8, 6, 0.85);
  position: relative;
  overflow: hidden;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(255, 210, 160, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.35);
}
.phud-hpnum {
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  min-width: 1.8em;
  text-align: right;
}
.phud-hp, .phud-shield {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
}
.phud-hp { background: linear-gradient(90deg, var(--pc, #ff2d6a), #ff9db8); opacity: 1; box-shadow: 0 0 8px rgba(255, 45, 106, 0.35); }
.phud-shield { background: linear-gradient(90deg, #5ef0ff, #c9f7ff); opacity: 0.9; box-shadow: 0 0 8px rgba(94, 240, 255, 0.35); }
.phud-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.phud-stat { color: var(--green); }
.phud-super {
  letter-spacing: 0.04em;
  font-family: Orbitron, sans-serif;
  font-size: 11px;
}
.phud-super.ready { text-shadow: 0 0 10px currentColor; }

#join-hint {
  position: static;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  padding: 7px 11px;
  border: 1px solid var(--line-cyan);
  background: rgba(106, 240, 255, 0.08);
  border-radius: var(--radius);
  max-width: 320px;
}

#bonus-hud {
  display: flex;
  gap: 8px;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.bonus-chip {
  border: 1px solid currentColor;
  padding: 5px 9px;
  font-size: 11px;
  letter-spacing: 0.06em;
  background: rgba(22, 16, 12, 0.72);
  border-radius: 99px;
  box-shadow: 0 0 12px currentColor;
}

#hud-side {
  position: absolute;
  right: 16px;
  top: 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: min(240px, 46vw);
}

#pvp-board {
  position: static;
  min-width: 176px;
  width: 100%;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  border-radius: var(--radius);
}
#pvp-board .pb-title {
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.12em;
  color: var(--pink);
  margin-bottom: 6px;
  font-size: 11px;
}
#pvp-board .pb-row { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
#pvp-board .pb-muted { color: var(--muted); }
.char-note { max-width: 640px; color: var(--gold); font-size: 12px; }
.dcard[disabled] { opacity: 0.4; cursor: default; }

#killfeed {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  width: 100%;
}

.kf {
  font-size: 12px;
  color: #ebe4d8;
  background: rgba(22, 16, 12, 0.72);
  border: 1px solid rgba(255, 210, 160, 0.14);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255, 45, 106, 0.12);
  padding: 5px 10px;
}

#banner {
  position: absolute;
  top: 38%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: Orbitron, sans-serif;
  font-size: clamp(18px, 4vw, 32px);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 16px var(--pink), 0 0 32px rgba(255, 45, 106, 0.28);
  pointer-events: none;
  opacity: 0.88;
}

#dead-screen {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: default;
  background:
    radial-gradient(ellipse at center, rgba(90, 8, 22, 0.55) 0%, rgba(5, 6, 10, 0.72) 62%, rgba(5, 6, 10, 0.88) 100%);
}
#dead-screen.hidden { display: none; }
#dead-screen .dead-inner,
#dead-screen .btn,
#dead-screen button {
  pointer-events: auto;
  cursor: pointer;
}
#dead-screen .dead-inner { cursor: default; }

.dead-quit {
  pointer-events: auto;
  margin-top: 18px;
  position: relative;
  z-index: 2;
}
.dead-inner {
  text-align: center;
  animation: dead-in 0.35s ease-out;
}
.dead-title {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: clamp(56px, 14vw, 112px);
  font-weight: 900;
  letter-spacing: 0.22em;
  color: #ff2d6a;
  text-shadow:
    0 0 28px rgba(255, 45, 106, 0.55),
    0 8px 32px rgba(0, 0, 0, 0.55);
}
#dead-screen .dead-inner {
  background:
    linear-gradient(165deg, rgba(255, 45, 106, 0.12), transparent 50%),
    var(--panel-solid);
  border: 1px solid rgba(255, 45, 106, 0.35);
  box-shadow: var(--glow-pink), 0 16px 40px rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}
#dead-timer {
  margin: 8px 0 0;
  font-family: Orbitron, sans-serif;
  font-size: clamp(36px, 8vw, 64px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #f4f1ea;
  text-shadow: 0 0 18px rgba(106, 240, 255, 0.25);
}
#dead-timer.dead-out {
  font-size: clamp(22px, 5vw, 36px);
  letter-spacing: 0.18em;
  color: var(--muted);
}
.dead-sub {
  margin: 6px 0 0;
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.72);
}
.dead-hint {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.dead-hint.dead-hint-loud {
  margin-top: 20px;
  font-size: clamp(15px, 2.4vw, 20px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f4f1ea;
  text-shadow: 0 0 14px rgba(106, 240, 255, 0.35);
  max-width: min(520px, 92vw);
  line-height: 1.45;
}
.dead-hint:empty { display: none; }
.dead-hint kbd {
  font-family: Orbitron, sans-serif;
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid rgba(106, 240, 255, 0.45);
  border-radius: 4px;
  color: var(--cyan);
  background: rgba(106, 240, 255, 0.08);
}
.dead-hint-loud kbd { font-size: 13px; padding: 4px 10px; }
@keyframes dead-in {
  from { opacity: 0; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1); }
}

#respawn-pick {
  position: fixed;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  z-index: 16;
  pointer-events: auto;
  border-color: var(--line-pink);
  padding: 18px 20px 20px;
  min-width: min(640px, 92vw);
  max-width: 920px;
  text-align: center;
  border-radius: var(--radius);
}

#respawn-who {
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

#respawn-grid { display: flex; flex-direction: column; gap: 14px; }

.rpick-name {
  font-size: 12px;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.rpick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#corner-tools {
  position: fixed;
  z-index: 40;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  max-width: calc(100vw - 16px);
  pointer-events: auto;
}

#corner-profile.corner-profile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  min-width: 0;
  max-width: min(200px, 42vw);
  background: var(--panel);
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(108, 92, 231, 0.18),
    inset 0 0 18px rgba(106, 240, 255, 0.04);
}

.corner-profile-line {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.corner-profile-line b {
  color: var(--cyan);
  font-family: Orbitron, sans-serif;
  font-weight: 600;
}

#corner-profile .btn.mini {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 6px 10px;
  font-size: 9px;
  min-height: 28px;
  border-color: rgba(108, 92, 231, 0.45);
  color: var(--ink);
}
#corner-profile .profile-edit-btn.has-unspent {
  border-color: rgba(255, 222, 89, 0.75);
  box-shadow: 0 0 14px rgba(255, 222, 89, 0.35);
}

#corner-profile .btn.mini:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

#corner-tools-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  flex: 0 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#corner-tools-bar button {
  height: 32px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: Orbitron, sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 0 10px;
  border-radius: 6px;
}

#corner-tools-bar button:hover {
  color: var(--cyan);
  background: rgba(106, 240, 255, 0.08);
}

#btn-mute {
  width: 32px;
  padding: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  margin-right: 2px;
}
.lang-switch button {
  min-width: 34px;
  padding: 0 8px;
  opacity: 0.45;
}
.lang-switch button.on {
  opacity: 1;
  color: var(--cyan);
  background: rgba(106, 240, 255, 0.12);
}
#hud:not(.hidden) ~ #corner-tools #lang-switch {
  display: none;
}
#hud:not(.hidden) ~ #corner-tools #corner-profile {
  display: none !important;
}
#hud:not(.hidden) ~ #corner-tools #btn-acc-logout {
  display: none !important;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--muted);
}
.score-table th {
  font-family: Orbitron, sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  padding: 0 6px 8px 0;
  border-bottom: 1px solid var(--line);
}
.score-table th:first-child,
.score-table td:first-child { width: 22px; color: var(--muted); }
.score-table th:nth-child(3),
.score-table td:nth-child(3),
.score-table th:nth-child(4),
.score-table td:nth-child(4),
.score-table th:nth-child(5),
.score-table td:nth-child(5) { text-align: right; }
.score-table td {
  padding: 7px 6px 7px 0;
  vertical-align: baseline;
}
.score-table tr + tr td { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.score-table .nm { color: var(--ink); }
.score-table .empty td {
  color: var(--muted);
  text-align: left;
  padding: 10px 0 2px;
  border: 0;
}

#go-stats,
.go-stats {
  color: var(--muted);
  line-height: 1.7;
  padding: 14px 18px;
  width: min(920px, 100%);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.go-stats b { color: var(--ink); font-family: Orbitron, sans-serif; }

.go-main-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 18px;
  align-items: stretch;
  width: 100%;
}
.go-main-row .go-table-block {
  flex: 1 1 280px;
  min-width: 0;
}

.go-mvp {
  flex: 0 0 220px;
  text-align: center;
  padding: 14px 12px 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--mvp, #ffc857) 35%, rgba(255, 255, 255, 0.12));
  background:
    radial-gradient(ellipse at 50% 18%, color-mix(in srgb, var(--mvp, #ffc857) 28%, transparent), transparent 55%),
    linear-gradient(160deg, rgba(18, 22, 36, 0.92), rgba(8, 10, 18, 0.96));
  box-shadow:
    0 0 24px color-mix(in srgb, var(--mvp, #ffc857) 32%, transparent),
    0 10px 28px rgba(0, 0, 0, 0.35);
}
.go-mvp-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a1208;
  background: linear-gradient(135deg, #ffe28a, #ffc857 45%, #e8a020);
  box-shadow: 0 0 12px rgba(255, 200, 87, 0.45);
}
.go-mvp-frame {
  border-radius: 14px;
  overflow: hidden;
  margin: 0 auto 10px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 0 28px color-mix(in srgb, var(--mvp, #ffc857) 22%, transparent),
    inset 0 0 1px rgba(255, 255, 255, 0.18);
}
#go-mvp-canvas {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}
.go-mvp-name {
  margin: 0 0 4px;
  font-family: Orbitron, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 0 0 14px color-mix(in srgb, var(--mvp, #ffc857) 55%, transparent);
}
.go-mvp-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .go-main-row {
    flex-direction: column;
    align-items: center;
  }
  .go-mvp {
    flex: 0 0 auto;
    width: min(220px, 100%);
  }
  .go-main-row .go-table-block {
    flex: 1 1 auto;
    width: 100%;
  }
}

.go-report {
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.go-summary {
  margin: 0;
  text-align: center;
  line-height: 1.65;
  font-size: 13px;
}
.go-table-block { width: 100%; }
.go-table-title {
  margin: 0 0 8px;
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-align: center;
}
.go-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}
.go-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.35;
}
.go-table th,
.go-table td {
  padding: 8px 10px;
  white-space: nowrap;
  vertical-align: middle;
}
.go-table th {
  font-family: Orbitron, sans-serif;
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.go-table td {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
}
.go-table .nm { color: var(--ink); font-weight: 600; }
.go-table th:nth-child(n+3),
.go-table td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.go-table-players th:first-child,
.go-table-players td:first-child {
  width: 28px;
  text-align: center;
  color: var(--muted);
}
.go-table-monsters th:last-child,
.go-table-monsters td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.go-table-monsters .go-type-id {
  font-family: "JetBrains Mono", "Share Tech Mono", monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  text-align: left;
}
.go-table tr.empty td {
  text-align: center;
  color: var(--muted);
  white-space: normal;
  padding: 12px 10px;
  border: 0;
}
.go-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 6px currentColor;
}

.path-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}
.path-card { padding: 26px 22px; }
.path-card.alt:hover, .path-card.alt:focus, .path-card.alt.selected {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold), 0 0 18px rgba(255, 200, 87, 0.1);
  background: rgba(255, 200, 87, 0.05);
}
.path-name {
  font-family: Orbitron, sans-serif;
  font-size: 18px;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.path-blurb { color: var(--muted); font-size: 13px; line-height: 1.45; }


.campaign-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem;
}
.campaign-page-nav .btn[disabled] {
  opacity: 0.35;
  pointer-events: none;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: min(640px, 100%);
}
.level-btn {
  border: 1px solid rgba(255, 210, 160, 0.28);
  background: rgba(22, 16, 12, 0.78);
  color: var(--ink);
  padding: 12px 4px;
  min-height: 44px;
  cursor: pointer;
  font-family: Orbitron, sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(94, 240, 255, 0.06), 0 0 12px rgba(0, 0, 0, 0.25);
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.level-btn:hover:not(.locked) {
  border-color: rgba(94, 240, 255, 0.55);
  background: rgba(30, 22, 16, 0.92);
  color: #fff;
}
.level-btn.locked {
  opacity: 1;
  cursor: default;
  color: rgba(154, 163, 184, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 16, 0.55);
  box-shadow: none;
}
.level-btn.selected {
  border-color: var(--pink);
  color: #fff;
  background: rgba(255, 45, 106, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 106, 0.65), 0 0 16px rgba(255, 45, 106, 0.28);
}
.level-btn.cleared {
  color: var(--green);
  border-color: rgba(61, 255, 138, 0.45);
  background: rgba(61, 255, 138, 0.10);
  box-shadow: inset 0 0 0 1px rgba(61, 255, 138, 0.25), 0 0 12px rgba(61, 255, 138, 0.12);
}
.level-btn.cleared.selected {
  border-color: var(--pink);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 45, 106, 0.22), rgba(61, 255, 138, 0.12));
}

.map-row, .choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 4px;
}
.map-card {
  width: 156px;
  padding: 8px;
}
.map-card.selected {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px var(--cyan), 0 0 16px rgba(106, 240, 255, 0.1);
}
.map-card canvas { display: block; width: 100%; height: 72px; background: #0b0d14; margin-bottom: 6px; }
.map-card .mn { font-family: Orbitron, sans-serif; font-size: 11px; letter-spacing: 0.1em; }
.map-card .mb { color: var(--muted); font-size: 10px; line-height: 1.35; margin-top: 3px; }

.lobby-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  width: 100%;
  text-align: left;
}
.lobby-opts, .lobby-roster { padding: 16px 18px 18px; }
.lobby-opts .choice-row,
.lobby-opts .map-row { justify-content: flex-start; }
.lobby-opts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.lobby-opts-head .sub { margin: 0; }
.lobby-group { margin-top: 14px; }
.lobby-group:first-of-type { margin-top: 8px; }
.lobby-group .sub { margin-top: 0; }
.lobby-opts.locked .choice-row,
.lobby-opts.locked .map-row {
  pointer-events: none;
}
.lock-pill {
  font-family: Orbitron, sans-serif;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid rgba(255, 200, 87, 0.35);
  background: rgba(255, 200, 87, 0.08);
  padding: 4px 8px;
  border-radius: 99px;
}
.lobby-lock-note {
  width: 100%;
  text-align: left;
  color: var(--gold);
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 14px;
  border: 1px solid rgba(255, 200, 87, 0.3);
  background: rgba(255, 200, 87, 0.07);
  border-radius: var(--radius);
}
.lobby-team {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius);
}
.lobby-team-label {
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-right: 4px;
}
.team-pill {
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  border: 1px solid #2a3142;
  background: transparent;
  color: var(--ink);
  padding: 7px 12px;
  min-height: 32px;
  border-radius: 99px;
  cursor: pointer;
}
.team-pill.red { color: #ff6b8f; }
.team-pill.blue { color: #7ab8ff; }
.team-pill.red.selected {
  border-color: #ff2d6a;
  background: rgba(255, 45, 106, 0.16);
  color: #ff8aa8;
}
.team-pill.blue.selected {
  border-color: #3d9dff;
  background: rgba(61, 157, 255, 0.16);
  color: #9cc8ff;
}
.team-pill:disabled { opacity: 0.4; cursor: default; }
.sub {
  font-family: Orbitron, sans-serif;
  font-size: var(--fs-kicker);
  letter-spacing: 0.16em;
  color: var(--pink);
  margin: 14px 0 8px;
}
.lobby-opts > .sub:first-child,
.lobby-roster > .sub:first-child { margin-top: 0; }
.lobby-players { display: grid; gap: 8px; }
.lobby-seat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  font-size: 12px;
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
}
.lobby-seat.host { border-left-color: var(--pink); }
.lobby-seat.bot {
  border-left-color: #3a4254;
  opacity: 0.92;
  flex-wrap: wrap;
  align-items: flex-start;
}
.lobby-seat.team-red { border-left-color: #ff2d6a; }
.lobby-seat.team-blue { border-left-color: #3d9dff; }
.seat-bot-ctrls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex: 1 1 170px;
}
.seat-diff-btn {
  font-family: Orbitron, sans-serif;
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 5px 8px;
  min-height: 28px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-transform: none;
}
.seat-diff-btn.easy.selected {
  color: var(--green);
  border-color: rgba(61, 255, 138, 0.45);
  background: rgba(61, 255, 138, 0.1);
}
.seat-diff-btn.normal.selected {
  color: var(--cyan);
  border-color: var(--line-cyan);
  background: rgba(106, 240, 255, 0.1);
}
.seat-diff-btn.hard.selected {
  color: var(--pink);
  border-color: var(--line-pink);
  background: rgba(255, 45, 106, 0.1);
}
.seat-diff-btn:disabled,
.seat-diff-btn.locked {
  opacity: 0.5;
  cursor: default;
}
.lobby-seat.bot .team-pill {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 9px;
}
.lobby-seat .seat-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}
.lobby-seat .seat-name { font-family: Orbitron, sans-serif; letter-spacing: 0.06em; }
.lobby-seat .seat-meta { color: var(--muted); font-size: 10px; letter-spacing: 0.08em; }
.lobby-seat .seat-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.lobby-seat .seat-state { color: var(--muted); letter-spacing: 0.1em; font-size: 10px; font-family: Orbitron, sans-serif; flex-shrink: 0; }
.lobby-seat.ready .seat-state { color: var(--green); }
.seat-kick {
  font-family: Orbitron, sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 5px 8px;
  min-height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 45, 106, 0.45);
  background: rgba(255, 45, 106, 0.12);
  color: #ff8aa8;
  cursor: pointer;
}
.seat-kick:hover {
  border-color: rgba(255, 45, 106, 0.8);
  background: rgba(255, 45, 106, 0.22);
  color: #fff;
}
.lobby-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.lobby-countdown {
  margin: 0;
  text-align: center;
  font-family: Orbitron, sans-serif;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: #ffc857;
}
.lobby-start-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
#btn-lobby-start:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.seat-diff {
  font-family: Orbitron, sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
}
.seat-diff.easy { color: var(--green); border-color: rgba(61, 255, 138, 0.35); }
.seat-diff.normal { color: var(--cyan); border-color: var(--line-cyan); }
.seat-diff.hard { color: var(--pink); border-color: var(--line-pink); }
.lobby-urls,
.lobby-share-hint {
  color: var(--cyan);
  font-size: 12px;
  line-height: 1.55;
  max-width: 100%;
  width: 100%;
  margin: 0;
  text-align: center;
}
.lobby-code-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 20px;
  border: 1px solid var(--line-cyan);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(106, 240, 255, 0.16), transparent 62%),
    rgba(8, 12, 20, 0.72);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(106, 240, 255, 0.08), 0 0 28px rgba(106, 240, 255, 0.08);
}
.lobby-code-kicker {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--cyan);
}
.lobby-code-hit {
  display: block;
  width: min(100%, 560px);
  padding: 10px 16px 14px;
  border: 1px solid rgba(106, 240, 255, 0.45);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  cursor: pointer;
  color: inherit;
}
.lobby-code-hit:hover,
.lobby-code-hit:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(106, 240, 255, 0.35), 0 0 24px rgba(106, 240, 255, 0.16);
}
.lobby-code-hit span {
  display: block;
  font-family: Orbitron, sans-serif;
  font-weight: 900;
  font-size: clamp(44px, 11vw, 86px);
  letter-spacing: 0.28em;
  line-height: 1;
  color: #f4fdff;
  text-shadow: 0 0 18px rgba(106, 240, 255, 0.55);
}
.lobby-code-copied {
  margin: 0;
  min-height: 1.2em;
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--green);
}
.lobby-access {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.lobby-access .dcard {
  min-width: 132px;
}
.create-opts {
  width: 100%;
  display: grid;
  gap: 14px;
}
.create-opts .create-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.create-combo-hint {
  max-width: 560px;
}
.join-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(18, 12, 10, 0.55);
  border: 1px solid rgba(255, 200, 87, 0.28);
  box-shadow: inset 0 0 0 1px rgba(94, 240, 255, 0.08);
}
.join-chip {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 220, 160, 0.45);
  background: rgba(42, 28, 18, 0.92);
  color: #f4f1ea;
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  border-radius: 99px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.join-chip:hover {
  color: #fff;
  border-color: rgba(94, 240, 255, 0.85);
  background: rgba(60, 40, 28, 0.98);
  box-shadow: 0 0 12px rgba(94, 240, 255, 0.25);
}
.join-chip.on {
  color: #fff;
  border-color: rgba(255, 45, 106, 0.95);
  background: linear-gradient(180deg, rgba(255, 45, 106, 0.42), rgba(255, 45, 106, 0.22));
  box-shadow:
    0 0 14px rgba(255, 45, 106, 0.45),
    inset 0 0 0 1px rgba(255, 200, 87, 0.25);
}
.arena-browser {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  text-align: left;
}
.arena-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.arena-group-title {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--pink);
}
.arena-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #2a3142;
  background:
    linear-gradient(120deg, rgba(255, 45, 106, 0.08), transparent 42%),
    rgba(8, 10, 16, 0.72);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.arena-card:hover,
.arena-card:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(106, 240, 255, 0.2), 0 0 18px rgba(106, 240, 255, 0.08);
}
.arena-card.private {
  background:
    linear-gradient(120deg, rgba(255, 200, 87, 0.08), transparent 42%),
    rgba(8, 10, 16, 0.72);
}
.arena-card.live {
  opacity: 0.78;
  cursor: default;
}
.arena-card.need-code {
  border-color: var(--gold);
}
.arena-card-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.arena-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.arena-name {
  font-family: Orbitron, sans-serif;
  font-size: 15px;
  letter-spacing: 0.08em;
}
.arena-code {
  font-family: Orbitron, sans-serif;
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}
.arena-meta {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.45;
}
.arena-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.arena-badge {
  font-family: Orbitron, sans-serif;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.arena-badge.public { color: var(--cyan); border-color: var(--line-cyan); }
.arena-badge.private { color: var(--gold); border-color: rgba(255, 200, 87, 0.4); }
.arena-badge.open { color: var(--green); border-color: rgba(61, 255, 138, 0.35); }
.arena-badge.live { color: var(--pink); border-color: var(--line-pink); }
.arena-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.arena-players {
  font-family: Orbitron, sans-serif;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.arena-action {
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.lobby-list {
  display: grid;
  gap: 8px;
  width: min(480px, 100%);
}
.lobby-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  min-height: 48px;
  background: rgba(255,255,255,0.03);
  border: 1px solid #2a3142;
  border-radius: var(--radius);
  color: var(--ink);
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.lobby-row:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}
.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
#upgrade-screen .screen-inner.narrow {
  width: min(720px, 100%);
}
.lobby-camp-levels {
  max-height: 160px;
  overflow: auto;
}
.arena-badge.campaign {
  border-color: var(--pink, #ff2d6a);
  color: var(--pink, #ff2d6a);
}

#account-auth, #account-in { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#account-in { padding: 10px 16px; border: 1px solid var(--line-pink); background: rgba(255, 45, 106, 0.07); border-radius: var(--radius); width: min(420px, 100%); }
#account-in b { color: var(--pink); font-family: Orbitron, sans-serif; }
.pw-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}
.pw-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.pw-modal-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 45, 106, 0.18),
    0 18px 48px rgba(0, 0, 0, 0.55);
}
.pw-modal-panel .sub {
  margin: 0 0 2px;
  text-align: center;
}
.pw-modal-panel .name-input { width: 100%; }
.err.ok { color: var(--green); }

.version-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(106, 240, 255, 0.32);
  background: rgba(8, 10, 16, 0.55);
  color: var(--cyan);
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
}
.version-chip:hover {
  border-color: var(--cyan);
  background: rgba(106, 240, 255, 0.1);
  color: #fff;
}
.version-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2d6a;
  box-shadow: 0 0 10px rgba(255, 45, 106, 0.75);
}
.version-chip-dot.hidden { display: none; }
.title-version-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 87, 0.35);
  background: rgba(255, 200, 87, 0.08);
  color: #ffc857;
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.title-version-link:hover {
  border-color: #ffc857;
  background: rgba(255, 200, 87, 0.16);
  color: #fff;
}
.title-version-num {
  color: var(--ink);
  opacity: 0.85;
}
.changelog-modal {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}
.changelog-modal.hidden { display: none; }
.changelog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.changelog-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 20px 18px;
  text-align: left;
  box-shadow:
    0 0 0 1px rgba(106, 240, 255, 0.16),
    0 20px 52px rgba(0, 0, 0, 0.55);
}
.changelog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.changelog-head .kicker { margin: 0 0 4px; }
.changelog-head h2 {
  margin: 0;
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing: 0.12em;
}
.changelog-current {
  margin: 0;
}
.changelog-body {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-right: 4px;
  min-height: 0;
}
.changelog-release {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(8, 10, 16, 0.45);
}
.changelog-release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}
.changelog-ver {
  font-family: Orbitron, sans-serif;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: #ffc857;
}
.changelog-date {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.changelog-release-title {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.changelog-section { display: flex; flex-direction: column; gap: 6px; }
.changelog-kind {
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  margin: 0;
}
.changelog-kind.added { color: #7dffb3; }
.changelog-kind.improved { color: #6af0ff; }
.changelog-kind.fixed { color: #ff8aa8; }
.changelog-kind.removed { color: var(--muted); }
.changelog-section ul {
  margin: 0;
  padding-left: 1.1em;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.changelog-section li::marker { color: rgba(106, 240, 255, 0.55); }

.profile-boards { margin-top: 4px; width: 100%; }
.profile-panel {
  width: 100%;
  text-align: left;
  padding: 18px 18px 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 45, 106, 0.1);
  overflow: hidden;
}
.profile-panel-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.88fr) minmax(280px, 1.2fr);
  gap: 22px 28px;
  align-items: start;
}
.profile-llama-col,
.profile-bonus-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.profile-llama-col .sub,
.profile-bonus-col .sub {
  margin: 0;
}
.profile-llama-col .hint,
.profile-bonus-col .hint {
  margin: 0;
  max-width: none;
}
.profile-llama-col .profile-stat-totals {
  margin-top: 2px;
  width: 100%;
}
#profile-llama-canvas {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 280 / 190;
  background: #1a120e;
  border: 1px solid rgba(255, 200, 87, 0.4);
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 1px rgba(94, 240, 255, 0.12),
    inset 0 0 36px rgba(255, 45, 106, 0.1),
    0 0 18px rgba(94, 240, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.35);
}
.profile-cosmetics {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  width: 100%;
  max-width: none;
  padding: 16px 16px 18px;
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(108, 92, 231, 0.12), transparent 42%),
    rgba(8, 10, 16, 0.55);
  border: 1px solid rgba(106, 240, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.profile-cosmo-span {
  grid-column: 1 / -1;
}
.profile-cosmo-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-cosmo-title {
  font-family: Orbitron, sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #ffc857;
}
.profile-cosmo-blurb {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}
.profile-cosmo-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}
.profile-cosmo-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.profile-cosmo-row.cape-row .profile-cosmo-lab {
  color: #ff8aa8;
}
.profile-cosmo-lab {
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  line-height: 1.2;
}
.profile-cosmo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-cosmo-chip {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 14, 22, 0.9);
  color: var(--ink);
  font-size: 9px;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s, background 0.15s;
}
.profile-cosmo-chip svg {
  width: 18px;
  height: 18px;
  display: block;
}
.profile-cosmo-chip:hover {
  border-color: rgba(106, 240, 255, 0.55);
  transform: translateY(-1px);
}
.profile-cosmo-chip.on {
  border-color: #ffc857;
  box-shadow:
    0 0 0 1px rgba(255, 200, 87, 0.4),
    0 0 14px rgba(255, 200, 87, 0.18);
}
.profile-cosmo-chip.icon.on {
  background: rgba(255, 200, 87, 0.1);
}
.profile-cosmo-chip.cape.on {
  border-color: var(--chip-accent, #ff2d6a);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--chip-accent, #ff2d6a) 55%, transparent),
    0 0 16px color-mix(in srgb, var(--chip-accent, #ff2d6a) 28%, transparent);
}
.profile-cosmo-chip.swatch {
  background-size: cover;
  position: relative;
  overflow: hidden;
}
.profile-cosmo-chip.swatch.base-swatch {
  background-image:
    linear-gradient(135deg, #ff2d6a 0%, #6c5ce7 50%, #00cec9 100%);
}
.profile-cosmo-chip.swatch.on::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75);
  pointer-events: none;
}
.profile-cosmo-chip.swatch span {
  display: none;
}
.profile-bonus-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.profile-xp-line {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-xp-meta {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.profile-bonus-stack > .hint {
  margin: 0;
  line-height: 1.45;
}
.personal-best {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.personal-best .pb-lab {
  color: var(--cyan);
  letter-spacing: 0.08em;
  font-size: 11px;
  flex: 1 1 110px;
}
.personal-best .pb-val {
  color: var(--ink);
  text-align: right;
  flex: 1 1 140px;
}
.profile-xp-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 160, 255, 0.28);
  overflow: hidden;
}
.profile-xp-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c9a0ff, #ff2d6a);
}
.profile-stat-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  padding: 10px 12px;
  border: 1px solid rgba(106, 240, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(8, 10, 16, 0.35);
}
.profile-llama-col .profile-stat-totals {
  grid-template-columns: 1fr;
}
.profile-stat-total {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.profile-stat-total b {
  color: var(--ink);
  font-family: Orbitron, sans-serif;
  font-weight: 600;
}
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-stat-card {
  text-align: left;
  cursor: pointer;
}
.profile-stat-card.locked,
.profile-stat-card:disabled {
  opacity: 0.55;
  cursor: default;
}
.profile-spend-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 222, 89, 0.55);
  background: linear-gradient(135deg, rgba(255, 222, 89, 0.16), rgba(201, 160, 255, 0.12));
  box-shadow: 0 0 18px rgba(255, 222, 89, 0.18), inset 0 0 20px rgba(255, 222, 89, 0.06);
  animation: profile-spend-glow 2s ease-in-out infinite;
}
.profile-spend-banner-title {
  font-family: Orbitron, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffde59;
}
.profile-spend-banner-body {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
}
.profile-xp-line.has-unspent .profile-xp-meta:first-child {
  color: #ffde59;
  font-weight: 600;
}
.profile-stat-grid.spendable .profile-stat-card {
  border-color: rgba(255, 222, 89, 0.45);
  box-shadow: 0 0 14px rgba(255, 222, 89, 0.18);
  background: rgba(255, 222, 89, 0.06);
}
.profile-stat-grid.spendable .profile-stat-card:hover {
  border-color: rgba(255, 222, 89, 0.85);
  box-shadow: 0 0 20px rgba(255, 222, 89, 0.35);
  transform: translateY(-1px);
}
.profile-stat-add {
  margin-top: 6px;
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.profile-stat-grid.spendable .profile-stat-add {
  color: #ffde59;
  font-weight: 700;
  letter-spacing: 0.1em;
}
@keyframes profile-spend-glow {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 222, 89, 0.14), inset 0 0 16px rgba(255, 222, 89, 0.04); }
  50% { box-shadow: 0 0 22px rgba(255, 222, 89, 0.32), inset 0 0 22px rgba(255, 222, 89, 0.1); }
}
.profile-upgrades {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-ucard {
  pointer-events: none;
  cursor: default;
  padding: 12px 14px;
}
.profile-ucard:hover { border-color: #2a3142; box-shadow: none; background: rgba(255,255,255,0.03); }
.profile-bonus-col .guest-save-notice {
  margin: 0;
  max-width: none;
  order: 0;
}

#profile-screen .screen-inner {
  width: min(920px, 100%);
  gap: 18px;
}

#touch-ui {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}
#stick-base {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.25);
}
#stick-knob {
  position: absolute;
  left: 38px;
  top: 38px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,45,106,0.85);
}
#aim-base {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  position: absolute;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(94, 240, 255, 0.45);
  background: rgba(0, 8, 16, 0.35);
  box-shadow: 0 0 16px rgba(94, 240, 255, 0.18), inset 0 0 18px rgba(255, 45, 106, 0.12);
  z-index: 5;
}
#aim-knob {
  position: absolute;
  left: 39px;
  top: 39px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(94, 240, 255, 0.9);
  box-shadow: 0 0 12px rgba(94, 240, 255, 0.45);
  will-change: transform;
}
#aim-base.aim-firing {
  border-color: rgba(255, 45, 106, 0.75);
  box-shadow: 0 0 22px rgba(255, 45, 106, 0.45), 0 0 28px rgba(94, 240, 255, 0.28), inset 0 0 20px rgba(255, 45, 106, 0.22);
}
#aim-base.aim-firing #aim-knob {
  background: rgba(255, 45, 106, 0.92);
  box-shadow: 0 0 16px rgba(255, 45, 106, 0.55);
}
.aim-label {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  font-family: Orbitron, sans-serif;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(94, 240, 255, 0.85);
  pointer-events: none;
  text-shadow: 0 0 8px rgba(94, 240, 255, 0.35);
  white-space: nowrap;
}
#aim-base.aim-firing .aim-label {
  color: rgba(255, 180, 200, 0.95);
}
#touch-btns {
  pointer-events: auto;
  position: absolute;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(150px, calc(148px + env(safe-area-inset-bottom, 0px)));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
#touch-btns button {
  width: 64px;
  height: 44px;
  border: 1px solid rgba(94, 240, 255, 0.32);
  background: rgba(8, 10, 16, 0.78);
  box-shadow: 0 0 14px rgba(94, 240, 255, 0.12);
  color: #fff;
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  touch-action: manipulation;
}

#touch-pause {
  pointer-events: auto;
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  z-index: 16;
  min-width: 72px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(94, 240, 255, 0.45);
  background: rgba(8, 10, 16, 0.82);
  box-shadow: 0 0 14px rgba(94, 240, 255, 0.18);
  color: var(--cyan);
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  border-radius: var(--radius);
  touch-action: manipulation;
}

@media (max-width: 900px) {
  #weapon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diff-row { grid-template-columns: 1fr; }
  .super-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boards { grid-template-columns: 1fr; }
  .path-row { grid-template-columns: 1fr; }
  .lobby-grid { grid-template-columns: 1fr; }
  .create-opts .create-row { grid-template-columns: 1fr; }
  .arena-card { grid-template-columns: 1fr; }
  .arena-side { flex-direction: row; justify-content: space-between; align-items: center; }
  .profile-panel-grid { grid-template-columns: 1fr; }
  .profile-cosmo-rows { grid-template-columns: 1fr; }
  #profile-llama-canvas { width: 100%; max-width: none; height: auto; }
  .profile-upgrades { grid-template-columns: 1fr; }
  .profile-stat-grid { grid-template-columns: 1fr; }
  .upgrade-grid { grid-template-columns: 1fr; }
  .level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .screen { padding: 56px 14px 28px; }
  .mode-row .btn { flex: 1 1 42%; }
  .title-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .title-modes .btn {
    flex: none;
    width: 100%;
    min-width: 0;
    min-height: 46px;
  }
  .title-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 100%;
  }
  .brand-by-row {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    margin-left: 0;
    gap: 8px;
    justify-content: center;
  }
  #hud-top { padding-right: 168px; }
  .map-card { width: calc(50% - 5px); min-width: 140px; }
}

@media (max-width: 560px) {
  h1 { font-size: 42px; }
  .title-mark { width: 108px; height: 108px; border-radius: 24px; }
  #title-screen.screen::before,
  #solo-path-screen.screen::before,
  #campaign-screen.screen::before,
  #upgrade-screen.screen::before,
  #net-hub-screen.screen::before,
  #join-screen.screen::before,
  #lobby-screen.screen::before,
  #loadout-screen.screen::before,
  #profile-screen.screen::before {
    background-size: cover;
    background-position: center bottom;
  }
  .screen-inner { gap: 14px; }
  #hud-top {
    flex-direction: column;
    align-items: flex-start;
    padding-right: 96px;
    gap: 8px;
  }
  #hud-scorebox { text-align: left; }
  #hud-bottom { flex-direction: column; align-items: stretch; }
  #bonus-hud { justify-content: flex-start; }
  .phud { min-width: 0; max-width: none; width: min(100%, 280px); }
  #hud-side { top: 118px; max-width: 46vw; }
  #weapon-grid { grid-template-columns: 1fr; }
  .join-form, .auth-panel { width: 100%; }
  #corner-tools {
    top: 8px;
    right: 8px;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  #corner-profile.corner-profile {
    max-width: min(152px, 40vw);
    padding: 6px 8px;
  }
  .corner-profile-line { font-size: 9px; }
  #corner-profile .btn.mini {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 8px;
  }
}


/* —— Friends floating bubble (title) —— */
.friends-bubble {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.friends-bubble > * { pointer-events: auto; }
.friends-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 106, 0.55);
  background: linear-gradient(135deg, rgba(255, 45, 106, 0.92), rgba(108, 92, 231, 0.92));
  color: #fff;
  font-family: Orbitron, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 45, 106, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.friends-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 45, 106, 0.5);
}
.friends-fab-ico { font-size: 18px; line-height: 1; }
.friends-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffde59;
  color: #1a1020;
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(20, 10, 30, 0.85), 0 0 12px rgba(255, 222, 89, 0.7);
  animation: friends-badge-pulse 1.2s ease-in-out infinite;
}
.friends-badge.hidden { display: none !important; }
.friends-bubble.has-notif .friends-fab {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 222, 89, 0.55);
}
.friends-badge.friends-badge-flash {
  animation: friends-badge-pulse 0.35s ease-in-out 3;
}
@keyframes friends-badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.profile-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ffde59;
  color: #1a1020;
  font-family: Orbitron, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(20, 10, 30, 0.85), 0 0 12px rgba(255, 222, 89, 0.7);
  animation: friends-badge-pulse 1.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
.profile-badge.hidden { display: none !important; }
.profile-badge.profile-badge-flash {
  animation: friends-badge-pulse 0.35s ease-in-out 3;
}
.friends-float-panel {
  width: min(340px, calc(100vw - 28px));
  max-height: min(520px, calc(100vh - 110px));
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(255, 45, 106, 0.4);
  background: rgba(12, 8, 22, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.friends-float-panel.hidden { display: none !important; }
.friends-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.friends-float-head h3 {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--pink);
}
.friends-search-row,
.friends-chat-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.friends-search-row .name-input,
.friends-chat-row .name-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  font-size: 12px;
  padding: 8px 10px;
  min-height: 36px;
  text-transform: none;
  letter-spacing: 0.06em;
}
.friends-search-row .btn,
.friends-chat-row .btn {
  flex: 0 0 auto;
  padding: 8px 10px;
  font-size: 11px;
}
.friends-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.friends-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line-pink, rgba(255,45,106,0.25));
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  font-size: 12px;
}
.friends-list li:hover,
.friends-list li.active {
  border-color: var(--pink);
  background: rgba(255, 45, 106, 0.1);
}
.friends-list .nm { font-family: Orbitron, sans-serif; letter-spacing: 0.08em; }
.friends-list .friend-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.friends-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  display: inline-block;
  flex: 0 0 auto;
}
.friends-dot.on { background: #7dffb3; box-shadow: 0 0 6px rgba(125,255,179,0.6); }
.friends-incoming {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.friends-incoming .req {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 200, 87, 0.35);
  background: rgba(255, 200, 87, 0.08);
  border-radius: var(--radius);
}
.friends-incoming .req .mode-row { gap: 4px; margin: 0; }
.friends-incoming .btn.mini { padding: 4px 8px; font-size: 10px; }
.friends-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 8px;
  margin-top: 4px;
}
.friends-chat-with {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-family: Orbitron, sans-serif;
}
.friends-chat-log {
  max-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.35;
}
.friends-chat-log .msg {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  word-break: break-word;
}
.friends-chat-log .msg.me {
  background: rgba(108, 92, 231, 0.22);
  align-self: flex-end;
}
.friends-chat-log .msg .who {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
@media (max-width: 640px) {
  .friends-bubble { right: 10px; bottom: 10px; }
  .friends-fab-label { display: none; }
  .friends-fab { padding: 12px; border-radius: 50%; }
}

.go-friends {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 4px;
}
.go-friends .go-friend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  font-size: 12px;
  background: rgba(255,255,255,0.03);
}
.go-friends .go-friend-row .nm {
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.08em;
}
.go-friends .btn.mini { padding: 4px 10px; font-size: 11px; }


/* Friend lobby invites */
.lobby-invite {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}
.lobby-invite .sub { margin-top: 0; }
.lobby-opts .diff-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.lobby-opts.locked .diff-row { pointer-events: none; }

.lobby-invite-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.lobby-invite-list .invite-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  font-size: 12px;
  background: rgba(255,255,255,0.03);
}
.lobby-invite-list .invite-row .nm {
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.08em;
}
.friend-invite-toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 120;
  width: min(420px, calc(100vw - 24px));
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 222, 89, 0.55);
  background: rgba(18, 10, 28, 0.96);
  box-shadow: 0 12px 36px rgba(0,0,0,0.55), 0 0 20px rgba(255, 222, 89, 0.25);
  text-align: center;
}
.friend-invite-toast.hidden { display: none !important; }
.friend-invite-kicker {
  margin: 0 0 4px;
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #ffde59;
}
.friend-invite-text {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.35;
}
.friends-list .btn-invite {
  padding: 3px 8px;
  font-size: 10px;
  flex: 0 0 auto;
}


/* —— Mobile layout pass v1.0.56 ———————————————————————————————
   Keep menus scrollable and keep the arena controls in their own safe-area
   lanes. These overrides intentionally stay below the desktop rules. */
@media (max-width: 1020px) {
  .screen {
    padding-top: calc(64px + env(safe-area-inset-top, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    scroll-padding-top: calc(62px + env(safe-area-inset-top, 0px));
    scroll-padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }

  .screen-inner {
    width: 100%;
    max-width: 860px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .screen-nav {
    top: calc(46px + env(safe-area-inset-top, 0px));
    margin-bottom: 8px;
  }

  .screen-nav .btn { min-height: 44px; }

  #hud-top {
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    padding-right: clamp(92px, 24vw, 168px);
  }

  #hud-bottom {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(126px + env(safe-area-inset-bottom, 0px));
  }

  .phud {
    min-width: 0;
    width: min(190px, 42vw);
    padding: 7px 9px 8px;
  }

  .phud-vital { gap: 6px; margin-top: 5px; }
  .phud-bar { height: 7px; }
  .phud-meta { margin-top: 4px; font-size: 10px; gap: 4px 7px; }

  #hud-side {
    top: calc(62px + env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    max-width: min(200px, 35vw);
    gap: 5px;
  }

  #pvp-board { min-width: 0; padding: 7px 9px; font-size: 10px; }
  #pvp-board .pb-title { margin-bottom: 3px; font-size: 9px; }
  .kf { font-size: 10px; padding: 4px 7px; }

  #corner-tools {
    top: max(8px, env(safe-area-inset-top, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
  }

  /* A lobby action bar stays visible while its long settings list scrolls. */
  #lobby-screen .screen-inner {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }
  #lobby-screen .lobby-actions {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 7;
    width: 100%;
    margin-top: 4px;
    padding: 10px;
    border: 1px solid rgba(94, 240, 255, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(8, 10, 16, 0.88);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .lobby-code-hit { max-width: 100%; }
  .lobby-code-hit span { letter-spacing: 0.18em; }
  .lobby-opts, .lobby-roster { min-width: 0; }
}

@media (max-width: 900px) {
  .title-boards-row {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .title-identity {
    width: min(420px, 100%);
    max-width: 420px;
    flex-basis: auto;
  }
  .boards.home-boards { grid-template-columns: 1fr; }

  .lobby-grid { grid-template-columns: 1fr; gap: 12px; }
  .lobby-opts .choice-row,
  .lobby-opts .map-row { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .screen {
    padding-top: calc(62px + env(safe-area-inset-top, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    padding-left: max(10px, env(safe-area-inset-left, 0px));
  }
  .screen-inner { gap: 14px; }
  .screen-nav {
    top: calc(44px + env(safe-area-inset-top, 0px));
    padding: 7px 8px 8px;
  }
  .screen-nav .btn { width: 100%; }

  .mode-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .mode-row .btn { width: 100%; min-width: 0; }
  /* Home: keep Solo / Coop / PVP / Rejoindre all visible (2×2), not a tall stack. */
  .title-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .title-modes .btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  /* Keep “By eA-Zy IT Solution” inside the frame (was absolute right of h1). */
  .title-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 100%;
  }
  .brand-by-row {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    margin-left: 0;
    gap: 8px;
    justify-content: center;
    max-width: 100%;
    flex-wrap: wrap;
    white-space: normal;
  }
  .brand-by {
    max-width: 100%;
  }
  .brand-by img { width: 24px; height: 24px; }
  .eazy-name { font-size: 13px; }
  .eazy-it { font-size: 7px; letter-spacing: 0.12em; }

  .lobby-opts, .lobby-roster,
  .loadout-block { padding: 13px 12px 14px; }
  .lobby-group { margin-top: 12px; }
  .choice-row,
  .lobby-opts .choice-row,
  .loadout-block .choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }
  .choice-row > *, .diff-row > * { min-width: 0; }
  .dcard, .wcard, .path-card { padding: 10px; }
  .diff-row { gap: 7px; }
  .map-row,
  .lobby-opts .map-row,
  .loadout-block .map-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }
  .map-card { width: auto; min-width: 0; padding: 7px; }
  .map-card canvas { height: 58px; }

  .lobby-seat { align-items: flex-start; }
  .lobby-seat .seat-main { flex: 1 1 120px; }
  .lobby-seat .seat-side { flex: 0 1 auto; }
  .seat-bot-ctrls { flex-basis: 100%; justify-content: flex-start; }

  #touch-ui { z-index: 15; }
  #stick-base {
    left: max(14px, env(safe-area-inset-left, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    width: 110px;
    height: 110px;
  }
  #stick-knob { left: 35px; top: 35px; width: 40px; height: 40px; }
  #aim-base {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    width: 112px;
    height: 112px;
  }
  #aim-knob { left: 36px; top: 36px; width: 40px; height: 40px; }
  #touch-btns {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(138px, calc(134px + env(safe-area-inset-bottom, 0px)));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  #touch-btns button {
    width: clamp(56px, 16vw, 64px);
    height: 44px;
    min-height: 42px;
    padding: 5px 4px;
    font-size: 9px;
    letter-spacing: 0.05em;
    touch-action: none;
  }
  #touch-pause {
    top: max(8px, env(safe-area-inset-top, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    height: 34px;
    min-height: 34px;
    font-size: 9px;
  }

  #hud-top {
    flex-direction: row;
    align-items: flex-start;
    gap: 7px;
    padding-right: clamp(112px, 34vw, 150px);
  }
  #hud-scorebox { min-width: 82px; padding: 6px 8px 7px; text-align: right; }
  #score { font-size: 18px; }
  #combo-wrap { font-size: 15px; }
  #hud-wave { font-size: 9px; }
  .logo { font-size: 10px; gap: 5px; }
  .logo img { width: 18px; height: 18px; }
  #hud-bottom { bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
  .phud { width: min(178px, 48vw); font-size: 10px; }
  .phud-top { font-size: 9px; gap: 5px; }
  .phud-ammo { font-size: 11px; }
  #hud-side { max-width: 31vw; }
  #pvp-board { font-size: 9px; }

  #friends-bubble { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  #lobby-screen:not(.hidden) ~ #friends-bubble {
    bottom: calc(132px + env(safe-area-inset-bottom, 0px));
  }
  .friends-float-panel {
    width: min(340px, calc(100vw - 20px));
    max-height: calc(100vh - 96px - env(safe-area-inset-top, 0px));
    max-height: calc(100dvh - 96px - env(safe-area-inset-top, 0px));
  }
}

@media (max-width: 640px) {
  #corner-tools { gap: 4px; max-width: calc(100vw - 12px); }
  #corner-profile.corner-profile { max-width: min(142px, 42vw); padding: 6px 7px; }
  #corner-tools-bar { padding: 2px; }
  #corner-tools-bar button { min-height: 30px; height: 30px; padding: 0 7px; }
  #corner-tools-bar .version-chip { min-height: 30px; padding: 0 8px; }
  .friends-fab { min-width: 44px; min-height: 44px; }

  /* Keep the final CTA clear of the floating friends affordance. */
  #lobby-screen .lobby-actions { padding-right: 58px; }
  #lobby-screen .lobby-actions .btn { min-height: 46px; }
  .lobby-seat { flex-direction: column; gap: 7px; }
  .lobby-seat .seat-main,
  .lobby-seat .seat-side { width: 100%; }
  .lobby-seat .seat-side { justify-content: space-between; }

  #loadout-screen .mode-row { padding-bottom: 4px; }
  #super-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  h1 { font-size: 34px; }
  .title-mark { width: 72px; height: 72px; border-radius: 18px; }
  .screen-inner { gap: 12px; }
  #title-screen .screen-head { gap: 8px; }
  #title-screen .tagline { font-size: 12px; line-height: 1.35; max-width: 34ch; margin-inline: auto; }
  #title-screen .kicker { font-size: 14px; letter-spacing: 0.22em; }
  #title-screen .title-version-link { margin-top: 2px; }
  #title-screen .screen-inner { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .title-modes { gap: 7px; margin: 2px 0 4px; }
  .title-modes .btn { min-height: 46px; font-size: 11px; letter-spacing: 0.1em; }

  #hud-top { padding-right: 112px; }
  #hud-scorebox { min-width: 76px; }
  #hud-side, #bonus-hud { display: none; }
  #player-huds { gap: 6px; }
  .phud { width: min(172px, 52vw); padding: 6px 8px 7px; }
  .phud-weapon, .phud-mods { font-size: 8px; }
  .phud-meta { font-size: 9px; }
  #join-hint { max-width: 190px; font-size: 9px; padding: 5px 7px; }

  .choice-row,
  .lobby-opts .choice-row,
  .loadout-block .choice-row,
  .map-row,
  .lobby-opts .map-row,
  .loadout-block .map-row { gap: 6px; }
  .dcard, .wcard, .path-card { padding: 9px 8px; }
  .map-card canvas { height: 52px; }
  .wcard .wn { font-size: 12px; }
  .wcard .ws { font-size: 10px; margin-top: 5px; }
  .lobby-code-card { padding: 16px 10px 14px; gap: 8px; }
  .lobby-code-hit { padding: 10px 8px 12px; }
  .lobby-code-hit span { font-size: clamp(34px, 13vw, 58px); letter-spacing: 0.12em; }
  .lobby-access { gap: 5px; }
  .lobby-access .btn { flex: 1 1 100%; }

  #touch-btns button { width: clamp(52px, 16vw, 60px); }
  #stick-base { width: 100px; height: 100px; }
  #aim-base { width: 102px; height: 102px; }
  #stick-knob { left: 28px; top: 28px; width: 34px; height: 34px; }
  #hud-bottom { bottom: calc(124px + env(safe-area-inset-bottom, 0px)); }

  .friends-float-panel { padding: 10px; }
  .friends-search-row, .friends-chat-row { flex-wrap: wrap; }
  .friends-search-row .name-input, .friends-chat-row .name-input { flex-basis: 100%; }
  .friends-search-row .btn, .friends-chat-row .btn { width: 100%; min-height: 38px; }
}


/* —— Mobile polish v1.0.60 — sticky CTAs, readable HUD, pause/GO, touch —— */
@media (max-width: 1020px) {
  /* Loadout “EN PISTE” stays reachable while supers/maps scroll. */
  #loadout-screen .screen-inner {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }
  #loadout-screen .mode-row:has(#btn-start) {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 7;
    width: 100%;
    margin-top: 4px;
    padding: 10px;
    border: 1px solid rgba(94, 240, 255, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(8, 10, 16, 0.88);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  #loadout-screen .mode-row:has(#btn-start) .btn {
    min-height: 46px;
    flex: 1 1 auto;
  }

  /* Game over: keep Retry/Menu on screen above long boards. */
  #gameover-screen .screen-inner {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
  #gameover-screen .mode-row {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 7;
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    gap: 8px;
    border: 1px solid rgba(255, 45, 106, 0.22);
    border-radius: var(--radius-lg);
    background: rgba(8, 10, 16, 0.9);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  #gameover-screen .mode-row .btn { min-height: 46px; flex: 1 1 42%; }

  #pause-screen.screen.overlay {
    padding-top: calc(48px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  }
  #pause-screen .mode-row { gap: 10px; width: 100%; }
  #pause-screen .mode-row .btn { min-height: 48px; flex: 1 1 42%; }
}

@media (max-width: 720px) {
  #pause-screen .mode-row,
  #gameover-screen .mode-row {
    flex-direction: column;
    align-items: stretch;
  }
  #pause-screen .mode-row .btn,
  #gameover-screen .mode-row .btn {
    width: 100%;
    flex: none;
  }

  /* Super cards: keep 2 columns (1-col made arsenal endless). */
  #super-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wcard .wn { font-size: 12px; }
  .wcard .ws { font-size: 10px; line-height: 1.35; margin-top: 6px; }

  /* Respawn picker above touch stick / fire cluster. */
  #respawn-pick {
    bottom: calc(148px + env(safe-area-inset-bottom, 0px));
    top: auto;
    max-height: min(46vh, 360px);
    overflow-y: auto;
    padding: 12px 12px 14px;
    min-width: min(560px, calc(100vw - 16px));
  }
  .rpick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }

  #touch-btns button {
    width: clamp(62px, 19vw, 74px);
    height: 52px;
    min-height: 50px;
    font-size: 10px;
  }
  #touch-pause {
    min-width: 76px;
    height: 36px;
    min-height: 36px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  /* Home boards: avoid cramped 5-col tables on phones. */
  .boards.home-boards .score-table {
    font-size: 11px;
  }
  .boards.home-boards .score-table th:nth-child(5),
  .boards.home-boards .score-table td:nth-child(5) {
    max-width: 56px;
  }

  #loadout-screen .mode-row:has(#btn-start) { padding-right: 58px; }
}

@media (max-width: 640px) {
  /* Override 1-col supers from 1.0.56 — two cards is more practical. */
  #super-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .go-stats { padding: 12px 10px; font-size: 12px; line-height: 1.5; }
  .go-summary { font-size: 12px; }
  .go-table { font-size: 11px; min-width: 260px; }
  .go-table th, .go-table td { padding: 7px 8px; }
  .go-table-title { font-size: 10px; letter-spacing: 0.12em; }
  /* Keep report clear of sticky Retry/Menu bar. */
  #go-stats { margin-bottom: 4px; }
}

@media (max-width: 560px) {
  /* HUD text was 8px — unreadable on neon barn. */
  .phud { width: min(176px, 54vw); padding: 7px 8px 8px; }
  .phud-weapon, .phud-mods { font-size: 9px; letter-spacing: 0.04em; }
  .phud-meta { font-size: 10px; }
  .phud-ammo { font-size: 12px; }
  .phud-name { font-size: 10px; }

  #hud-top { padding-right: max(118px, calc(76px + env(safe-area-inset-right, 0px))); }
  #dead-screen .dead-inner { padding: 0 12px; max-width: 100%; }
  .dead-title { font-size: clamp(28px, 10vw, 42px); }
  #dead-timer { font-size: clamp(36px, 14vw, 56px); }
  .dead-hint { font-size: 12px; padding: 0 8px; }
  .dead-quit { min-height: 44px; width: min(280px, 100%); }

  #touch-btns { gap: 6px; bottom: max(142px, calc(138px + env(safe-area-inset-bottom, 0px))); }
  #touch-btns button {
    width: clamp(56px, 17vw, 64px);
    height: 44px;
    min-height: 42px;
  }
  #stick-base { width: 108px; height: 108px; }
  #stick-knob { left: 34px; top: 34px; width: 40px; height: 40px; }
  #aim-base { width: 110px; height: 110px; }
  #aim-knob { left: 35px; top: 35px; width: 40px; height: 40px; }
  #hud-bottom { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }

  .title-auth .mode-row { flex-direction: column; }
  .title-auth .mode-row .btn { width: 100%; min-height: 44px; }

  .boards.home-boards .board { padding: 12px 10px 14px; }
  .boards.home-boards .score-table th,
  .boards.home-boards .score-table td { padding: 6px 4px 6px 0; }
}


/* Profile career + detailed stats modal */
.profile-career {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.6rem 0 0.9rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(12, 8, 4, 0.45);
  border: 1px solid rgba(255, 200, 87, 0.22);
  box-shadow: 0 0 18px rgba(255, 80, 180, 0.08);
}
.profile-career-line {
  margin: 0;
  line-height: 1.35;
}
.profile-stats-detail-btn {
  margin-top: 0.45rem;
  align-self: flex-start;
}
.profile-stats-modal-card {
  max-width: min(720px, 94vw);
  max-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
}
.profile-stats-modal-body {
  overflow: auto;
  padding: 0.4rem 0.2rem 0.8rem;
}

/* Scrollbars — neon barn (pink track / cyan thumb) */
.profile-stats-modal-body,
.lobby-camp-levels,
.modal-card,
.go-stats,
.personal-bests,
#join-list,
.friends-list,
.friends-chat-log {
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) rgba(255, 45, 106, 0.12);
}
.profile-stats-modal-body::-webkit-scrollbar,
.lobby-camp-levels::-webkit-scrollbar,
.modal-card::-webkit-scrollbar,
.go-stats::-webkit-scrollbar,
.personal-bests::-webkit-scrollbar,
#join-list::-webkit-scrollbar,
.friends-list::-webkit-scrollbar,
.friends-chat-log::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.profile-stats-modal-body::-webkit-scrollbar-track,
.lobby-camp-levels::-webkit-scrollbar-track,
.modal-card::-webkit-scrollbar-track,
.go-stats::-webkit-scrollbar-track,
.personal-bests::-webkit-scrollbar-track,
#join-list::-webkit-scrollbar-track,
.friends-list::-webkit-scrollbar-track,
.friends-chat-log::-webkit-scrollbar-track {
  background: rgba(255, 45, 106, 0.10);
  border-radius: 8px;
  border: 1px solid var(--line-pink);
}
.profile-stats-modal-body::-webkit-scrollbar-thumb,
.lobby-camp-levels::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb,
.go-stats::-webkit-scrollbar-thumb,
.personal-bests::-webkit-scrollbar-thumb,
#join-list::-webkit-scrollbar-thumb,
.friends-list::-webkit-scrollbar-thumb,
.friends-chat-log::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan) 0%, #00d4c8 55%, rgba(94, 240, 255, 0.55) 100%);
  border-radius: 8px;
  border: 1px solid rgba(94, 240, 255, 0.45);
  box-shadow: 0 0 10px rgba(94, 240, 255, 0.35);
}
.profile-stats-modal-body::-webkit-scrollbar-thumb:hover,
.lobby-camp-levels::-webkit-scrollbar-thumb:hover,
.modal-card::-webkit-scrollbar-thumb:hover,
.go-stats::-webkit-scrollbar-thumb:hover,
.personal-bests::-webkit-scrollbar-thumb:hover,
#join-list::-webkit-scrollbar-thumb:hover,
.friends-list::-webkit-scrollbar-thumb:hover,
.friends-chat-log::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff6b9a 0%, var(--pink) 60%, #d91652 100%);
  border-color: var(--line-pink);
  box-shadow: var(--glow-pink);
}

.profile-stats-grid {
  display: grid;
  gap: 1rem;
}
.profile-stats-section h4 {
  margin: 0 0 0.45rem;
  color: #ffc857;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.profile-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}
.profile-stats-list li {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.92rem;
}
.profile-monster-table {
  width: 100%;
  min-width: 460px;
  table-layout: auto;
  border-collapse: collapse;
}
.profile-monster-table th,
.profile-monster-table td {
  vertical-align: middle;
  box-sizing: border-box;
}
.profile-monster-table th {
  white-space: normal;
  line-height: 1.3;
  letter-spacing: 0.06em;
  padding: 8px 12px;
}
.profile-monster-table td {
  white-space: nowrap;
  padding: 8px 12px;
}
.profile-monster-table th:nth-child(1),
.profile-monster-table td:nth-child(1) {
  text-align: left;
  width: 34%;
  padding-right: 16px;
}
.profile-monster-table th:nth-child(2),
.profile-monster-table td:nth-child(2) {
  text-align: center;
  font-variant-numeric: tabular-nums;
  width: 18%;
  min-width: 4rem;
}
.profile-monster-table th:nth-child(3),
.profile-monster-table td:nth-child(3),
.profile-monster-table th:nth-child(4),
.profile-monster-table td:nth-child(4) {
  text-align: center;
  font-variant-numeric: tabular-nums;
  width: 24%;
  min-width: 5.5rem;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 4, 2, 0.72);
  backdrop-filter: blur(4px);
}
.modal-backdrop.hidden { display: none; }
.modal-card {
  width: 100%;
  background: linear-gradient(160deg, rgba(42, 28, 18, 0.96), rgba(18, 12, 8, 0.98));
  border: 1px solid rgba(255, 200, 87, 0.35);
  border-radius: 16px;
  box-shadow: 0 0 28px rgba(255, 80, 180, 0.18), 0 18px 40px rgba(0,0,0,0.45);
  padding: 1rem 1.1rem 1.15rem;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff4d6;
}


.profile-build-line {
  grid-column: 1 / -1;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--cyan, #6af0ff);
  margin: 0 0 4px;
  line-height: 1.35;
}
.profile-build-hint {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.35;
}
.arsenal-table th:nth-child(n+2),
.arsenal-table td:nth-child(n+2) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.lobby-scale-note {
  margin-top: 8px;
  color: var(--gold, #ffc857);
}


/* ── P1.1 tutorial overlay + P1.2 home tip (neon-barn) ── */
.home-tip {
  margin: 10px auto 0;
  max-width: 42rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(106, 240, 255, 0.22);
  background: rgba(8, 12, 18, 0.55);
  color: var(--cyan, #6af0ff);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.45;
  box-shadow: var(--glow-cyan, 0 0 16px rgba(94, 240, 255, 0.25));
}
.home-tip:empty { display: none; }






.tuto-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.tuto-overlay.hidden { display: none; }
.tuto-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tuto-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 20px 22px 18px;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(255, 45, 106, 0.22),
    0 0 0 1px rgba(106, 240, 255, 0.12) inset,
    0 22px 56px rgba(0, 0, 0, 0.55),
    var(--glow-pink, 0 0 18px rgba(255, 45, 106, 0.35));
}
.tuto-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  margin-bottom: 10px;
}
.tuto-head .kicker { margin: 0 0 4px; }
.tuto-head h2 {
  margin: 0;
  font-size: clamp(18px, 3.6vw, 26px);
  letter-spacing: 0.1em;
}
.tuto-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 4px 0 12px;
}
.tuto-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.tuto-dot.on {
  background: var(--pink, #ff2d6a);
  box-shadow: var(--glow-pink, 0 0 12px rgba(255, 45, 106, 0.5));
}
.tuto-dot.done {
  background: var(--cyan, #6af0ff);
  opacity: 0.7;
}
.tuto-emoji {
  font-size: 42px;
  line-height: 1;
  margin: 4px 0 8px;
  filter: drop-shadow(0 0 12px rgba(255, 200, 87, 0.45));
}
.tuto-beat-title {
  margin: 0 0 8px;
  font-family: Orbitron, sans-serif;
  font-size: clamp(15px, 2.8vw, 18px);
  letter-spacing: 0.08em;
  color: var(--gold, #ffc857);
  text-shadow: 0 0 14px rgba(255, 200, 87, 0.35);
}
.tuto-beat-body {
  margin: 0 auto 16px;
  max-width: 36rem;
  color: var(--ink, #f4efe6);
  font-size: 14px;
  line-height: 1.55;
}
.tuto-actions { justify-content: center; }


/* Lobby required vs optional */
.lobby-sub-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lobby-tag {
  font-family: Orbitron, sans-serif;
  font-size: 8px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  font-weight: 700;
}
.lobby-tag-required {
  color: #ff8aa8;
  border-color: rgba(255, 45, 106, 0.45);
  background: rgba(255, 45, 106, 0.12);
}
.lobby-tag-optional {
  color: #6af0ff;
  border-color: rgba(106, 240, 255, 0.4);
  background: rgba(106, 240, 255, 0.1);
}
.lobby-tag-cond,
.lobby-tag-mode {
  color: #ffd166;
  border-color: rgba(255, 200, 87, 0.35);
  background: rgba(255, 200, 87, 0.08);
}
.lobby-tag-pick {
  color: rgba(244, 241, 234, 0.7);
  border-color: rgba(255, 210, 160, 0.18);
  background: rgba(255, 255, 255, 0.04);
}
.lobby-opt-hint {
  margin: 4px 0 10px;
  opacity: 0.78;
  font-size: 12px;
  line-height: 1.35;
}
.lobby-group-required {
  padding: 10px 12px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 45, 106, 0.22);
  background: rgba(255, 45, 106, 0.04);
}
.lobby-group-optional {
  padding: 10px 12px 12px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(106, 240, 255, 0.35);
  background: rgba(106, 240, 255, 0.04);
}
.lobby-group-conditional {
  padding: 10px 12px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 200, 87, 0.22);
  background: rgba(255, 200, 87, 0.04);
}
.choice-row-checks .dcard {
  position: relative;
  padding-left: 36px;
}
.choice-row-checks .dcard::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid rgba(106, 240, 255, 0.45);
  background: rgba(0, 0, 0, 0.25);
}
.choice-row-checks .dcard.selected::before {
  background: #6af0ff;
  box-shadow: 0 0 8px rgba(106, 240, 255, 0.55);
  border-color: #6af0ff;
}
.choice-row-checks .dcard.selected {
  border-color: rgba(106, 240, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(106, 240, 255, 0.15), inset 0 1px 0 rgba(255, 220, 180, 0.04);
}
.choice-row-radio .dcard.selected {
  border-color: rgba(255, 45, 106, 0.55);
}
.dcard.dcard-forced {
  opacity: 0.85;
  outline: 1px dashed rgba(255, 200, 87, 0.35);
}

.pb-limit { font-size: 12px; letter-spacing: 0.04em; color: #ffe08a; margin-bottom: 4px; text-align: center; font-weight: 700; }
.pb-rage, .pb-ot { color: #ff6b9a; }



/* ── Lot E 1.1.29 — a11y / killcam / spark / custom rules ── */
html { --ui-scale: 1; }
body.ui-scaled #hud,
body.ui-scaled .screen:not(.overlay),
body.ui-scaled #corner-tools,
body.ui-scaled .modal-backdrop .modal-card,
body.ui-scaled .changelog-panel,
body.ui-scaled .tuto-panel,
body.ui-scaled #respawn-pick,
body.ui-scaled #friends-bubble {
  zoom: var(--ui-scale);
}
@supports not (zoom: 1) {
  body.ui-scaled #hud,
  body.ui-scaled .screen:not(.overlay),
  body.ui-scaled #corner-tools {
    transform: scale(var(--ui-scale));
    transform-origin: top center;
  }
}
.btn-a11y { font-size: 1.05rem; }
.a11y-modal-card { width: min(520px, 94vw); }
.a11y-body { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px 8px; }
.a11y-block .sub { margin-bottom: 4px; }
.killcam-label {
  color: #ffc857;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(255, 45, 106, 0.55);
  margin: 0 0 4px;
}
.killcam-skip { margin-top: 6px; }
.profile-spark-wrap {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 45, 106, 0.35);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(30, 12, 40, 0.55), rgba(12, 28, 48, 0.4));
  box-shadow: 0 0 18px rgba(61, 157, 255, 0.12);
}
.profile-spark-wrap canvas {
  display: block;
  width: 100%;
  height: 72px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
}
.profile-spark-empty { margin: 4px 0 0; }
.lobby-rules-json {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  font-family: "JetBrains Mono", "Share Tech Mono", monospace;
  font-size: 0.78rem;
  color: var(--ink);
  background: rgba(8, 10, 18, 0.72);
  border: 1px solid rgba(255, 200, 87, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  box-sizing: border-box;
}
.lobby-rules-json:focus {
  outline: none;
  border-color: #3d9dff;
  box-shadow: 0 0 0 2px rgba(61, 157, 255, 0.25);
}
.lobby-rules-actions { margin-top: 6px; gap: 8px; }
.lobby-rules-status { min-height: 1.2em; }
body.a11y-pattern .team-pat-red,
body.a11y-pattern [data-team="red"] .go-dot,
body.a11y-pattern .go-dot.team-red {
  background-image: repeating-linear-gradient(45deg, #ff2d6a 0 4px, #5a0820 4px 8px) !important;
}
body.a11y-pattern .team-pat-blue,
body.a11y-pattern [data-team="blue"] .go-dot,
body.a11y-pattern .go-dot.team-blue {
  background-image: repeating-linear-gradient(-45deg, #3d9dff 0 4px, #0a2a4a 4px 8px) !important;
}


.title-tuto-foot {
  display: flex;
  justify-content: center;
  margin: 18px 0 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(106, 240, 255, 0.12);
}
.btn-tuto-foot {
  appearance: none;
  border: 1px solid rgba(106, 240, 255, 0.28);
  background: rgba(8, 14, 22, 0.55);
  color: rgba(200, 230, 240, 0.78);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn-tuto-foot:hover,
.btn-tuto-foot:focus-visible {
  color: #e8fbff;
  border-color: rgba(106, 240, 255, 0.55);
  background: rgba(12, 24, 36, 0.75);
  box-shadow: 0 0 14px rgba(94, 240, 255, 0.18);
  outline: none;
}
.btn-tuto-foot:active {
  transform: translateY(1px);
}

.tuto-actions {
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
#btn-tuto-prev[disabled],
#btn-tuto-prev.hidden {
  opacity: 0.35;
  pointer-events: none;
}

.lobby-rules-toggle {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.lobby-rules-toggle:hover,
.lobby-rules-toggle:focus-visible {
  color: #e8fbff;
  outline: none;
}
.lobby-rules-chevron {
  display: inline-block;
  width: 0.9em;
  color: rgba(106, 240, 255, 0.7);
  transition: transform 0.15s ease;
}
.lobby-rules-wrap:not(.lobby-rules-collapsed) .lobby-rules-chevron,
#lobby-rules-wrap:not(.lobby-rules-collapsed) .lobby-rules-chevron {
  transform: rotate(90deg);
}
.lobby-rules-body[hidden] {
  display: none !important;
}
.lobby-rules-collapsed .lobby-rules-body {
  display: none !important;
}


/* ── Mobile polish 1.1.36 — landscape, tuto/a11y/dead, dvh, touch pad ── */
#touch-ui {
  -webkit-user-select: none;
  user-select: none;
}
#touch-btns button,
#touch-pause {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#dead-screen {
  padding: max(8px, env(safe-area-inset-top, 0px))
           max(8px, env(safe-area-inset-right, 0px))
           max(8px, env(safe-area-inset-bottom, 0px))
           max(8px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.tuto-overlay {
  padding: max(12px, env(safe-area-inset-top, 0px))
           max(12px, env(safe-area-inset-right, 0px))
           max(12px, env(safe-area-inset-bottom, 0px))
           max(12px, env(safe-area-inset-left, 0px));
  align-items: safe center;
}
.tuto-panel {
  max-height: min(92vh, 92dvh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.a11y-modal-card {
  max-height: min(90vh, 90dvh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-backdrop {
  padding: max(0.75rem, env(safe-area-inset-top, 0px))
           max(0.75rem, env(safe-area-inset-right, 0px))
           max(0.75rem, env(safe-area-inset-bottom, 0px))
           max(0.75rem, env(safe-area-inset-left, 0px));
  align-items: safe center;
}

@media (max-width: 720px) {
  .tuto-emoji { font-size: clamp(36px, 12vw, 56px); margin: 4px 0; }
  .tuto-beat-body { font-size: 13px; line-height: 1.45; }
  .tuto-actions .btn { min-height: 44px; }
  #btn-killcam-skip { min-height: 44px; min-width: 120px; }
}

/* Short landscape phones — keep title/lobby usable; shrink arena chrome */
@media (max-height: 500px) and (orientation: landscape) {
  h1 { font-size: clamp(22px, 8vh, 34px); }
  .title-mark { width: 48px; height: 48px; border-radius: 12px; }
  #title-screen .tagline { display: none; }
  #title-screen .home-tip { display: none; }
  #title-screen .screen-inner { gap: 8px; padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .title-modes .btn { min-height: 40px; font-size: 10px; }
  .screen { padding-top: calc(36px + env(safe-area-inset-top, 0px)); padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .tuto-panel { max-height: min(96vh, 96dvh); padding: 12px 14px; }
  .tuto-emoji { display: none; }
  .tuto-progress { margin: 2px 0 6px; }

  #stick-base {
    width: 78px; height: 78px;
    left: max(8px, env(safe-area-inset-left, 0px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
  #stick-knob { left: 24px; top: 24px; width: 28px; height: 28px; }
  #aim-base {
    width: 82px; height: 82px;
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
  #aim-knob { left: 26px; top: 26px; width: 30px; height: 30px; }
  .aim-label { font-size: 7px; bottom: 6px; }
  #touch-btns {
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: max(96px, calc(92px + env(safe-area-inset-bottom, 0px)));
    gap: 5px;
  }
  #touch-btns button {
    width: clamp(48px, 12vw, 58px);
    height: 36px;
    min-height: 34px;
    font-size: 8px;
  }
  #touch-pause {
    top: max(4px, env(safe-area-inset-top, 0px));
    right: max(4px, env(safe-area-inset-right, 0px));
    height: 30px; min-height: 30px; min-width: 64px; font-size: 8px;
  }
  #hud-bottom { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  #hud-top { padding-right: clamp(88px, 28vw, 140px); }
  #respawn-pick { bottom: calc(110px + env(safe-area-inset-bottom, 0px)); max-height: min(52vh, 280px); }
  #lobby-screen .lobby-actions,
  #loadout-screen .mode-row:has(#btn-start) { padding: 6px 8px; }
}

@media (max-width: 420px) and (max-height: 760px) {
  #title-screen .boards.home-boards { margin-top: 4px; }
  .brand-by-label { font-size: 10px; }
}


/* ── Mobile P1 1.1.37 — spit btn, look-pad aim, kb inset, killcam hit, DPR leftover ── */
#look-pad {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  position: absolute;
  left: 42%;
  right: 0;
  top: 30%;
  bottom: 0;
  z-index: 1;
  /* invisible aim zone — lower-right so title HUD / dead UI stay free */
  background: transparent;
}
#touch-ui.touch-dead #look-pad,
#touch-ui.touch-dead #stick-base,
#touch-ui.touch-dead #aim-base,
#touch-ui.touch-dead #touch-btns {
  pointer-events: none;
  opacity: 0.35;
}
#look-pad { z-index: 1; }
#stick-base { z-index: 3; }
#touch-btns { z-index: 4; }
#aim-base { z-index: 5; }
#touch-pause { z-index: 6; }

#touch-btns {
  /* spit (when visible) spans a full row above the preserved 2×2 pad */
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
#touch-spit.touch-spit {
  grid-column: 1 / -1;
  width: 100%;
  height: 44px;
  min-height: 44px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #c8ff6a;
  border-color: rgba(200, 255, 106, 0.45);
  background: rgba(20, 36, 8, 0.82);
  box-shadow: 0 0 14px rgba(200, 255, 106, 0.16);
}
#touch-spit.hidden { display: none !important; }

#btn-killcam-skip,
.killcam-skip {
  min-height: 48px;
  min-width: 148px;
  padding: 12px 22px;
  margin-top: 10px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-size: 12px;
  letter-spacing: 0.1em;
}
#dead-screen {
  z-index: 18; /* above #touch-ui (15) so killcam SKIP is tappable */
  padding: max(16px, calc(env(safe-area-inset-top, 0px) + 10px))
           max(16px, calc(env(safe-area-inset-right, 0px) + 10px))
           max(16px, calc(env(safe-area-inset-bottom, 0px) + 10px))
           max(16px, calc(env(safe-area-inset-left, 0px) + 10px));
}
#dead-screen .dead-inner {
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  max-width: min(420px, 100%);
}

/* Soft keyboard — title / join / profile fields stay reachable */
:root { --kb-inset: 0px; }
.screen {
  scroll-padding-bottom: calc(28px + var(--kb-inset, 0px) + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 720px) {
  #title-screen .screen-inner,
  #join-screen .screen-inner,
  #profile-screen .screen-inner,
  #account-screen .screen-inner {
    padding-bottom: calc(48px + var(--kb-inset, 0px) + env(safe-area-inset-bottom, 0px));
  }
  .auth-panel .name-input:focus,
  #join-code:focus {
    outline: 2px solid rgba(94, 240, 255, 0.55);
    outline-offset: 2px;
  }
  #btn-killcam-skip { min-height: 52px; min-width: 160px; padding: 14px 24px; }
  #touch-spit.touch-spit { height: 42px; min-height: 42px; font-size: 9px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  #look-pad { left: 38%; }
  #aim-base { width: 82px; height: 82px; }
  #aim-knob { left: 26px; top: 26px; width: 30px; height: 30px; }
  .aim-label { font-size: 7px; bottom: 6px; }
  #touch-spit.touch-spit { height: 34px; min-height: 34px; font-size: 8px; }
}

.friend-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}
.btn-friend-remove {
  appearance: none;
  border: none;
  background: transparent;
  padding: 2px 4px;
  margin: 0;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.45;
  flex: 0 0 auto;
  border-radius: 4px;
}
.btn-friend-remove:hover,
.btn-friend-remove:focus-visible {
  opacity: 0.95;
  background: rgba(255, 45, 106, 0.15);
  outline: none;
}
#friends-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.public-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
}
.public-profile-modal.hidden { display: none; }
.public-profile-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 96vw);
  max-height: min(92dvh, 820px);
  overflow: auto;
  padding: 16px 18px 18px;
}
.public-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.public-profile-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
#public-profile-llama {
  width: 140px;
  height: 140px;
  image-rendering: pixelated;
}
.public-profile-stats {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  text-align: left;
  font-size: 12px;
}
.public-profile-stats .pp-stat {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(8, 14, 22, 0.45);
  border: 1px solid rgba(106, 240, 255, 0.12);
}
.btn-friend-profile {
  appearance: none;
  border: none;
  background: transparent;
  padding: 2px 4px;
  margin: 0;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  border-radius: 4px;
}
.btn-friend-profile:hover,
.btn-friend-profile:focus-visible {
  opacity: 1;
  background: rgba(106, 240, 255, 0.12);
  outline: none;
}

/* 1.1.41 — public profile uses modal-backdrop pattern; icons higher contrast */
#public-profile-modal.modal-backdrop {
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}
#public-profile-modal.hidden {
  display: none !important;
}
#public-profile-modal .public-profile-panel,
#public-profile-modal .modal-card.public-profile-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 96vw);
  max-height: min(92dvh, 820px);
  overflow: auto;
  padding: 16px 18px 18px;
  background: var(--panel-solid, #121820);
  border: 1px solid rgba(106, 240, 255, 0.35);
  box-shadow: 0 0 24px rgba(94, 240, 255, 0.2), 0 16px 40px rgba(0, 0, 0, 0.55);
  border-radius: var(--radius-lg, 14px);
  pointer-events: auto;
}
.public-profile-head.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  width: 100%;
}
.public-profile-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
#public-profile-llama {
  width: 140px;
  height: 140px;
  image-rendering: pixelated;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
}
.public-profile-stats {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  text-align: left;
  font-size: 12px;
}
.public-profile-stats .pp-stat {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(8, 14, 22, 0.55);
  border: 1px solid rgba(106, 240, 255, 0.18);
  color: #e8f6ff;
}
.btn-friend-profile,
.btn-friend-remove {
  appearance: none;
  border: 1px solid transparent;
  background: rgba(12, 20, 30, 0.75);
  padding: 5px 7px;
  margin: 0;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  border-radius: 8px;
  flex: 0 0 auto;
  filter: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}
.btn-friend-profile {
  border-color: rgba(106, 240, 255, 0.55);
  color: #b8f4ff;
  box-shadow: 0 0 8px rgba(94, 240, 255, 0.25);
}
.btn-friend-remove {
  border-color: rgba(255, 90, 130, 0.6);
  color: #ffc0d0;
  box-shadow: 0 0 8px rgba(255, 45, 106, 0.22);
}
.btn-friend-profile:hover,
.btn-friend-profile:focus-visible {
  background: rgba(106, 240, 255, 0.22);
  border-color: rgba(180, 250, 255, 0.9);
  color: #fff;
  outline: none;
}
.btn-friend-remove:hover,
.btn-friend-remove:focus-visible {
  background: rgba(255, 45, 106, 0.28);
  border-color: rgba(255, 160, 190, 0.95);
  color: #fff;
  outline: none;
}

.seat-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}
.seat-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.seat-add-friend {
  font-size: 10px !important;
  padding: 4px 8px !important;
  white-space: nowrap;
}
.public-profile-actions {
  margin-top: 6px;
  justify-content: center;
  min-height: 28px;
}


/* 1.1.43 — public profile bonuses / records / detail */
.public-profile-section {
  width: 100%;
  text-align: left;
  margin-top: 6px;
}
.public-profile-section .sub {
  margin: 8px 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #7ee7ff;
}
.public-profile-section .profile-upgrades {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.public-profile-section .pp-rec,
.public-profile-section .pp-stat-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(8, 14, 22, 0.45);
  border: 1px solid rgba(106, 240, 255, 0.12);
  font-size: 12px;
  margin-bottom: 4px;
  color: #e8f6ff;
}
.public-profile-section .pp-rec-lab {
  opacity: 0.85;
}
.public-profile-section .profile-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 12px;
}
.public-profile-section .profile-monster-table {
  width: 100%;
  font-size: 11px;
}
.public-profile-section .hint.empty {
  opacity: 0.65;
  font-size: 12px;
  text-align: center;
}
