:root {
  --sidebar-width: 312px;
  --panel-gap: 12px;
  --panel-bg: rgba(16, 23, 28, 0.88);
  --panel-border: rgba(174, 235, 191, 0.16);
  --accent: #8fdc8a;
  --accent-2: #7fc7ff;
  --danger: #ff8d6b;
  --text-muted: #9eafa7;
}

* {
  box-sizing: border-box;
}

/* Final create-mode card layout guard: old banner rules must not stretch these cards. */
#matchCreateForm #matchCreateModeCards.match-create-mode-cards {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(112px, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > button.match-mode-card,
#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card {
  grid-column: auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
  display: grid !important;
  grid-template-rows: 74px auto !important;
  gap: 8px !important;
  min-height: 126px !important;
  padding: 8px !important;
  border-radius: 8px !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card > img {
  width: 100% !important;
  height: 74px !important;
  max-height: 74px !important;
  object-fit: contain !important;
  object-position: center !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card > .match-mode-card-body {
  align-self: end !important;
  min-width: 0 !important;
  padding: 0 2px !important;
}

@media (max-width: 1320px) {
  #matchCreateForm #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(112px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #matchCreateForm #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(112px, 1fr)) !important;
  }
}

.v3-template,
.game-shell,
.v3-header,
.sidebar,
.play-area,
.arena-topbar,
.arena-bottom-hud,
canvas,
button,
a {
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

[hidden] {
  display: none !important;
}

:where(button, a, input, select, textarea, [role="button"], [tabindex]:not([tabindex="-1"])):focus {
  outline: none;
}

:where(button, a, input, select, textarea, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: none;
  border-color: #29425d;
  box-shadow: 0 0 0 2px rgba(77, 187, 255, 0.14);
}

:where(
  a[href],
  button:not(:disabled),
  select:not(:disabled),
  summary,
  label,
  input[type="button"]:not(:disabled),
  input[type="submit"]:not(:disabled),
  input[type="reset"]:not(:disabled),
  input[type="checkbox"]:not(:disabled),
  input[type="radio"]:not(:disabled),
  input[type="range"]:not(:disabled),
  input[type="color"]:not(:disabled),
  input[type="file"]:not(:disabled),
  [role="button"],
  [tabindex]:not([tabindex="-1"])
) {
  cursor: pointer;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #080d11;
  color: #f2f5ef;
  font-family: Montserrat, Segoe UI, Arial, Helvetica, sans-serif;
}

.game-shell {
  position: relative;
  display: block;
  width: 100vw;
  height: 100vh;
  background: #080d11;
}

.sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--panel-gap);
  min-width: 0;
  width: var(--sidebar-width);
  min-height: 0;
  height: 100vh;
  overflow: hidden;
  padding: 14px;
  border-right: 1px solid rgba(174, 235, 191, 0.12);
  background:
    linear-gradient(180deg, rgba(30, 43, 49, 0.96), rgba(10, 15, 19, 0.98)),
    #11191e;
  box-shadow: 12px 0 36px rgba(0, 0, 0, 0.28);
  transition: width 0.24s ease, padding 0.24s ease, gap 0.24s ease;
}

.sidebar > .chat-panel {
  flex: 1 1 auto;
  align-self: stretch;
}

.chat-panel {
  min-height: 220px;
}

.sidebar-toggle {
  position: absolute;
  top: 50%;
  right: -12px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 28px;
  height: 64px;
  border: 1px solid rgba(127, 199, 255, 0.30);
  border-left-color: rgba(143, 220, 138, 0.28);
  border-radius: 0 14px 14px 0;
  color: transparent;
  background:
    radial-gradient(circle at 28% 30%, rgba(143, 220, 138, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(20, 42, 50, 0.98), rgba(7, 15, 22, 0.98));
  box-shadow: 7px 0 18px rgba(0, 0, 0, 0.30), inset 1px 0 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font: 950 20px Montserrat, Segoe UI, Arial, sans-serif;
  line-height: 1;
  transform: translateY(-50%);
  transition: right 0.24s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.sidebar-toggle::before,
.sidebar-toggle::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-top: 2px solid #dff7e1;
  border-right: 2px solid #dff7e1;
  filter: drop-shadow(0 0 7px rgba(143, 220, 138, 0.55));
}

.sidebar-toggle::before {
  transform: translateX(1px) rotate(225deg);
}

.sidebar-toggle::after {
  transform: translateX(7px) rotate(225deg);
  opacity: 0.62;
}

.sidebar-toggle:hover {
  border-color: rgba(143, 220, 138, 0.52);
  background:
    radial-gradient(circle at 35% 34%, rgba(143, 220, 138, 0.28), transparent 36%),
    linear-gradient(180deg, rgba(25, 58, 56, 0.98), rgba(8, 20, 25, 0.98));
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.36), 0 0 14px rgba(143, 220, 138, 0.14);
}

.game-shell.sidebar-collapsed .sidebar {
  width: 42px;
  gap: 8px;
  padding: 10px 7px;
}

.game-shell.sidebar-collapsed .sidebar > *:not(.brand-panel):not(.sidebar-toggle) {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
}

.game-shell.sidebar-collapsed .sidebar-menu {
  display: none;
}

.game-shell.sidebar-collapsed .brand-panel {
  min-height: 42px;
  padding: 9px 6px;
  justify-content: center;
}

.game-shell.sidebar-collapsed .brand-panel div {
  display: none;
}

.game-shell.sidebar-collapsed .brand-dot {
  width: 11px;
  height: 11px;
}

.game-shell.sidebar-collapsed .sidebar-toggle {
  right: -12px;
}

.game-shell.sidebar-collapsed .sidebar-toggle::before {
  transform: translateX(-7px) rotate(45deg);
}

.game-shell.sidebar-collapsed .sidebar-toggle::after {
  transform: translateX(-1px) rotate(45deg);
}

#teamLink,
#profileButton,
#progressButton,
#socialButton,
#settingsButton,
#playersButton {
  display: none;
}

.sidebar-menu-wrap {
  position: relative;
  min-width: 0;
}

.menu-button {
  border-color: rgba(127, 199, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.18), rgba(143, 220, 138, 0.10)),
    rgba(14, 25, 31, 0.92);
}

.notifications-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: rgba(127, 199, 255, 0.30);
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.16), rgba(143, 220, 138, 0.08)),
    rgba(14, 25, 31, 0.92);
}

.notifications-button strong {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #ffffff;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(180deg, #ff6d7a, #b72d43);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 0 14px rgba(255, 84, 106, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.sidebar-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(127, 199, 255, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(18, 31, 39, 0.98), rgba(8, 14, 20, 0.98));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-menu button,
.sidebar-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(127, 199, 255, 0.14);
  border-radius: 8px;
  color: #eef8fb;
  background: rgba(255, 255, 255, 0.045);
  font: 900 13px Montserrat, Segoe UI, Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-menu button:hover,
.sidebar-menu a:hover {
  border-color: rgba(143, 220, 138, 0.46);
  background: rgba(143, 220, 138, 0.12);
}

.progress-panel {
  display: grid;
  gap: 6px;
  padding: 9px 11px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.13), rgba(143, 220, 138, 0.09)),
    rgba(10, 18, 24, 0.82);
}

.progress-head,
.progress-meta,
.progress-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.progress-head span,
.progress-card-head span {
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.progress-head strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.28);
}

.progress-bar.large {
  height: 12px;
}

.progress-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7fc7ff, #8fdc8a);
  box-shadow: 0 0 18px rgba(143, 220, 138, 0.38);
  transition: width 0.28s ease;
}

.progress-meta {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.brand-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 13px 14px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.16), rgba(143, 220, 138, 0.08)),
    rgba(15, 25, 31, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.brand-panel strong {
  display: block;
  margin-top: 2px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-kicker {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(143, 220, 138, 0.72);
}

.team-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.14), rgba(255, 131, 223, 0.08)),
    rgba(255, 255, 255, 0.055);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.team-link:hover {
  border-color: rgba(127, 199, 255, 0.44);
  color: var(--accent-2);
}

.matches-cta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  min-height: 46px;
  border: 1px solid rgba(143, 220, 138, 0.72);
  border-radius: 10px;
  color: #f4fff2;
  background:
    linear-gradient(180deg, rgba(74, 184, 89, 0.92), rgba(34, 120, 55, 0.92));
  font: 950 16px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(53, 176, 74, 0.22), inset 0 1px 0 rgba(255,255,255,0.15);
}

.matches-cta:disabled,
.matches-cta.locked {
  cursor: not-allowed;
  color: rgba(232, 245, 239, 0.56);
  border-color: rgba(127, 199, 255, 0.18);
  background: linear-gradient(180deg, rgba(35, 58, 50, 0.78), rgba(18, 34, 30, 0.82));
  box-shadow: none;
}

.match-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(720px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 44px));
  overflow: hidden;
}

.match-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 12px 0;
}

.match-tabs button {
  min-height: 42px;
  border: 1px solid rgba(127, 199, 255, 0.20);
  border-radius: 8px;
  color: #aebdc6;
  background: rgba(11, 18, 25, 0.80);
  font: 950 14px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
}

.match-tabs button.active {
  color: #ffffff;
  border-color: rgba(143, 220, 138, 0.60);
  background: linear-gradient(180deg, rgba(44, 105, 71, 0.80), rgba(22, 58, 42, 0.82));
}

.match-pane {
  display: none;
  min-height: 0;
}

.match-pane.active {
  display: grid;
}

.match-create-form {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 12px 14px;
  align-content: start;
}

.match-create-form.match-pane.active {
  display: grid;
}

.match-create-form label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}

.match-create-form label:first-child,
.match-create-form button {
  grid-column: 1 / -1;
}

.match-create-form .match-paid-toggle,
.match-create-form .match-bots-toggle,
.match-create-form .match-observer-toggle,
.match-create-form .match-organizer-toggle {
  grid-column: 1 / -1;
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.20);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.10), rgba(143, 220, 138, 0.06)),
    rgba(12, 22, 30, 0.82);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.match-bots-toggle,
.match-observer-toggle,
.match-organizer-toggle {
  border-color: rgba(143, 220, 138, 0.24);
  background:
    linear-gradient(135deg, rgba(143, 220, 138, 0.12), rgba(127, 199, 255, 0.06)),
    rgba(12, 24, 25, 0.82);
}

.match-paid-toggle input,
.match-bots-toggle input,
.match-observer-toggle input,
.match-organizer-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.match-paid-toggle i,
.match-bots-toggle i,
.match-observer-toggle i,
.match-organizer-toggle i {
  position: relative;
  width: 58px;
  height: 30px;
  border: 1px solid rgba(127, 199, 255, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(10, 18, 27, 0.96), rgba(5, 12, 19, 0.96));
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.42);
}

.match-paid-toggle i::before,
.match-bots-toggle i::before,
.match-observer-toggle i::before,
.match-organizer-toggle i::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d7e8f4, #7f9caf);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.42);
  transition: transform 0.18s ease, background 0.18s ease;
}

.match-paid-toggle i::after,
.match-bots-toggle i::after,
.match-observer-toggle i::after,
.match-organizer-toggle i::after {
  content: "";
  position: absolute;
  left: 35px;
  top: 8px;
  width: 10px;
  height: 6px;
  border-left: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transform: rotate(-45deg);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.match-paid-toggle:has(input:checked),
.match-bots-toggle:has(input:checked),
.match-observer-toggle:has(input:checked),
.match-organizer-toggle:has(input:checked) {
  border-color: rgba(143, 220, 138, 0.60);
  background:
    linear-gradient(135deg, rgba(0, 117, 255, 0.16), rgba(66, 190, 91, 0.18)),
    rgba(12, 27, 28, 0.88);
  box-shadow: 0 0 24px rgba(143, 220, 138, 0.10);
}

.match-paid-toggle:has(input:checked) i,
.match-bots-toggle:has(input:checked) i,
.match-observer-toggle:has(input:checked) i,
.match-organizer-toggle:has(input:checked) i {
  border-color: rgba(143, 220, 138, 0.62);
  background: linear-gradient(180deg, rgba(47, 174, 83, 0.95), rgba(20, 103, 50, 0.95));
}

.match-paid-toggle:has(input:checked) i::before,
.match-bots-toggle:has(input:checked) i::before,
.match-observer-toggle:has(input:checked) i::before,
.match-organizer-toggle:has(input:checked) i::before {
  transform: translateX(28px);
  background: linear-gradient(180deg, #ffffff, #baffb7);
}

.match-paid-toggle:has(input:checked) i::after,
.match-bots-toggle:has(input:checked) i::after,
.match-observer-toggle:has(input:checked) i::after,
.match-organizer-toggle:has(input:checked) i::after {
  opacity: 1;
  border-left-color: rgba(9, 74, 36, 0.88);
  border-bottom-color: rgba(9, 74, 36, 0.88);
}

.match-paid-toggle:has(input:disabled),
.match-bots-toggle:has(input:disabled),
.match-observer-toggle:has(input:disabled),
.match-organizer-toggle:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

.paid-match-block {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(0, 136, 255, 0.30);
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 94, 255, 0.34), transparent 42%),
    linear-gradient(135deg, rgba(13, 38, 76, 0.72), rgba(19, 33, 48, 0.58)),
    rgba(8, 16, 24, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 34px rgba(0, 0, 0, 0.18);
}

.paid-wallet-card,
.paid-match-block p {
  grid-column: 1 / -1;
}

.paid-wallet-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 136, 255, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(0, 100, 255, 0.18), rgba(7, 16, 28, 0.72)),
    rgba(7, 14, 24, 0.72);
}

.paid-match-block p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
}

.paid-wallet-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.paid-wallet-head img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #0052ff;
  box-shadow: 0 0 22px rgba(0, 103, 255, 0.44);
}

.paid-wallet-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.paid-wallet-head strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.paid-wallet-head span {
  color: #b9c9d7;
  font-size: 12px;
  font-weight: 850;
}

.paid-wallet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.paid-wallet-row code {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 136, 255, 0.26);
  border-radius: 8px;
  color: #e2f2ff;
  background: rgba(2, 9, 18, 0.70);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paid-wallet-row button {
  grid-column: auto;
  display: inline-grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding: 0;
  overflow: hidden;
  border-color: rgba(0, 136, 255, 0.38);
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 110, 255, 0.66), rgba(0, 63, 154, 0.66));
  box-shadow: 0 0 20px rgba(0, 110, 255, 0.16);
}

.paid-wallet-row button.copied {
  border-color: rgba(143, 220, 138, 0.74);
  background: linear-gradient(180deg, rgba(55, 172, 84, 0.86), rgba(27, 113, 55, 0.82));
  box-shadow: 0 0 24px rgba(143, 220, 138, 0.24);
}

.copy-icon {
  font-size: 17px;
  line-height: 1;
}

.copy-status {
  font-size: 12px;
  font-weight: 950;
  opacity: 0.92;
}

.match-create-form input,
.match-create-form select,
.match-create-form button,
.match-actions button,
.match-row-actions button {
  min-height: 38px;
  border: 1px solid rgba(127, 199, 255, 0.20);
  border-radius: 8px;
  color: #eef7f2;
  background: rgba(11, 18, 25, 0.84);
  font: 800 13px Montserrat, Segoe UI, Arial, sans-serif;
}

.match-create-form input,
.match-create-form select {
  padding: 0 10px;
}

.match-create-form label:focus-within,
.match-create-form input:focus,
.match-create-form input:focus-visible,
.match-create-form select:focus,
.match-create-form select:focus-visible {
  outline: none;
}

.match-create-form input:focus,
.match-create-form input:focus-visible,
.match-create-form select:focus,
.match-create-form select:focus-visible {
  border-color: rgba(143, 220, 138, 0.42);
  box-shadow: inset 0 0 0 1px rgba(143, 220, 138, 0.10);
}

.match-create-form input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.match-create-form input[type="number"]::-webkit-inner-spin-button,
.match-create-form input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.match-create-form button,
.match-actions button,
.match-row-actions button {
  padding: 0 13px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(127, 199, 255, 0.18), rgba(143, 220, 138, 0.12));
}

.match-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 12px 6px;
}

.public-arena-slot {
  padding: 6px 12px 12px;
}

.match-filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 8px;
}

.match-filter-tabs button {
  min-height: 34px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  color: #aebdc6;
  background: rgba(9, 17, 25, 0.72);
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
}

.match-filter-tabs button.active {
  color: #ffffff;
  border-color: rgba(127, 199, 255, 0.48);
  background: linear-gradient(180deg, rgba(34, 74, 100, 0.78), rgba(18, 43, 62, 0.80));
}

.matches-list {
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 14px;
}

.public-arena-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 116px);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  margin: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(143, 220, 138, 0.42);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 0%, rgba(143, 220, 138, 0.20), transparent 48%),
    linear-gradient(135deg, rgba(25, 64, 44, 0.82), rgba(12, 24, 32, 0.88));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255,255,255,0.07);
}

.public-arena-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.public-arena-card strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-arena-card span,
.match-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.public-arena-card span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.public-arena-card button {
  min-height: 38px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(143, 220, 138, 0.58);
  border-radius: 8px;
  color: #f4fff2;
  background: linear-gradient(180deg, rgba(63, 168, 88, 0.76), rgba(31, 100, 55, 0.72));
  font: 950 13px Montserrat, Segoe UI, Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.match-empty {
  padding: 18px 12px;
  text-align: center;
}

.match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 8px;
  background: rgba(13, 23, 32, 0.86);
}

.match-row.paid {
  border-color: rgba(0, 136, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(0, 92, 255, 0.08), rgba(10, 20, 30, 0.88)),
    rgba(13, 23, 32, 0.88);
}

.match-row.selected {
  border-color: rgba(143, 220, 138, 0.62);
  box-shadow: 0 0 0 1px rgba(143, 220, 138, 0.18), 0 0 22px rgba(0, 136, 255, 0.18);
}

.paid-entry-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}

.paid-entry-overlay[hidden] {
  display: none;
}

.paid-entry-card {
  width: min(760px, 88vw);
  max-width: 760px;
  pointer-events: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), 0 0 44px rgba(0, 136, 255, 0.14);
}

.spectator-panel {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 7;
  width: min(360px, calc(100% - 28px));
  max-height: min(456px, calc(100% - 28px));
  overflow: hidden;
  padding: 11px;
  border: 1px solid rgba(127, 199, 255, 0.26);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 0%, rgba(76, 255, 82, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(20, 32, 43, 0.96), rgba(8, 14, 22, 0.94));
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.spectator-panel.collapsed {
  top: 62px;
  width: min(330px, calc(100% - 28px));
  min-height: 32px;
  padding: 0;
  border: 2px solid #263140;
  border-radius: 8px;
  background: linear-gradient(180deg, #202635, #151b24);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 1;
}

.spectator-panel-title {
  display: grid;
  gap: 7px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spectator-panel.collapsed .spectator-panel-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0;
  border-bottom: 0;
}

.spectator-panel-title-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.spectator-panel-title strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spectator-panel-toggle {
  display: grid;
  place-items: center;
  width: 25px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid rgba(127, 199, 255, 0.22);
  border-radius: 6px;
  color: #dff6ff;
  background: rgba(255, 255, 255, 0.055);
  font: 950 15px Montserrat, Segoe UI, Arial, sans-serif;
  line-height: 1;
  cursor: pointer;
}

.spectator-panel-toggle:hover {
  border-color: rgba(143, 220, 138, 0.50);
  background: rgba(143, 220, 138, 0.15);
}

.spectator-panel.collapsed .spectator-panel-title > strong {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 0 0 12px;
  border-left: 0;
  color: #c7d8e6;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-shadow: var(--v3-figma-shadow);
}

.spectator-panel.collapsed .spectator-panel-toggle {
  width: 28px;
  height: 28px;
  border-color: #263140;
  border-radius: 7px;
  color: #b8d7f2;
  background: rgba(10, 18, 27, 0.58);
  font-size: 11px;
}

.spectator-panel-title span {
  overflow: hidden;
  color: rgba(223, 237, 242, 0.72);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spectator-count {
  margin-left: auto;
  padding: 5px 8px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 7px;
  background: rgba(9, 15, 23, 0.42);
  color: rgba(190, 215, 230, 0.82);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.spectator-nav {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  gap: 7px;
  align-items: center;
}

.spectator-nav button {
  position: relative;
  display: grid;
  place-items: center;
  height: 26px;
  border: 1px solid rgba(127, 199, 255, 0.22);
  border-radius: 7px;
  color: #eaffef;
  background: linear-gradient(180deg, rgba(42, 82, 59, 0.84), rgba(15, 34, 29, 0.9));
  cursor: pointer;
  font: 900 0/1 Montserrat, Segoe UI, Arial, sans-serif;
}

.spectator-nav button:hover {
  border-color: rgba(143, 220, 138, 0.66);
  background: linear-gradient(180deg, rgba(55, 112, 72, 0.92), rgba(22, 58, 38, 0.92));
}

.spectator-panel.collapsed .spectator-nav {
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  gap: 6px;
}

.spectator-panel.collapsed .spectator-nav button {
  height: 28px;
  border-color: rgba(127, 199, 255, 0.22);
  border-radius: 7px;
  color: #e7f9ff;
  background:
    linear-gradient(180deg, rgba(28, 42, 57, 0.96), rgba(12, 22, 32, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 12px rgba(0, 0, 0, 0.16);
  font-size: 18px;
}

.spectator-panel.collapsed .spectator-nav span {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(127, 199, 255, 0.14);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(127, 199, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(9, 15, 23, 0.50);
  font-size: 10px;
}

.spectator-tournament-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(82, 255, 112, 0.28);
  border-radius: 8px;
  color: #effff2;
  background:
    linear-gradient(180deg, rgba(28, 98, 54, 0.82), rgba(12, 44, 33, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(226, 255, 231, 0.10),
    0 8px 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font: 950 11px/1.1 Montserrat, Segoe UI, Arial, sans-serif;
  text-transform: uppercase;
}

.spectator-tournament-button:hover {
  border-color: rgba(143, 220, 138, 0.68);
  background:
    linear-gradient(180deg, rgba(45, 122, 70, 0.92), rgba(17, 63, 41, 0.94));
}

.spectator-collapsed-controls.has-tournament {
  grid-template-columns: 58px repeat(3, 28px);
}

.spectator-collapsed-controls .spectator-tournament-button.compact {
  width: 58px;
  height: 28px;
  min-height: 28px;
  padding: 0 7px;
  border-color: rgba(82, 255, 112, 0.24);
  border-radius: 7px;
  color: #eaffef;
  background:
    linear-gradient(180deg, rgba(28, 80, 50, 0.92), rgba(11, 36, 29, 0.94));
  font-size: 9px;
  line-height: 1;
}

.spectator-collapsed-target {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1px 7px;
  min-width: 0;
  height: 28px;
  padding: 2px 9px;
  border: 0;
  border-radius: 7px;
  background: rgba(8, 15, 23, 0.62);
}

.spectator-collapsed-target span {
  color: rgba(161, 179, 195, 0.90);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.10em;
  line-height: 8px;
  text-transform: uppercase;
}

.spectator-collapsed-target strong {
  min-width: 0;
  overflow: hidden;
  color: #eaf6ff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 11px;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.spectator-collapsed-target i {
  grid-column: 1 / -1;
  display: block;
  position: relative;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

.spectator-collapsed-target i::before {
  content: "";
  display: block;
  width: var(--target-hp, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #32ff64, #a8ff9c);
  box-shadow: 0 0 10px rgba(76, 255, 82, 0.30);
}

.spectator-collapsed-controls {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 5px;
  padding-right: 2px;
}

.spectator-collapsed-controls button {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 7px;
  color: #c8e9ff;
  background: rgba(10, 18, 27, 0.58);
  cursor: pointer;
  font: 950 0/1 Montserrat, Segoe UI, Arial, sans-serif;
}

.spectator-collapsed-controls button:hover {
  border-color: rgba(143, 220, 138, 0.50);
  background: rgba(25, 54, 43, 0.62);
}

.spectator-arrow::before,
.spectator-panel-toggle.spectator-arrow::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0.9;
}

.spectator-arrow-left::before {
  transform: translateX(2px) rotate(-135deg);
}

.spectator-arrow-right::before {
  transform: translateX(-2px) rotate(45deg);
}

.spectator-arrow-up::before {
  transform: translateY(2px) rotate(-45deg);
}

.spectator-arrow-down::before {
  transform: translateY(-2px) rotate(135deg);
}

.spectator-player-list {
  display: grid;
  gap: 7px;
  max-height: 344px;
  overflow: auto;
  padding: 9px 4px 0 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(143, 220, 138, 0.55) rgba(10, 22, 31, 0.46);
  overscroll-behavior: contain;
}

.spectator-player-list::-webkit-scrollbar {
  width: 8px;
}

.spectator-player-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(10, 22, 31, 0.46);
  box-shadow: inset 0 0 0 1px rgba(127, 199, 255, 0.10);
}

.spectator-player-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(10, 22, 31, 0.76);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(143, 220, 138, 0.86), rgba(94, 176, 205, 0.74));
  box-shadow: 0 0 10px rgba(143, 220, 138, 0.18);
}

.spectator-player-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(176, 255, 166, 0.94), rgba(127, 199, 255, 0.84));
}

.spectator-player-button {
  display: grid;
  grid-template-columns: 34px 8px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 8px 9px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 8px;
  color: #edf7fb;
  background:
    linear-gradient(90deg, rgba(127, 199, 255, 0.07), rgba(255, 255, 255, 0.035) 38%, rgba(255, 255, 255, 0.025));
  cursor: pointer;
  text-align: left;
}

.spectator-player-button:hover,
.spectator-player-button.selected {
  border-color: rgba(143, 220, 138, 0.48);
  background:
    radial-gradient(circle at 12% 0%, rgba(76, 255, 82, 0.16), transparent 38%),
    linear-gradient(90deg, rgba(40, 82, 62, 0.34), rgba(25, 34, 45, 0.60));
}

.spectator-player-button.selected {
  box-shadow: inset 0 0 0 1px rgba(143, 220, 138, 0.18), 0 0 20px rgba(143, 220, 138, 0.12);
}

.spectator-player-button.dead {
  opacity: 0.58;
}

.spectator-player-button.dead.selected {
  opacity: 0.78;
}

.spectator-player-swatch {
  width: 8px;
  height: 34px;
  border-radius: 999px;
  box-shadow: 0 0 12px currentColor;
}

.spectator-player-rank {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.42));
}

.spectator-player-info {
  min-width: 0;
}

.spectator-player-info strong,
.spectator-player-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spectator-player-info strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.spectator-player-info small {
  margin-top: 3px;
  color: rgba(223, 237, 242, 0.64);
  font-size: 10px;
  font-weight: 800;
}

.spectator-player-boosts {
  display: grid;
  grid-template-columns: repeat(5, 7px);
  gap: 3px;
}

.spectator-player-boosts i {
  width: 7px;
  height: 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.spectator-empty {
  padding: 12px 8px;
  color: rgba(223, 237, 242, 0.66);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.match-payout-link {
  position: absolute;
  left: 50%;
  top: var(--payout-y, calc(var(--share-y, 50%) + 232px));
  z-index: 12;
  width: min(var(--payout-width, 650px), calc(100% - 44px));
  transform: translateX(-50%);
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(63, 96, 132, 0.84);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(23, 30, 41, 0.98), rgba(15, 24, 36, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.05);
}

.match-payout-link[hidden] {
  display: none;
}

.match-payout-link.victory-green {
  border-color: rgba(82, 255, 112, 0.38);
  background:
    linear-gradient(180deg, rgba(16, 37, 27, 0.98), rgba(9, 24, 20, 0.98));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.30),
    0 0 28px rgba(82, 255, 112, 0.08),
    inset 0 1px 0 rgba(202, 255, 211, 0.08);
}

.match-payout-header,
.match-payout-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.44fr) minmax(240px, 1fr);
  gap: 14px;
  align-items: center;
}

.match-payout-header span {
  color: rgba(229, 237, 245, 0.68);
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
  text-transform: uppercase;
}

.match-payout-link.victory-green .match-payout-header span {
  color: rgba(224, 255, 230, 0.70);
}

.match-payout-header span:last-child {
  text-align: center;
}

.match-payout-row strong {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-left: 4px solid color-mix(in srgb, var(--result-accent, #ff8f97) 82%, transparent);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.96);
  background: rgba(18, 29, 42, 0.98);
  font: 900 14px Montserrat, Segoe UI, Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-payout-link.victory-green .match-payout-row strong {
  border-color: rgba(82, 255, 112, 0.22);
  border-left-color: color-mix(in srgb, var(--result-accent, #72ff7a) 82%, transparent);
  background: rgba(13, 31, 24, 0.98);
}

.match-payout-link a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.34);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.96);
  background:
    linear-gradient(180deg, rgba(18, 29, 42, 0.98), rgba(12, 24, 36, 0.98));
  font: 900 14px Montserrat, Segoe UI, Arial, sans-serif;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.match-payout-link.victory-green a {
  border-color: rgba(82, 255, 112, 0.32);
  background:
    linear-gradient(180deg, rgba(13, 31, 24, 0.98), rgba(9, 24, 20, 0.98));
}

.match-payout-link a:hover {
  border-color: color-mix(in srgb, var(--result-accent, #ff8f97) 58%, rgba(127, 199, 255, 0.34));
  color: #ffffff;
  background:
    color-mix(in srgb, var(--result-accent, #ff8f97) 14%, #1b2a3b);
}

.match-share-block {
  position: absolute;
  top: var(--share-y, 50%);
  left: 50%;
  z-index: 11;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: min(var(--share-width, 650px), calc(100% - 44px));
  padding: 14px;
  border: 1px solid rgba(44, 58, 78, 0.95);
  border-radius: 14px;
  background: rgba(23, 30, 41, 0.98);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateX(-50%);
  pointer-events: auto;
}

.match-share-block.victory-green {
  border-color: rgba(82, 255, 112, 0.36);
  background:
    linear-gradient(180deg, rgba(17, 35, 27, 0.98), rgba(12, 24, 21, 0.98));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(82, 255, 112, 0.08),
    inset 0 1px 0 rgba(202, 255, 211, 0.08);
}

.match-share-dismiss {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 122, 137, 0.48);
  border-radius: 10px;
  color: #fff4f5;
  background:
    linear-gradient(180deg, rgba(193, 45, 58, 0.98), rgba(117, 18, 30, 0.98));
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(255, 82, 102, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  cursor: pointer;
  font: 950 23px/1 Montserrat, Segoe UI, Arial, sans-serif;
}

.match-share-block.victory-green .match-share-dismiss {
  border-color: rgba(255, 122, 137, 0.52);
  color: #fff4f5;
  background:
    linear-gradient(180deg, rgba(193, 45, 58, 0.98), rgba(117, 18, 30, 0.98));
}

.match-share-dismiss:hover {
  border-color: rgba(255, 164, 174, 0.78);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(230, 62, 76, 0.98), rgba(148, 22, 36, 0.98));
}

.match-share-summary {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(100px, auto);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(44, 58, 78, 0.95);
  border-radius: 12px;
  background: rgba(28, 37, 51, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-left-color: var(--result-accent, #9cff9a);
  border-left-width: 4px;
}

.match-share-block.victory-green .match-share-summary {
  border-color: rgba(82, 255, 112, 0.24);
  border-left-color: var(--result-accent, #72ff7a);
  background:
    linear-gradient(180deg, rgba(25, 45, 35, 0.96), rgba(18, 35, 29, 0.96));
}

.match-share-summary.long-score {
  grid-template-columns: 70px minmax(0, 1fr) 126px;
}

.match-share-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--result-accent, #9cff9a) 58%, transparent);
  border-radius: 10px;
  color: #f7fff8;
  background: rgba(20, 28, 39, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px rgba(0, 0, 0, 0.24);
  font: 950 20px Montserrat, Segoe UI, Arial, sans-serif;
}

.match-share-block.victory-green .match-share-icon {
  color: #effff1;
  background:
    radial-gradient(circle at 50% 42%, rgba(82, 255, 112, 0.22), rgba(20, 37, 29, 0.98) 64%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 20px rgba(82, 255, 112, 0.14),
    0 10px 22px rgba(0, 0, 0, 0.24);
}

.match-share-content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.match-share-title {
  color: var(--result-accent, #98ff9c);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.match-share-winner {
  min-width: 0;
  overflow: hidden;
  color: #f7fbff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.34);
  white-space: nowrap;
}

.match-share-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.match-share-meta span {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  max-width: 190px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 6px;
  color: rgba(217, 231, 238, 0.82);
  background: rgba(18, 27, 38, 0.94);
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-share-block.victory-green .match-share-meta span {
  border-color: rgba(82, 255, 112, 0.22);
  color: rgba(233, 255, 237, 0.86);
  background: rgba(13, 31, 24, 0.94);
}

.match-share-roster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.match-share-roster span {
  min-width: 0;
  min-height: 26px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--result-accent, #9cff9a) 24%, rgba(127, 199, 255, 0.12));
  border-radius: 7px;
  color: rgba(245, 250, 255, 0.92);
  background: rgba(18, 27, 38, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 10px;
  font-weight: 950;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-share-block.victory-green .match-share-roster span {
  background: rgba(13, 31, 24, 0.94);
}

.match-share-score {
  display: grid;
  place-items: center;
  min-width: 100px;
  width: 100%;
  min-height: 70px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--result-accent, #9cff9a) 42%, transparent);
  border-radius: 10px;
  background: rgba(13, 21, 30, 0.98);
}

.match-share-block.victory-green .match-share-score {
  background:
    linear-gradient(180deg, rgba(11, 30, 22, 0.98), rgba(8, 21, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(202, 255, 211, 0.08),
    0 0 18px rgba(82, 255, 112, 0.08);
}

.match-share-score strong {
  color: #ffffff;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.match-share-summary.long-score .match-share-score strong {
  font-size: 23px;
}

.match-share-score span {
  margin-top: 4px;
  color: rgba(217, 231, 238, 0.64);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.match-share-next {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 17, 27, 0.72);
}

.match-share-next span {
  color: rgba(217, 231, 238, 0.68);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.match-share-next strong {
  min-width: 0;
  overflow: hidden;
  color: #eaffef;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-share-block.victory-green .match-share-next {
  border-color: rgba(82, 255, 112, 0.24);
  background: rgba(8, 26, 19, 0.74);
}

.match-share-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}

.match-share-actions a,
.match-share-actions button {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 40px;
  border: 1px solid rgba(127, 199, 255, 0.24);
  border-radius: 8px;
  color: #f4fbff;
  background: rgba(18, 29, 42, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
  text-decoration: none;
}

.match-share-block.victory-green .match-share-actions a,
.match-share-block.victory-green .match-share-actions button {
  border-color: rgba(82, 255, 112, 0.26);
  background:
    linear-gradient(180deg, rgba(13, 31, 24, 0.98), rgba(9, 24, 20, 0.98));
}

.match-share-actions .match-share-primary {
  border-color: color-mix(in srgb, var(--result-accent, #9cff9a) 58%, transparent);
  color: #f4fff5;
  background: color-mix(in srgb, var(--result-accent, #9cff9a) 22%, #172231);
}

.match-share-actions a:hover,
.match-share-actions button:hover {
  border-color: color-mix(in srgb, var(--result-accent, #9cff9a) 58%, rgba(127, 199, 255, 0.32));
  background: color-mix(in srgb, var(--result-accent, #9cff9a) 14%, #1b2a3b);
}

.history-panel {
  grid-template-rows: auto auto auto auto;
  gap: 14px;
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 22px;
}

.history-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: visible;
}

.history-pagination {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: center;
  padding: 0;
}

.history-pagination span {
  color: rgba(223, 237, 242, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.history-pagination button {
  height: 34px;
  border: 1px solid rgba(127, 199, 255, 0.20);
  border-radius: 8px;
  color: #eef8f0;
  background: linear-gradient(180deg, rgba(38, 74, 52, 0.92), rgba(23, 53, 38, 0.92));
  cursor: pointer;
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
}

.history-pagination button:disabled {
  opacity: 0.42;
  cursor: default;
}

.history-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}

.history-tabs button {
  height: 34px;
  border: 1px solid rgba(127, 199, 255, 0.20);
  border-radius: 8px;
  color: rgba(223, 237, 242, 0.74);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
}

.history-tabs button.active {
  border-color: rgba(143, 220, 138, 0.70);
  color: #ffffff;
  background: linear-gradient(180deg, rgba(55, 91, 67, 0.94), rgba(34, 74, 48, 0.94));
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(128px, 180px) 84px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 10px;
  background:
    radial-gradient(circle at 0 0, rgba(143, 220, 138, 0.10), transparent 38%),
    rgba(12, 24, 30, 0.86);
}

.history-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.history-meta strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.history-tags span {
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid rgba(143, 220, 138, 0.24);
  border-radius: 999px;
  color: rgba(223, 237, 242, 0.82);
  background: rgba(143, 220, 138, 0.08);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row button {
  min-height: 34px;
  border: 1px solid rgba(143, 220, 138, 0.36);
  border-radius: 8px;
  color: #f5fff7;
  background: linear-gradient(180deg, rgba(37, 112, 55, 0.95), rgba(16, 58, 34, 0.95));
  cursor: pointer;
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
}

.history-row button {
  width: 84px;
  min-width: 0;
}

.replay-overlay {
  align-items: center;
  justify-content: center;
}

.replay-overlay.open {
  z-index: 85;
}

.replay-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1160px, calc(100vw - 44px));
  height: min(780px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid #2d3a4c;
  border-radius: 12px;
  background: #141b25;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.replay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 1px solid #253141;
  background: #182231;
}

.replay-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.replay-head span {
  color: #91a4b6;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.replay-head strong {
  min-width: 0;
  overflow: hidden;
  color: #f7fbff;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-head button,
.replay-controls button,
.replay-names-toggle {
  min-height: 38px;
  border: 1px solid #324157;
  border-radius: 8px;
  color: #e7f0f8;
  background: #1d2736;
  cursor: pointer;
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.replay-head button {
  min-width: 96px;
}

.replay-head button:hover,
.replay-controls button:hover,
.replay-names-toggle:hover {
  border-color: #46607f;
  background: #243247;
}

.replay-stage {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  background: #101822;
}

#replayCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 1px solid #2b394b;
  border-radius: 10px;
  background: #071018;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 12px 30px rgba(0,0,0,0.22);
}

.replay-controls {
  display: grid;
  grid-template-columns: 42px 96px 42px 118px minmax(190px, 1fr) auto 96px;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid #253141;
  background: #151d28;
}

.replay-controls input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.replay-step-button {
  display: grid;
  place-items: center;
  min-width: 42px;
  padding: 0;
  font-size: 20px !important;
  line-height: 1;
}

.replay-step-button span {
  display: block;
  transform: translateY(-1px);
}

.replay-play-button {
  border-color: rgba(0, 200, 10, 0.42) !important;
  color: #fff !important;
  background: #078907 !important;
}

.replay-speed-group {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 6px;
}

.replay-speed-group button.active {
  border-color: #5cd561;
  color: #ffffff;
  background: #079207;
}

.replay-time {
  color: rgba(223, 237, 242, 0.82);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.replay-names-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 0 10px;
  color: rgba(223, 237, 242, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.replay-controls button:disabled {
  opacity: 0.45;
  cursor: default;
}

@media (max-width: 920px) {
  .replay-panel {
    height: min(760px, calc(100vh - 28px));
  }

  .replay-controls {
    grid-template-columns: 42px 1fr 42px;
  }

  .replay-time,
  .replay-controls input[type="range"],
  .replay-speed-group,
  .replay-names-toggle {
    grid-column: 1 / -1;
  }

  .replay-speed-group {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 560px) {
  .match-payout-link {
    top: var(--payout-y, calc(var(--share-y, 50%) + 232px));
    width: calc(100% - 40px);
  }

  .match-payout-header,
  .match-payout-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .match-share-block {
    grid-template-columns: 1fr;
    width: calc(100% - 40px);
  }

  .match-share-summary {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
  }

  .match-share-icon {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }

  .match-share-score {
    grid-column: 1 / -1;
    min-height: 48px;
  }

  .match-share-summary.long-score {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .match-share-roster {
    grid-template-columns: 1fr;
  }

  .match-share-winner {
    font-size: 19px;
  }

  .match-share-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.paid-entry-card .paid-lobby-summary strong {
  font-size: 20px;
}

.paid-entry-card .paid-lobby-summary span {
  font-size: 13px;
}

.paid-join-panel {
  display: grid;
  gap: 9px;
  margin-top: 2px;
  padding: 11px;
  border: 1px solid rgba(0, 136, 255, 0.26);
  border-radius: 10px;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 94, 255, 0.24), transparent 44%),
    rgba(5, 14, 24, 0.72);
}

.paid-lobby-summary {
  display: grid;
  gap: 3px;
  padding-bottom: 2px;
}

.paid-lobby-summary strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paid-lobby-summary span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
}

.paid-join-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.paid-join-head img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0052ff;
  box-shadow: 0 0 18px rgba(0, 103, 255, 0.34);
}

.paid-join-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.paid-join-head strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.paid-join-head span,
.paid-join-panel p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.paid-join-wallet,
.paid-join-tx {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.paid-join-tx {
  grid-template-columns: minmax(0, 1fr) 106px;
}

.paid-join-wallet code,
.paid-join-tx input {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 136, 255, 0.24);
  border-radius: 8px;
  color: #e2f2ff;
  background: rgba(2, 9, 18, 0.72);
  font: 800 12px Montserrat, Segoe UI, Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paid-join-tx input {
  white-space: normal;
}

.paid-join-wallet button,
.paid-join-tx button {
  min-height: 38px;
  border: 1px solid rgba(0, 136, 255, 0.38);
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 110, 255, 0.66), rgba(0, 63, 154, 0.66));
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
}

.paid-join-wallet button {
  display: inline-grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding: 0;
}

.paid-join-wallet button.copied {
  border-color: rgba(143, 220, 138, 0.74);
  background: linear-gradient(180deg, rgba(55, 172, 84, 0.86), rgba(27, 113, 55, 0.82));
}

.paid-join-tx button {
  border-color: rgba(143, 220, 138, 0.58);
  background: linear-gradient(180deg, rgba(63, 168, 88, 0.76), rgba(31, 100, 55, 0.72));
}

.match-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.match-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
}

.match-meta span {
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.match-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.play-area {
  position: absolute;
  inset: 0 0 0 var(--sidebar-width);
  z-index: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #101712;
  transition: left 0.24s ease;
}

.game-shell.sidebar-collapsed .play-area {
  left: 42px;
}

.kill-feed {
  position: absolute;
  top: 50px;
  right: 16px;
  z-index: 9;
  display: grid;
  justify-items: end;
  gap: 5px;
  width: min(250px, 26vw);
  pointer-events: none;
}

.kill-feed-item {
  --killer-color: #ffd6d8;
  --killer-glow: #ffafb5;
  --victim-color: #f1b5bd;
  --victim-glow: #ffafb5;
  display: grid;
  grid-template-columns: 28px minmax(0, auto);
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  min-height: 36px;
  padding: 5px 7px;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--killer-color) 30%, #263140);
  border-radius: 7px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--killer-color) 12%, transparent), transparent 46%),
    linear-gradient(180deg, rgba(32, 38, 53, 0.92), rgba(17, 24, 35, 0.90));
  backdrop-filter: blur(8px);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.24),
    0 0 12px color-mix(in srgb, var(--killer-glow) 10%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: killFeedIn 180ms ease-out;
}

.kill-feed-item.is-blue {
  --killer-color: #8fd0ff;
  --killer-glow: #4bb4ff;
}

.kill-feed-item.is-hot {
  --killer-color: #ff8b8b;
  --killer-glow: #ff5469;
}

.kill-feed-item.is-gold {
  --killer-color: #ffe279;
  --killer-glow: #ffb84d;
}

.kill-feed-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--killer-color) 38%, #263140);
  border-radius: 6px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--killer-color) 34%, transparent), transparent 62%),
    #151b24;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.kill-feed-icon img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.34));
}

.kill-feed-content {
  display: grid;
  align-content: center;
  min-width: 0;
}

.kill-feed-badge {
  color: color-mix(in srgb, var(--killer-color) 82%, #ffffff);
  font-size: 8px;
  font-weight: 950;
  line-height: 9px;
  text-transform: uppercase;
  text-shadow: 0 0 12px color-mix(in srgb, var(--killer-glow) 26%, transparent);
}

.kill-feed-text {
  display: block;
  color: #dce7ee;
  font-size: 10px;
  font-weight: 800;
  line-height: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(127, 199, 255, 0.08);
}

.kill-feed-text strong {
  color: #ffd1d4;
  font-weight: 950;
}

.kill-feed-text .killer {
  color: var(--killer-color);
  text-shadow: 0 0 12px color-mix(in srgb, var(--killer-glow) 36%, transparent);
}

.kill-feed-text .victim {
  color: var(--victim-color);
  text-shadow: 0 0 10px color-mix(in srgb, var(--victim-glow) 24%, transparent);
}

@keyframes killFeedIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #101712;
  cursor: none;
}

#game.spectator-cursor {
  cursor: default;
}

.hud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--panel-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  user-select: none;
}

.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  min-height: 21px;
}

.hud-row span {
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-row strong {
  overflow: hidden;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-row #score {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  max-width: 118px;
  overflow: visible;
  font-size: 13px;
  text-overflow: clip;
}

.hud-row strong .score-team {
  font-weight: 900;
  text-shadow: 0 0 10px currentColor;
}

.hud-row strong .score-separator,
.hud-row strong .score-limit {
  color: rgba(229, 238, 240, 0.72);
  text-shadow: none;
}

.hud-row strong .score-limit {
  font-size: 0.82em;
}

.muted {
  opacity: 0.68;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--panel-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chat-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: start;
  margin-bottom: 8px;
}

.chat-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.chat-filters label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  height: 28px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 6px;
  background: rgba(127, 199, 255, 0.055);
  color: #dce7ee;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.chat-filters input {
  width: 13px;
  height: 13px;
  accent-color: #8be985;
}

.chat-close-button {
  display: none;
  position: relative;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 6px;
  background: rgba(127, 199, 255, 0.055);
  cursor: pointer;
}

.chat-close-button::before,
.chat-close-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: #dce7ee;
  transform-origin: center;
}

.chat-close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.chat-close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.chat-close-button:hover {
  border-color: rgba(127, 199, 255, 0.58);
  background: rgba(127, 199, 255, 0.13);
}

.chat-messages {
  min-height: 0;
  overflow: hidden auto;
  padding-right: 4px;
  font-size: 13px;
  line-height: 1.35;
  scrollbar-color: rgba(143, 220, 138, 0.42) transparent;
}

.chat-line {
  margin-bottom: 7px;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  overflow-wrap: anywhere;
}

.chat-name {
  color: var(--accent);
  font-weight: 700;
}

.chat-text {
  color: #f2f5ef;
}

.system-line .chat-name {
  color: #8be985;
}

.kill-chat-line {
  --killer-color: #ffd6d8;
  --killer-glow: #ffafb5;
  --victim-color: #f1b5bd;
  --victim-glow: #ffafb5;
  padding: 8px 9px;
  border: 1px solid color-mix(in srgb, var(--killer-color) 30%, rgba(127, 199, 255, 0.12));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--killer-color) 13%, transparent), transparent 42%),
    rgba(18, 28, 40, 0.62);
  box-shadow: inset 2px 0 0 var(--killer-color), 0 0 14px color-mix(in srgb, var(--killer-glow) 10%, transparent);
}

.kill-chat-line .kill-feed-text {
  font-size: 12px;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 8px;
  margin-top: 8px;
}

.chat-form input,
.chat-form button,
.voice-button,
.settings-panel button,
.settings-head button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.075);
  color: #ffffff;
  font: inherit;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.chat-form input {
  min-width: 0;
  padding: 0 10px;
  outline: none;
}

.chat-form input:focus {
  border-color: rgba(143, 220, 138, 0.82);
  background: rgba(255, 255, 255, 0.105);
}

.chat-form button,
.voice-button,
.settings-panel button,
.settings-head button {
  cursor: pointer;
}

.chat-form button:hover,
.voice-button:hover,
.settings-panel button:hover,
.settings-head button:hover {
  border-color: rgba(127, 199, 255, 0.58);
  background: rgba(127, 199, 255, 0.13);
}

.chat-form button:active,
.voice-button:active,
.settings-panel button:active,
.settings-head button:active {
  transform: translateY(1px);
}

.voice-button {
  width: 100%;
  color: #dff7e1;
  background: linear-gradient(180deg, rgba(143, 220, 138, 0.16), rgba(143, 220, 138, 0.06));
}

.voice-button.active {
  border-color: rgba(143, 220, 138, 0.9);
  background: linear-gradient(180deg, rgba(70, 159, 83, 0.86), rgba(41, 116, 53, 0.86));
  box-shadow: 0 0 24px rgba(143, 220, 138, 0.18);
}

.mic-button.muted {
  color: #ffd8c9;
  border-color: rgba(255, 141, 107, 0.42);
  background: linear-gradient(180deg, rgba(255, 141, 107, 0.13), rgba(255, 141, 107, 0.045));
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(3, 8, 12, 0.58);
  backdrop-filter: blur(10px);
}

.settings-overlay.open {
  display: grid;
}

.settings-panel {
  display: grid;
  gap: 10px;
  width: min(520px, calc(100vw - 44px));
  min-width: 0;
  max-height: calc(100vh - 44px);
  overflow: hidden auto;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--panel-bg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.setting-checkbox {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 8px;
  color: var(--text-muted);
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.075), rgba(143, 220, 138, 0.045)),
    rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.setting-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setting-checkbox::before {
  content: "";
  width: 38px;
  height: 22px;
  border: 1px solid rgba(127, 199, 255, 0.25);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(8, 17, 24, 0.94), rgba(5, 12, 18, 0.96));
  box-shadow: inset 0 1px 7px rgba(0, 0, 0, 0.45);
}

.setting-checkbox::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #dcebf2, #7e98a6);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.42);
  transform: translateY(-50%);
  transition: transform 0.18s ease, background 0.18s ease;
}

.setting-checkbox:has(input:checked) {
  border-color: rgba(143, 220, 138, 0.48);
  background:
    linear-gradient(135deg, rgba(0, 117, 255, 0.12), rgba(66, 190, 91, 0.16)),
    rgba(13, 30, 29, 0.72);
  box-shadow: 0 0 20px rgba(143, 220, 138, 0.08);
}

.setting-checkbox:has(input:checked)::before {
  border-color: rgba(143, 220, 138, 0.58);
  background: linear-gradient(180deg, rgba(49, 178, 87, 0.94), rgba(19, 99, 48, 0.94));
}

.setting-checkbox:has(input:checked)::after {
  transform: translate(16px, -50%);
  background: linear-gradient(180deg, #ffffff, #baffb7);
}

.setting-checkbox span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.players-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(460px, calc(100vw - 44px));
  min-width: 0;
  max-height: min(620px, calc(100vh - 44px));
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--panel-bg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.players-panel.match-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(720px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 44px));
}

#playersOverlay {
  position: absolute;
  place-items: center;
  inset: 0;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(5, 10, 15, 0.34), rgba(5, 10, 15, 0.12)),
    rgba(3, 8, 12, 0.34);
  backdrop-filter: blur(4px);
}

#playersOverlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

#playersOverlay .scoreboard-panel {
  justify-self: center;
  align-self: center;
  margin: auto;
}

#playersOverlay .scoreboard-panel {
  width: min(780px, calc(100vw - 44px));
  max-height: min(540px, calc(100vh - 92px));
  padding: 9px;
  border-color: rgba(67, 85, 108, 0.92);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(76, 255, 82, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(27, 34, 45, 0.98), rgba(13, 20, 29, 0.98));
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.scoreboard-panel .players-head {
  min-height: 34px;
  padding: 0 2px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.scoreboard-panel .players-head strong {
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
}

.scoreboard-panel .players-head button {
  width: 74px;
  height: 31px;
  border-color: #344151;
  border-radius: 7px;
  color: #c8d5df;
  background: #202635;
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
}

.scoreboard-panel .players-head button:hover {
  color: #fff;
  border-color: rgba(127, 199, 255, 0.34);
  background: #252c3a;
}

.auth-panel {
  display: grid;
  gap: 14px;
  width: min(470px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  overflow: hidden auto;
  padding: 18px;
  border: 1px solid rgba(127, 199, 255, 0.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 0%, rgba(98, 231, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(24, 43, 58, 0.96), rgba(7, 12, 20, 0.97)),
    var(--panel-bg);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(98, 231, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.progress-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, calc(100vw - 36px));
  max-height: min(780px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(127, 199, 255, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(18, 30, 37, 0.98), rgba(8, 13, 18, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.progress-modal-grid,
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  overflow: auto;
}

.progress-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.09), rgba(143, 220, 138, 0.06)),
    rgba(7, 14, 20, 0.74);
}

.progress-card.wide {
  grid-column: 1 / -1;
}

.progress-card-head strong {
  color: #fff;
  font-size: 20px;
  font-weight: 950;
}

.progress-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
}

.quest-list,
.leaderboard-list,
.friend-list,
.party-panel {
  display: grid;
  gap: 8px;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.leaderboard-tabs button {
  min-height: 32px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 8px;
  color: #aebdc6;
  background: rgba(255, 255, 255, 0.045);
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
}

.leaderboard-tabs button.active {
  color: #f4fff2;
  border-color: rgba(143, 220, 138, 0.58);
  background:
    linear-gradient(135deg, rgba(143, 220, 138, 0.22), rgba(127, 199, 255, 0.10)),
    rgba(255, 255, 255, 0.06);
}

.quest-item,
.leader-row,
.friend-row,
.party-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.leader-row,
.friend-row,
.party-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.quest-item strong,
.leader-row strong,
.friend-row strong,
.party-row strong {
  color: #fff;
  font-size: 13px;
}

.quest-item small,
.leader-row small,
.friend-row small,
.party-row small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.quest-item button,
.friend-row button,
.party-panel button,
.friend-form button {
  min-height: 32px;
  border: 1px solid rgba(143, 220, 138, 0.45);
  border-radius: 7px;
  color: #f4fff2;
  background: linear-gradient(180deg, rgba(62, 164, 82, 0.90), rgba(29, 92, 48, 0.92));
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
}

.quest-item button:disabled,
.friend-row button:disabled {
  cursor: default;
  opacity: 0.48;
}

.friend-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.friend-form input {
  min-width: 0;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  padding: 0 11px;
  font: 800 13px Montserrat, Segoe UI, Arial, sans-serif;
}

.notification-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 35;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 36px));
  pointer-events: none;
}

.notification-toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 64px;
  padding: 13px 15px 13px 16px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.24);
  border-left: 3px solid #8fdc8a;
  border-radius: 8px;
  color: #eef8fb;
  background:
    radial-gradient(circle at 8% 0%, rgba(143, 220, 138, 0.20), transparent 42%),
    linear-gradient(135deg, rgba(127, 199, 255, 0.13), rgba(143, 220, 138, 0.08)),
    rgba(7, 14, 20, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: toastIn 180ms ease-out;
}

.notification-toast.friend {
  border-left-color: #7fc7ff;
}

.notification-toast.party {
  border-left-color: #8fdc8a;
}

.notification-toast.success {
  border-left-color: #f4d35e;
}

.notification-toast.match {
  border-left-color: #7fc7ff;
}

.notification-toast.centered {
  position: fixed;
  top: var(--notification-toast-y, 50%);
  left: var(--notification-toast-x, 50%);
  z-index: 65;
  width: min(380px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  animation: toastCenterIn 180ms ease-out;
}

.notification-toast.has-action {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  pointer-events: auto;
}

.notification-toast button {
  min-width: 76px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(127, 199, 255, 0.34);
  border-radius: 7px;
  color: #effbff;
  background: rgba(18, 32, 45, 0.92);
  font: 950 11px Montserrat, Segoe UI, Arial, sans-serif;
  text-transform: uppercase;
}

.notification-toast button:hover {
  border-color: rgba(127, 199, 255, 0.62);
  background: rgba(27, 52, 73, 0.96);
}

.notification-toast > div {
  min-width: 0;
}

.notification-toast strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-toast span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastCenterIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 10px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-form input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(127, 199, 255, 0.25);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-form input:focus {
  border-color: rgba(127, 199, 255, 0.62);
}

.auth-error {
  min-height: 18px;
  margin: 0;
  color: #ffb3b3;
  font-size: 12px;
  font-weight: 800;
}

.auth-form button {
  min-height: 40px;
  border: 1px solid rgba(127, 199, 255, 0.24);
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(49, 124, 160, 0.50), rgba(31, 68, 92, 0.44));
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-form button[type="submit"] {
  border-color: rgba(143, 220, 138, 0.52);
  background: linear-gradient(180deg, rgba(63, 168, 88, 0.72), rgba(31, 100, 55, 0.70));
  box-shadow: 0 0 22px rgba(143, 220, 138, 0.12);
}

.auth-form .auth-link-button {
  min-height: 32px;
  border-color: transparent;
  color: rgba(174, 220, 255, 0.9);
  background: transparent;
  box-shadow: none;
}

.auth-form .auth-link-button:hover {
  color: #ffffff;
  background: rgba(127, 199, 255, 0.08);
}

.auth-form button:hover {
  filter: brightness(1.08);
}

.players-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.players-head strong {
  color: #ffffff;
  font-size: 15px;
}

.players-head button,
.player-mute {
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.075);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.players-head button {
  width: 76px;
  font-size: 12px;
}

.players-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: hidden auto;
  scrollbar-color: rgba(143, 220, 138, 0.42) transparent;
}

.scoreboard-panel .players-list {
  display: block;
  padding: 0;
  border-radius: 8px;
  overflow: hidden auto;
}

.scoreboard-table {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.scoreboard-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 10px;
  border-color: #303946;
  background:
    radial-gradient(circle at 18% 0%, rgba(76, 255, 82, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(32, 38, 53, 0.92), rgba(21, 27, 37, 0.96));
  border: 1px solid #303946;
  border-radius: 8px;
}

.scoreboard-mode,
.scoreboard-limit {
  min-width: 0;
  overflow: hidden;
  color: #91a2b1;
  font-size: 11px;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.scoreboard-scoreline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: #fff;
  font-size: 21px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.scoreboard-scoreline span,
.scoreboard-scoreline i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  font-style: normal;
  line-height: 22px;
}

.scoreboard-scoreline span {
  min-width: 18px;
}

.scoreboard-score-blue {
  color: #8fd0ff;
  text-shadow: 0 0 14px rgba(127, 199, 255, 0.24), var(--v3-figma-shadow);
}

.scoreboard-score-red {
  color: #ff9a9a;
  text-shadow: 0 0 14px rgba(255, 122, 137, 0.22), var(--v3-figma-shadow);
}

.scoreboard-score-divider {
  color: rgba(226, 241, 255, 0.92);
  transform: translateY(-1px);
}

.scoreboard-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 58px 44px 44px 58px 36px;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(48, 57, 70, 0.86);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(127, 199, 255, 0.035), transparent 42%),
    rgba(24, 31, 43, 0.74);
}

.scoreboard-header {
  min-height: 28px;
  border-color: rgba(127, 199, 255, 0.12);
  color: #8091a0;
  background: rgba(12, 18, 26, 0.62);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.scoreboard-team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(127, 199, 255, 0.10);
  border-radius: 7px;
  color: #afbfca;
  background:
    radial-gradient(circle at 12% 0%, rgba(76, 255, 82, 0.08), transparent 34%),
    rgba(9, 15, 23, 0.74);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scoreboard-team-row[data-team="blue"] {
  border-color: rgba(105, 190, 255, 0.34);
  color: #9ed3ff;
  background:
    radial-gradient(circle at 12% 0%, rgba(105, 190, 255, 0.16), transparent 36%),
    linear-gradient(90deg, rgba(47, 129, 205, 0.18), rgba(9, 15, 23, 0.76));
}

.scoreboard-team-row[data-team="red"] {
  border-color: rgba(255, 110, 128, 0.34);
  color: #ffb5c0;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 110, 128, 0.16), transparent 36%),
    linear-gradient(90deg, rgba(185, 58, 78, 0.18), rgba(9, 15, 23, 0.76));
}

.scoreboard-team-row[data-team="spectator"] {
  border-color: rgba(190, 206, 220, 0.22);
  color: #c5d2de;
  background:
    radial-gradient(circle at 12% 0%, rgba(190, 206, 220, 0.10), transparent 36%),
    linear-gradient(90deg, rgba(106, 122, 138, 0.13), rgba(9, 15, 23, 0.76));
}

.scoreboard-team-row[data-team="neutral"] {
  border-color: rgba(143, 220, 138, 0.20);
  color: #b9d9bb;
}

.scoreboard-row.own {
  border-color: rgba(76, 255, 82, 0.34);
  background:
    linear-gradient(90deg, rgba(76, 255, 82, 0.14), rgba(32, 38, 53, 0.72));
}

.scoreboard-row.eliminated {
  opacity: 0.62;
}

.scoreboard-row[data-team="blue"] {
  border-color: rgba(105, 190, 255, 0.20);
  background:
    linear-gradient(90deg, rgba(105, 190, 255, 0.16), rgba(24, 31, 43, 0.78) 42%, rgba(24, 31, 43, 0.72)),
    rgba(24, 31, 43, 0.74);
  box-shadow: inset 3px 0 0 rgba(105, 190, 255, 0.76);
}

.scoreboard-row[data-team="red"] {
  border-color: rgba(255, 110, 128, 0.20);
  background:
    linear-gradient(90deg, rgba(255, 110, 128, 0.16), rgba(24, 31, 43, 0.78) 42%, rgba(24, 31, 43, 0.72)),
    rgba(24, 31, 43, 0.74);
  box-shadow: inset 3px 0 0 rgba(255, 110, 128, 0.76);
}

.scoreboard-row[data-team="spectator"] {
  border-color: rgba(190, 206, 220, 0.14);
  background:
    linear-gradient(90deg, rgba(190, 206, 220, 0.10), rgba(24, 31, 43, 0.68) 42%, rgba(24, 31, 43, 0.62)),
    rgba(24, 31, 43, 0.64);
  box-shadow: inset 3px 0 0 rgba(190, 206, 220, 0.44);
}

.scoreboard-row.own[data-team="blue"] {
  background:
    linear-gradient(90deg, rgba(105, 190, 255, 0.19), rgba(76, 255, 82, 0.13) 44%, rgba(32, 38, 53, 0.72));
}

.scoreboard-row.own[data-team="red"] {
  background:
    linear-gradient(90deg, rgba(255, 110, 128, 0.19), rgba(76, 255, 82, 0.13) 44%, rgba(32, 38, 53, 0.72));
}

.scoreboard-cell {
  min-width: 0;
  overflow: hidden;
  color: #dbe7ef;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-request-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(5, 10, 14, 0.62);
  backdrop-filter: blur(9px);
}

.social-request-overlay.open {
  display: grid;
}

.social-request-card {
  display: grid;
  gap: 14px;
  width: min(360px, calc(100vw - 48px));
  padding: 18px;
  border: 1px solid #303946;
  border-radius: 12px;
  background: #171c25;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.social-request-card > strong {
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: var(--v3-figma-shadow);
}

.social-request-player {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #303946;
  border-radius: 9px;
  background: #202635;
}

.social-request-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(0, 200, 10, 0.36);
  border-radius: 11px;
  color: #fff;
  background: #078907;
  font-size: 22px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
}

.social-request-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.social-request-player div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.social-request-player b {
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-shadow: var(--v3-figma-shadow);
  white-space: nowrap;
}

.social-request-player small {
  overflow: hidden;
  color: #b9c6d4;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-request-player em {
  justify-self: start;
  padding: 3px 7px;
  border: 1px solid rgba(127, 199, 255, 0.24);
  border-radius: 6px;
  color: #cfe4ff;
  background: #111923;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.social-request-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.social-request-actions button {
  height: 40px;
  border: 1px solid #303946;
  border-radius: 8px;
  color: #fff;
  font: 950 13px Montserrat, Segoe UI, Arial, sans-serif;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.social-request-actions .accept {
  border-color: rgba(0, 200, 10, 0.42);
  background: #078907;
}

.social-request-actions .decline {
  border-color: rgba(255, 124, 143, 0.38);
  background: #b41f2b;
}

.social-request-actions button:hover {
  filter: brightness(1.08);
}

.scoreboard-cell-name {
  display: flex;
  align-items: center;
  gap: 7px;
}

.scoreboard-rank-icon {
  width: 24px;
  min-width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

.scoreboard-panel .player-color {
  width: 9px;
  min-width: 9px;
  height: 9px;
  border-color: rgba(255, 255, 255, 0.7);
}

.scoreboard-cell-name strong {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scoreboard-cell-hp,
.scoreboard-cell-stat,
.scoreboard-cell-ping {
  text-align: center;
}

.scoreboard-cell-actions {
  display: flex;
  justify-content: flex-end;
}

.scoreboard-panel .player-mute {
  width: 26px;
  min-width: 26px;
  height: 25px;
}

.scoreboard-panel .player-mute::before {
  top: 5px;
  width: 7px;
  height: 10px;
  border-width: 1.5px;
  border-radius: 6px;
}

.scoreboard-panel .player-mute::after {
  bottom: 5px;
  width: 12px;
  height: 7px;
  border-right-width: 1.5px;
  border-bottom-width: 1.5px;
  border-left-width: 1.5px;
  border-radius: 0 0 6px 6px;
}

@media (min-width: 1500px) and (min-height: 820px) {
  #playersOverlay .scoreboard-panel {
    width: min(980px, calc(100vw - 72px));
    max-height: min(650px, calc(100vh - 120px));
    padding: 10px;
  }

  .scoreboard-row {
    grid-template-columns: minmax(240px, 1fr) 70px 52px 52px 70px 42px;
    min-height: 38px;
    gap: 8px;
    padding: 0 10px;
  }

  .scoreboard-scoreline {
    font-size: 24px;
  }

  .scoreboard-cell-name strong {
    font-size: 13px;
  }

  .scoreboard-rank-icon {
    width: 28px;
    min-width: 28px;
    height: 28px;
  }
}

.player-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.player-action-button {
  min-width: 72px;
  height: 32px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.22);
  border-radius: 7px;
  color: #dff7e1;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.14), rgba(143, 220, 138, 0.08)),
    rgba(255, 255, 255, 0.055);
  font: 900 11px Montserrat, Segoe UI, Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.player-action-button:hover {
  border-color: rgba(143, 220, 138, 0.46);
  background:
    linear-gradient(135deg, rgba(143, 220, 138, 0.18), rgba(127, 199, 255, 0.10)),
    rgba(255, 255, 255, 0.07);
}

.player-action-button:disabled {
  cursor: default;
  opacity: 0.44;
}

.player-info {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  min-width: 0;
}

.player-color {
  grid-row: 1 / span 2;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.player-name {
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-twitter {
  display: grid;
  place-items: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(127, 199, 255, 0.24);
  border-radius: 50%;
  color: #bfe8ff;
  background: rgba(127, 199, 255, 0.08);
  font-size: 11px;
  text-decoration: none;
  line-height: 1;
}

.player-twitter:hover {
  border-color: rgba(127, 199, 255, 0.58);
  background: rgba(127, 199, 255, 0.16);
}

.player-meta {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.player-mute {
  position: relative;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(76, 255, 82, 0.52);
  border-radius: 8px;
  color: #4cff52;
  background:
    radial-gradient(circle at 50% 18%, rgba(76, 255, 82, 0.20), transparent 62%),
    #15241c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 13px rgba(76, 255, 82, 0.16);
}

.player-mute::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 10px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 7px;
  transform: translateX(-50%);
}

.player-mute::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 16px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-radius: 0 0 8px 8px;
  transform: translateX(-50%);
}

.player-mute.muted {
  color: #ff8d6b;
  border-color: rgba(255, 141, 107, 0.42);
  background:
    linear-gradient(135deg, transparent 44%, rgba(255, 141, 107, 0.95) 47%, rgba(255, 141, 107, 0.95) 53%, transparent 56%),
    radial-gradient(circle at 50% 18%, rgba(255, 141, 107, 0.15), transparent 62%),
    #241916;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 10px rgba(255, 141, 107, 0.10);
}

.player-mute.muted::after {
  border-color: currentColor;
}

.player-mute.muted:focus-visible {
  outline: 2px solid rgba(255, 141, 107, 0.7);
  outline-offset: 2px;
}

.player-mute:not(.muted):focus-visible {
  outline: 2px solid rgba(143, 220, 138, 0.7);
  outline-offset: 2px;
}

.player-mute.muted::before {
  border-color: currentColor;
}

.players-empty {
  padding: 18px 10px;
  color: var(--text-muted);
  text-align: center;
}

.settings-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.settings-head strong {
  color: #ffffff;
  font-size: 14px;
}

.settings-head button {
  width: 72px;
  height: 28px;
  font-size: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bind-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 0 9px;
}

.bind-button span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bind-button strong {
  color: #ffffff;
  font-size: 12px;
}

.bind-button.waiting {
  border-color: rgba(143, 220, 138, 0.9);
  background: rgba(143, 220, 138, 0.16);
}

.setting-range,
.setting-select,
.setting-color {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.setting-range input {
  width: 100%;
  accent-color: var(--accent);
}

.setting-select select {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.075);
  color: #ffffff;
  font: inherit;
  outline: none;
}

.setting-select option {
  color: #10131a;
}

.setting-color {
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.065), rgba(143, 220, 138, 0.035)),
    rgba(255, 255, 255, 0.03);
}

.setting-color span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-color input {
  width: 58px;
  height: 34px;
  padding: 4px;
  border: 1px solid rgba(127, 199, 255, 0.28);
  border-radius: 9px;
  background: rgba(6, 14, 22, 0.62);
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.36), 0 0 14px rgba(127, 199, 255, 0.07);
  cursor: pointer;
}

/* Modern shell pass for the expanded lobby/progression/social UI. */
.players-panel.match-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  width: min(900px, calc(100vw - 40px));
  max-height: min(820px, calc(100vh - 40px));
  padding: 0;
  border-color: rgba(127, 199, 255, 0.24);
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 0%, rgba(127, 199, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(18, 30, 39, 0.98), rgba(7, 12, 18, 0.98));
}

#playersOverlay .players-panel.scoreboard-panel {
  width: min(780px, calc(100vw - 44px));
  max-height: min(540px, calc(100vh - 92px));
  padding: 9px;
  border-radius: 10px;
}

@media (min-width: 1500px) and (min-height: 820px) {
  #playersOverlay .players-panel.scoreboard-panel {
    width: min(980px, calc(100vw - 72px));
    max-height: min(650px, calc(100vh - 120px));
    padding: 10px;
  }
}

.match-panel .players-head,
.progress-modal .settings-head {
  min-height: 58px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.12);
}

.match-tabs {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.10);
  background: rgba(255, 255, 255, 0.025);
}

.match-tabs button,
.match-filter-tabs button,
.leaderboard-tabs button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#matchFindPane.match-pane.active {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.match-actions {
  padding: 12px 14px 8px;
}

.public-arena-slot {
  padding: 0 14px 12px;
}

.match-filter-tabs {
  padding: 0 14px 10px;
}

.matches-list {
  padding: 10px 14px 14px;
}

.match-create-form.match-pane.active {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  max-height: 100%;
  overflow: hidden auto;
  padding: 16px 14px 18px;
}

.match-create-form label {
  grid-column: span 6;
  min-width: 0;
}

.match-create-form label:first-child {
  grid-column: span 8;
}

.match-create-form label:has(#matchTypeSelect) {
  grid-column: span 4;
}

.match-create-form label:has(#matchPasswordInput) {
  grid-column: span 12;
}

.match-create-form .match-paid-toggle,
.match-create-form .match-bots-toggle,
.match-create-form .match-observer-toggle,
.match-create-form .match-organizer-toggle {
  grid-column: span 6;
}

.match-create-form button[type="submit"],
.paid-match-block {
  grid-column: 1 / -1;
}

.match-create-form input,
.match-create-form select {
  width: 100%;
  min-width: 0;
}

.match-create-form button[type="submit"] {
  min-height: 44px;
  border-color: rgba(143, 220, 138, 0.58);
  color: #f4fff2;
  background: linear-gradient(180deg, rgba(65, 172, 86, 0.88), rgba(28, 105, 52, 0.88));
  font-size: 14px;
  font-weight: 950;
}

.paid-match-block {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.match-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 68px;
  border-radius: 10px;
}

.match-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.match-meta strong,
.match-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-row-actions {
  flex-wrap: nowrap;
}

.progress-modal {
  width: min(1040px, calc(100vw - 40px));
  max-height: min(820px, calc(100vh - 40px));
  border-radius: 12px;
}

.progress-modal-grid {
  grid-template-columns: minmax(330px, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  padding: 14px;
  overflow: hidden;
}

.progress-modal-grid .progress-card.wide {
  grid-column: 1;
  grid-row: 1;
}

.progress-modal-grid .progress-card {
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.progress-modal-grid .progress-card:has(.leaderboard-tabs),
.social-grid .progress-card {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.progress-modal-grid .progress-card.wide {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.quest-list,
.leaderboard-list,
.friend-list,
.party-panel {
  min-height: 0;
  overflow: hidden auto;
  padding-right: 2px;
  scrollbar-color: rgba(143, 220, 138, 0.42) transparent;
}

.party-panel {
  align-content: start;
  overflow: visible;
}

.leaderboard-list {
  align-content: start;
  grid-auto-rows: max-content;
  height: 100%;
  max-height: none;
}

.friend-list {
  align-content: start;
  grid-auto-rows: max-content;
}

.quest-list {
  max-height: none;
}

.leader-row,
.friend-row,
.party-row {
  grid-template-columns: 44px minmax(0, 1fr) minmax(74px, auto);
  min-height: 44px;
  padding: 7px 9px;
}

.leader-row {
  border-color: rgba(127, 199, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.07), rgba(143, 220, 138, 0.035)),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.leader-row > span,
.friend-row > span,
.party-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.friend-row > span:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.leader-row strong,
.leader-row small,
.friend-row strong,
.friend-row small,
.party-row strong,
.party-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-row > strong:first-child {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  background: rgba(127, 199, 255, 0.07);
}

.leader-badges {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.leaderboard-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.leaderboard-action-button {
  min-width: 88px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #324157;
  border-radius: 7px;
  color: #dff0ff;
  background: #101924;
  cursor: pointer;
  font: 950 10px Montserrat, Segoe UI, Arial, sans-serif;
  white-space: nowrap;
}

.leaderboard-action-button.party {
  border-color: rgba(0, 200, 10, 0.34);
  color: #f5fff7;
  background: #0b341b;
}

.leaderboard-action-button.profile {
  min-width: 78px;
  color: #cfe4f5;
}

.leaderboard-action-button:hover:not(:disabled) {
  border-color: #46607f;
  background: #1d2a3b;
}

.leaderboard-action-button.party:hover:not(:disabled) {
  border-color: rgba(85, 230, 92, 0.62);
  background: #0d4a20;
}

.leaderboard-action-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.leader-badges small,
.leader-badges a {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 999px;
  color: #dce7ee;
  background: rgba(127, 199, 255, 0.07);
  font-size: 10px;
  font-weight: 950;
  text-decoration: none;
}

.leader-x-badge {
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.10) !important;
}

.leader-x-badge:hover {
  border-color: rgba(127, 199, 255, 0.64) !important;
  color: #dff4ff !important;
  background: rgba(127, 199, 255, 0.18) !important;
}

.leader-rank-icon {
  display: block;
  width: 30px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.28));
}

.social-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  overflow: hidden;
}

.social-notifications-card {
  grid-column: 1 / -1;
  min-height: 0 !important;
}

.social-notifications-card[hidden] {
  display: none !important;
}

.social-grid .progress-card {
  min-height: min(520px, calc(100vh - 150px));
  overflow: hidden;
}

.social-grid .progress-card:has(.friend-list) {
  min-height: 320px;
}

.social-grid .progress-card:has(.party-panel) {
  align-content: start;
  min-height: 220px;
  max-height: 320px;
}

.friend-form {
  grid-template-columns: minmax(0, 1fr) 92px;
}

.notification-center {
  display: grid;
  gap: 8px;
  min-height: 0;
  max-height: 210px;
  overflow: hidden auto;
  padding-right: 2px;
  scrollbar-color: rgba(143, 220, 138, 0.42) transparent;
}

.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid rgba(127, 199, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.08), rgba(143, 220, 138, 0.045)),
    rgba(255, 255, 255, 0.04);
}

.notification-item > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-item > span:last-child {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.notification-item button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(127, 199, 255, 0.22);
  border-radius: 7px;
  color: #eaf7fb;
  background:
    linear-gradient(180deg, rgba(29, 50, 62, 0.96), rgba(11, 22, 30, 0.98));
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.notification-item button:first-child {
  border-color: rgba(143, 220, 138, 0.50);
  color: #f4fff2;
  background:
    linear-gradient(180deg, rgba(58, 143, 75, 0.94), rgba(28, 82, 44, 0.96));
}

.notification-item button:last-child {
  border-color: rgba(255, 116, 116, 0.34);
  color: #ffdede;
  background:
    linear-gradient(180deg, rgba(84, 35, 39, 0.92), rgba(34, 20, 24, 0.96));
}

.notification-item button:hover {
  filter: brightness(1.08);
}

.notification-item strong,
.notification-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.notification-item small,
.notification-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
}

.notification-item small {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notification-empty {
  padding: 12px;
  border: 1px dashed rgba(127, 199, 255, 0.16);
  border-radius: 8px;
  text-align: center;
}

.party-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.party-slot {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.12), rgba(143, 220, 138, 0.04)),
    rgba(11, 22, 30, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  text-align: left;
}

.party-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 0%, rgba(127, 199, 255, 0.16), transparent 42%);
  opacity: 0.65;
  pointer-events: none;
}

.party-slot.filled {
  border-color: rgba(143, 220, 138, 0.36);
  background:
    linear-gradient(135deg, rgba(143, 220, 138, 0.14), rgba(127, 199, 255, 0.07)),
    rgba(12, 27, 26, 0.88);
}

.party-slot.empty {
  color: rgba(220, 231, 238, 0.78);
  border-style: dashed;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(127, 199, 255, 0.055), rgba(143, 220, 138, 0.025)),
    rgba(8, 17, 24, 0.72);
}

.party-slot.pending {
  border-color: rgba(244, 211, 94, 0.34);
  background:
    linear-gradient(135deg, rgba(244, 211, 94, 0.12), rgba(127, 199, 255, 0.05)),
    rgba(24, 23, 13, 0.78);
}

.party-slot .brand-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  box-shadow: 0 0 18px rgba(143, 220, 138, 0.62);
}

.party-slot .pending-dot {
  background: #f4d35e;
  box-shadow: 0 0 18px rgba(244, 211, 94, 0.62);
}

.party-slot > span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.party-slot strong {
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
}

.party-slot span strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-slot small {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 850;
}

.party-kick-button {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px !important;
  padding: 0;
  border: 1px solid rgba(255, 116, 116, 0.34) !important;
  border-radius: 7px !important;
  color: #ffd7d7 !important;
  background:
    linear-gradient(180deg, rgba(92, 34, 38, 0.86), rgba(45, 20, 24, 0.92)) !important;
  font-size: 0 !important;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.party-kick-button::before,
.party-kick-button::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.party-kick-button::before {
  transform: rotate(45deg);
}

.party-kick-button::after {
  transform: rotate(-45deg);
}

.party-kick-button:hover {
  border-color: rgba(255, 142, 142, 0.62) !important;
  color: #ffffff !important;
  filter: brightness(1.08);
}

.party-invite-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.friend-row button,
.party-panel button,
.friend-form button {
  min-width: 0;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-row button {
  min-width: 92px;
}

.friend-row button.danger-action {
  border-color: rgba(255, 116, 116, 0.34);
  color: #ffdede;
  background:
    linear-gradient(180deg, rgba(84, 35, 39, 0.92), rgba(34, 20, 24, 0.96));
}

.friend-row button.danger-action:hover {
  filter: brightness(1.08);
}

.friend-row {
  position: relative;
  grid-template-columns: 72px minmax(0, 1fr) minmax(0, auto);
  gap: 14px;
  min-height: 96px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(95, 122, 146, 0.30);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(46, 206, 56, 0.10), rgba(127, 199, 255, 0.045) 38%, rgba(255, 255, 255, 0.02)),
    rgba(17, 25, 34, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.friend-row::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #45ee58, rgba(91, 134, 255, 0.72));
  box-shadow: 0 0 18px rgba(46, 206, 56, 0.34);
}

.friend-rank {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
}

.friend-rank img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.36));
}

.friend-rank small {
  max-width: 72px;
  overflow: hidden;
  color: #9fb7c8;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-info {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.friend-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.friend-status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #657782;
  box-shadow: 0 0 0 3px rgba(101, 119, 130, 0.12);
}

.friend-status-dot.online {
  background: #42f052;
  box-shadow: 0 0 0 3px rgba(66, 240, 82, 0.13), 0 0 18px rgba(66, 240, 82, 0.54);
}

.friend-row strong {
  color: #f5fbff;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
}

.friend-row small {
  color: #a9bfcc;
  font-size: 12px;
  font-weight: 850;
}

.friend-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.friend-row button {
  min-width: 104px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 18px rgba(0, 0, 0, 0.18);
}

.friend-row button:not(.danger-action) {
  border-color: rgba(68, 199, 91, 0.54);
  color: #f2fff3;
  background: linear-gradient(180deg, rgba(42, 134, 58, 0.92), rgba(20, 88, 39, 0.94));
}

.friend-row button.danger-action {
  border-color: rgba(255, 104, 116, 0.46);
  color: #ffe6e8;
  background: linear-gradient(180deg, rgba(94, 37, 44, 0.94), rgba(43, 20, 27, 0.96));
}

.friend-form {
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 148px);
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(95, 122, 146, 0.24);
  border-radius: 8px;
  background: rgba(8, 17, 24, 0.58);
}

.friend-form input {
  min-height: 52px;
  border-radius: 7px;
}

.friend-form button {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border-radius: 7px;
  border-color: rgba(68, 199, 91, 0.54);
  background: linear-gradient(180deg, rgba(42, 134, 58, 0.92), rgba(20, 88, 39, 0.94));
}

.friend-party-status {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(127, 199, 255, 0.22);
  border-radius: 7px;
  color: #bad0dc;
  background: rgba(8, 17, 24, 0.72);
  font: 900 11px Montserrat, Segoe UI, Arial, sans-serif;
  text-transform: uppercase;
}

.notification-stack {
  top: 16px;
  right: 16px;
  width: min(360px, calc(100vw - 32px));
}

.notification-toast {
  padding-inline: 15px;
}

@media (max-width: 760px) {
  .players-panel.match-panel,
  .progress-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .match-create-form.match-pane.active,
  .progress-modal-grid,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .match-create-form label,
  .match-create-form label:first-child,
  .match-create-form label:has(#matchTypeSelect),
  .match-create-form label:has(#matchPasswordInput),
  .match-create-form .match-paid-toggle,
  .match-create-form .match-bots-toggle,
  .match-create-form .match-observer-toggle,
  .match-create-form .match-organizer-toggle {
    grid-column: 1 / -1;
  }

  .progress-modal-grid .progress-card.wide {
    grid-column: 1;
    grid-row: auto;
  }

  .match-row,
  .public-arena-card {
    grid-template-columns: 1fr;
  }

  .match-row-actions {
    justify-content: stretch;
  }

  .match-row-actions button,
  .public-arena-card button {
    width: 100%;
  }

  .player-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .player-actions {
    justify-content: stretch;
  }

  .player-action-button {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  :root {
    --sidebar-width: min(320px, 42vw);
  }
}

@media (max-width: 520px) {
  .sidebar {
    width: min(320px, 82vw);
    height: 240px;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .play-area,
  .game-shell.sidebar-collapsed .play-area {
    left: 0;
  }
}

/* Main V3 */
:root {
  --sidebar-width: 226px;
  --v3-right-gutter: 14px;
  --v3-ink: #dce7ee;
  --v3-muted: #7f9098;
  --v3-panel: rgba(17, 25, 34, 0.96);
  --v3-panel-soft: rgba(25, 35, 45, 0.86);
  --v3-line: rgba(104, 126, 142, 0.26);
  --v3-green: #2ece38;
  --v3-blue: #5b86ff;
  --v3-gold: #d6a343;
}

.game-shell {
  background:
    radial-gradient(circle at 57% 45%, rgba(87, 120, 137, 0.16), transparent 24%),
    linear-gradient(180deg, #0a1119, #060a10 72%);
}

.sidebar {
  gap: 9px;
  width: var(--sidebar-width);
  padding: 10px;
  border-right-color: rgba(76, 96, 112, 0.34);
  background:
    linear-gradient(180deg, rgba(28, 38, 50, 0.98), rgba(9, 14, 22, 0.99)),
    #111924;
  box-shadow: 9px 0 24px rgba(0, 0, 0, 0.38);
}

.brand-panel,
.progress-panel,
.hud,
.side-quests,
.chat-panel {
  border-color: var(--v3-line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--v3-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.brand-panel {
  min-height: 42px;
  padding: 9px 10px;
}

.brand-panel strong {
  font-size: 18px;
}

.brand-kicker,
.progress-head span,
.progress-card-head span {
  letter-spacing: 0;
  color: #95a8b4;
}

.progress-panel {
  padding: 8px 9px;
}

.progress-head strong {
  color: var(--v3-green);
  font-size: 20px;
}

.progress-bar,
.progress-bar.large {
  height: 6px;
  border-radius: 0;
  background: rgba(4, 8, 13, 0.82);
}

.progress-bar i {
  border-radius: 0;
  background: linear-gradient(90deg, var(--v3-blue), var(--v3-green), var(--v3-gold));
  box-shadow: none;
}

.side-quests {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 9px;
}

.side-quests .progress-card-head {
  min-height: 18px;
}

.side-quests .quest-list {
  gap: 7px;
  overflow: hidden auto;
  max-height: 190px;
}

.quest-item {
  position: relative;
  gap: 5px;
  padding: 8px 9px;
  border-color: rgba(89, 108, 124, 0.22);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(91, 134, 255, 0.08), transparent 55%),
    rgba(10, 17, 25, 0.72);
}

.quest-item.complete {
  border-color: rgba(46, 206, 56, 0.30);
  background:
    linear-gradient(90deg, rgba(46, 206, 56, 0.10), transparent 58%),
    rgba(10, 17, 25, 0.72);
}

.quest-item strong {
  padding-right: 54px;
  color: var(--v3-ink);
  font-size: 11px;
}

.quest-item small {
  color: var(--v3-muted);
  font-size: 10px;
}

.quest-status {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--v3-green);
  font: 900 10px Montserrat, Segoe UI, Arial, sans-serif;
  font-style: normal;
  text-transform: uppercase;
}

.play-area {
  left: calc(var(--sidebar-width) + var(--v3-right-gutter));
  right: var(--v3-right-gutter);
  top: 14px;
  bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(91, 110, 128, 0.34);
  border-radius: 7px;
  background: #111923;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.38),
    0 22px 54px rgba(0, 0, 0, 0.42);
}

.game-shell.sidebar-collapsed .play-area {
  left: 60px;
}

.arena-topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(91, 110, 128, 0.28);
  color: #e8f0f4;
  background: rgba(18, 28, 39, 0.94);
  pointer-events: none;
}

.arena-title {
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
  letter-spacing: 0;
}

.arena-mode-dots {
  display: flex;
  gap: 6px;
}

.arena-mode-dots i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #6d7884;
}

.arena-mode-dots i:nth-child(2) {
  background: var(--v3-blue);
}

.arena-mode-dots i:nth-child(3) {
  background: #dc3549;
}

.arena-mode-dots i:nth-child(4) {
  background: var(--v3-green);
}

#game {
  background:
    radial-gradient(circle at 50% 50%, rgba(129, 153, 154, 0.20), transparent 22%),
    linear-gradient(180deg, #1a2530, #101820);
}

.arena-bottom-hud {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.hud {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 8px;
}

.hud-row {
  min-height: 19px;
  padding: 0 2px;
  font-size: 11px;
}

.voice-button,
.matches-cta,
.chat-form button {
  border-radius: 3px;
}

.matches-cta {
  min-height: 38px;
  margin-top: auto;
  border-color: rgba(64, 255, 80, 0.34);
  background:
    linear-gradient(180deg, rgba(47, 218, 58, 0.95), rgba(9, 132, 20, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 24px rgba(0, 0, 0, 0.32);
}

.chat-panel {
  min-height: 120px;
}

.chat-messages {
  font-size: 11px;
}

@media (max-width: 860px) {
  :root {
    --sidebar-width: min(250px, 72vw);
    --v3-right-gutter: 0px;
  }

  .play-area,
  .game-shell.sidebar-collapsed .play-area {
    inset: 0;
    border-radius: 0;
  }

  .sidebar {
    z-index: 8;
    width: var(--sidebar-width);
    height: 100vh;
    overflow: hidden auto;
  }
}

/* PixelTanks Main V3 exact template pass */
:root {
  --sidebar-width: 380px;
  --v3-header-height: 56px;
  --v3-bg: #1d222c;
  --v3-top: #101925;
  --v3-card: #20252f;
  --v3-card-2: #1b2029;
  --v3-border: #303946;
  --v3-text: #ffffff;
  --v3-dim: #777d88;
  --v3-green: #00c80a;
  --v3-blue-text: #9bb7d4;
  --v3-figma-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  --v3-text-muted-figma: #a4a9b3;
  --v3-xp-muted-figma: #636974;
  --v3-clean-muted: #9fb4c9;
}

body {
  background: var(--v3-bg);
}

.game-shell {
  background: var(--v3-bg);
}

.v3-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 330px 1fr auto;
  align-items: center;
  height: var(--v3-header-height);
  padding: 0 max(85px, calc((100vw - var(--sidebar-width) - 1420px) / 2)) 0 30px;
  background: #111b27;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

.v3-logo-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: 238px;
  height: 32px;
  text-decoration: none;
}

.v3-logo {
  width: 238px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.v3-socials,
.v3-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v3-socials {
  justify-self: start;
  margin-left: 20px;
}

.v3-actions {
  justify-self: end;
}

.v3-header button,
.v3-socials span,
.v3-socials a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 34px;
  border: 1px solid rgba(255, 255, 255, 0.015);
  border-radius: 5px;
  color: #89aed2;
  background: #202635;
  font: 950 16px Montserrat, Segoe UI, Arial, sans-serif;
  text-shadow: var(--v3-figma-shadow);
  text-decoration: none;
}

.v3-socials span,
.v3-socials a,
.v3-header button:not(.v3-support):not(.v3-user) {
  width: 34px;
  padding: 0;
}

.v3-header button svg {
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
}

.v3-action-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 25px;
  height: 25px;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.28));
  transform: translate(-50%, -50%);
}

.v3-action-crown {
  width: 27px;
  height: 27px;
  transform: translate(-50%, -51%);
}

.v3-action-film {
  width: 25px;
  height: 25px;
}

.v3-action-gear {
  width: 25px;
  height: 25px;
}

.v3-actions > button:not(.v3-support):not(.v3-bell):not(.v3-user):hover {
  color: #b8d6f2;
  border-color: rgba(120, 168, 209, 0.24);
  background: #252d3e;
}

.v3-socials span {
  pointer-events: none;
  user-select: none;
}

.v3-socials img {
  position: absolute;
  left: 50%;
  top: 50%;
  object-fit: contain;
  display: block;
  transform: translate(-50%, -50%);
}

.v3-socials span:nth-child(1) img,
.v3-socials a:nth-child(1) img {
  width: 16px;
  height: 16px;
}

.v3-socials span:nth-child(2) img,
.v3-socials a:nth-child(2) img {
  width: 18px;
  height: 18px;
}

.v3-socials span:nth-child(3) img,
.v3-socials a:nth-child(3) img {
  width: 16px;
  height: 16px;
}

.v3-socials span:nth-child(4) img,
.v3-socials a:nth-child(4) img {
  width: 19px;
  height: 19px;
}

.v3-support {
  gap: 8px;
  width: 148px;
  color: #fff !important;
  background: linear-gradient(180deg, #117d16, #075d0b) !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  text-shadow: var(--v3-figma-shadow);
}

.v3-support img {
  width: 36px;
  height: 25px;
  object-fit: contain;
}

.v3-bell {
  position: relative;
}

.v3-bell strong {
  position: absolute;
  top: -5px;
  right: -9px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: #e22626;
  font-size: 11px;
  font-weight: 800;
  text-shadow: var(--v3-figma-shadow);
}

.v3-user {
  gap: 8px;
  width: 144px;
  justify-content: flex-start !important;
  padding: 0 12px !important;
  color: #fff !important;
  background: #111b27 !important;
  border-color: #202d3b !important;
  text-shadow: var(--v3-figma-shadow);
}

.v3-user:focus,
.v3-user:focus-visible {
  outline: none;
  border-color: #202d3b !important;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.v3-user.open b {
  transform: rotate(180deg);
}

.v3-user img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.v3-user .v3-user-arrow {
  width: 21px;
  height: 14px;
  margin-left: auto;
  border-radius: 0;
  transition: transform 0.16s ease;
}

.v3-user.open .v3-user-arrow {
  transform: rotate(180deg);
}

.v3-user-menu {
  position: fixed;
  top: var(--v3-user-menu-top, 58px);
  left: var(--v3-user-menu-left, auto);
  right: auto;
  z-index: 45;
  width: var(--v3-user-menu-width, 144px);
  overflow: hidden;
  border: 1px solid #213348;
  border-radius: 8px;
  background: #07111c;
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.v3-user-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-top: 1px solid #17283a;
  color: #97b4d0;
  background: #06101a;
  font: 850 16px Montserrat, Segoe UI, Arial, sans-serif;
  text-align: left;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.v3-user-menu button:first-child {
  border-top: 0;
}

.v3-user-menu button:focus,
.v3-user-menu button:focus-visible {
  outline: none;
  color: #d7eaff;
  background: #0a1825;
}

.v3-user-menu button:hover {
  color: #d7eaff;
  background: #0a1825;
}

.v3-user-menu button svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  fill: currentColor;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.25));
}

.v3-user-menu button:last-child {
  color: #ff8282;
}

.sidebar {
  top: var(--v3-header-height);
  width: var(--sidebar-width);
  height: calc(100vh - var(--v3-header-height));
  gap: 16px;
  padding: 18px 20px 18px 24px;
  border-right: 0;
  background: #171c25;
  box-shadow: none;
}

.brand-panel,
.hud,
.notifications-button,
#voiceButton,
#micButton,
.sidebar-menu-wrap,
#profileButton,
#progressButton,
#socialButton,
#settingsButton,
#playersButton,
.chat-panel {
  display: none !important;
}

.v3-template .game-shell.sidebar-chat-open .sidebar > *:not(.chat-panel):not(.sidebar-toggle) {
  display: none !important;
}

.v3-template .game-shell.sidebar-chat-open .sidebar .chat-panel {
  display: grid !important;
  flex: 1 1 auto;
  min-height: 0;
}

.v3-template .game-shell.sidebar-chat-open .sidebar .chat-close-button {
  display: grid;
  place-items: center;
}

.sidebar-toggle {
  position: fixed;
  top: calc(var(--v3-header-height) + ((100vh - var(--v3-header-height)) / 2));
  left: calc(var(--sidebar-width) - 14px);
  right: auto;
  z-index: 60;
  display: grid;
  width: 28px;
  height: 68px;
  border-color: #303946;
  border-radius: 8px;
  outline: none;
  background: #202635;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-50%);
}

.sidebar-toggle:focus-visible {
  border-color: rgba(127, 199, 255, 0.36);
  outline: none;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(127, 199, 255, 0.12);
}

.sidebar-toggle:focus,
.sidebar-toggle:active {
  outline: none !important;
}

.sidebar-toggle::before,
.sidebar-toggle::after {
  display: block;
}

.progress-panel.v3-profile-card,
.progress-panel.v3-guest-card,
.side-quests,
.v3-stats-card {
  border: 0;
  border-radius: 8px;
  background: #1b2029;
  box-shadow: none;
}

.progress-panel.v3-guest-card {
  display: grid;
  gap: 18px;
  min-height: 360px;
  padding: 24px 25px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 12%, rgba(0, 200, 10, 0.14), transparent 34%),
    linear-gradient(180deg, #1c2330 0%, #171d26 100%);
  border: 1px solid rgba(127, 199, 255, 0.08);
}

.v3-guest-card > div:not(.v3-guest-actions) {
  display: grid;
  gap: 8px;
}

.v3-guest-kicker {
  color: #8a98aa;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: var(--v3-figma-shadow);
}

.v3-guest-card strong {
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-guest-card p {
  margin: 0;
  color: #b6c7d4;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  text-shadow: var(--v3-figma-shadow);
}

.v3-guest-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  list-style: none;
}

.v3-guest-card li {
  position: relative;
  min-height: 22px;
  padding-left: 22px;
  color: #c9d8e2;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: var(--v3-figma-shadow);
}

.v3-guest-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #20e72c;
  box-shadow: 0 0 12px rgba(0, 200, 10, 0.34);
}

.v3-guest-actions {
  display: grid;
  gap: 10px;
  align-self: end;
}

.v3-guest-actions button {
  width: 100%;
  min-height: 50px;
  border-radius: 7px;
  color: #fff;
  font: 950 16px Montserrat, Segoe UI, Arial, sans-serif;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.v3-guest-actions button:first-child {
  border: 1px solid rgba(82, 255, 91, 0.34);
  background:
    radial-gradient(circle at 50% 0%, rgba(112, 255, 116, 0.26), transparent 48%),
    linear-gradient(180deg, #05b80e 0%, #008607 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 12px 26px rgba(0, 0, 0, 0.2);
}

.v3-guest-actions button:last-child {
  border: 1px solid rgba(127, 199, 255, 0.14);
  color: #b7c7d4;
  background: #111923;
}

.v3-guest-actions button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.progress-panel.v3-profile-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 20px;
  row-gap: 18px;
  min-height: 248px;
  padding: 20px 25px;
}

.v3-avatar-wrap {
  grid-row: 1;
  position: relative;
  width: 78px;
  height: 88px;
}

.v3-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -3px -3px 7px;
  z-index: 0;
  background: #3a414c;
  clip-path: polygon(50% 0, 94% 24%, 94% 72%, 50% 100%, 6% 72%, 6% 24%);
  filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.38));
}

.v3-avatar {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 88px;
  padding: 3px;
  background: #111720;
  clip-path: polygon(50% 0, 94% 24%, 94% 72%, 50% 100%, 6% 72%, 6% 24%);
  object-fit: cover;
}

.v3-avatar-level {
  position: absolute;
  left: 50%;
  bottom: -2px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  color: #fff;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
  transform: translateX(-50%);
  isolation: isolate;
}

.v3-avatar-level::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #3a414c;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  filter: drop-shadow(0 6px 7px rgba(0, 0, 0, 0.38));
}

.v3-avatar-level::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  background: #111720;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.v3-profile-main {
  display: grid;
  align-content: center;
  min-width: 0;
}

.v3-name {
  color: #fff;
  font-size: 23px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-name i {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--v3-green);
  box-shadow: 0 0 0 rgba(0, 200, 10, 0.34);
  animation: v3-online-dot-pulse 1.65s ease-out infinite;
}

.v3-name i::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: rgba(0, 200, 10, 0.16);
  animation: v3-online-dot-ring 1.65s ease-out infinite;
  pointer-events: none;
}

.v3-online {
  margin-top: 5px;
  color: #00a808;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

@keyframes v3-online-dot-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(0, 200, 10, 0.34);
  }

  45% {
    transform: scale(1.12);
    box-shadow: 0 0 10px rgba(0, 200, 10, 0.42);
  }
}

/* Play game shell, aligned with the settings/profile pages. */
.players-panel.match-panel {
  width: min(1280px, calc(100vw - 72px));
  max-height: min(860px, calc(100vh - 72px));
  border-radius: 12px;
  background: #121922;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.52);
}

.match-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px;
  background: #121922;
}

.match-tabs button {
  min-height: 44px;
  border-radius: 8px;
  background: #202938;
}

#matchFindPane.match-pane.active {
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
}

.match-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px 8px;
}

.match-mode-browser,
.match-create-mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
}

.match-mode-browser {
  padding: 0 16px 12px;
}

.match-create-mode-cards {
  grid-column: 1 / -1;
}

.match-mode-card {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 9px;
  color: #dcebf4;
  background: #1b2432;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.match-mode-card:hover {
  border-color: rgba(127, 199, 255, 0.36);
  background: #202b3a;
}

.match-mode-card.active {
  border-color: rgba(0, 205, 36, 0.78);
  background: #172d25;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 0 0 1px rgba(0, 205, 36, 0.24);
}

.match-mode-card:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.match-mode-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #0b141c;
}

.match-mode-card-body {
  display: grid;
  gap: 2px;
  padding: 8px 2px 0;
  text-align: left;
}

.match-mode-card-body strong {
  overflow: hidden;
  color: #f3fbff;
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-mode-card-body small {
  overflow: hidden;
  color: #9fb1bf;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-create-form label:has(#matchModeSelect) {
  display: none;
}

.match-lobby-pane.match-pane.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.match-lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 10px;
  background: #182231;
}

.match-lobby-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.match-lobby-head strong {
  color: #f3fbff;
  font-size: 15px;
  font-weight: 950;
}

.match-lobby-head span {
  color: #9fb1bf;
  font-size: 11px;
  font-weight: 850;
}

.match-lobby-head button,
.match-actions button {
  min-width: 126px;
  min-height: 38px;
  border: 1px solid rgba(127, 199, 255, 0.22);
  border-radius: 8px;
  color: #dcebf4;
  background: #202938;
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
}

.match-row {
  grid-template-columns: 156px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 92px;
  align-items: center;
  padding: 10px 12px;
}

.match-row-visual {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.match-row-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 7px;
  background: #0b141c;
}

.match-row-visual span {
  overflow: hidden;
  color: #9fb1bf;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-lobby-list {
  padding-top: 12px;
}

/* Final Play Game layout. Keep it visually aligned with Settings/Profile pages. */
.players-panel.match-panel {
  width: min(1320px, calc(100vw - 96px));
  max-height: min(820px, calc(100vh - 88px));
  border-radius: 10px;
  background: #121922;
}

.players-panel.match-panel .players-head {
  min-height: 64px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.12);
}

.match-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 24px 10px;
  background: #121922;
}

.match-tabs button,
.match-filter-tabs button {
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  color: #9fb1bf;
  background: #202938;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.match-tabs button.active,
.match-filter-tabs button.active {
  color: #ffffff;
  border-color: rgba(0, 205, 36, 0.58);
  background: linear-gradient(180deg, #009b08 0%, #008606 100%);
  box-shadow: 0 0 0 1px rgba(0, 205, 36, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#matchFindPane.match-pane.active {
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  padding: 0 24px 24px;
  overflow: hidden;
}

.match-browser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(127, 199, 255, 0.14);
  border-radius: 8px;
  background: #182231;
}

.match-browser-head div,
.match-lobby-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.match-browser-head strong,
.match-lobby-head strong {
  color: #f3fbff;
  font-size: 16px;
  font-weight: 950;
}

.match-browser-head span,
.match-lobby-head span {
  color: #9fb1bf;
  font-size: 11px;
  font-weight: 850;
}

.match-browser-head button,
.match-lobby-head button {
  min-width: 116px;
  min-height: 36px;
  border: 1px solid rgba(127, 199, 255, 0.20);
  border-radius: 8px;
  color: #dcebf4;
  background: #202938;
  font: 900 12px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
}

.match-find-subtabs {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  padding: 10px 0;
}

.match-list-pane {
  display: none;
  min-height: 0;
  overflow: hidden;
}

.match-list-pane.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

#matchQueuePane.active {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.match-lobby-head {
  margin: 0 0 10px;
  padding: 13px 16px;
  border-radius: 8px;
  background: #182231;
}

.match-lobby-list,
.matches-list {
  min-height: 0;
  padding: 0 4px 2px 0;
  overflow-y: auto;
}

.match-lobby-list {
  display: grid;
  gap: 8px;
}

.matches-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.public-arena-slot {
  padding: 0 0 8px;
}

.public-arena-card {
  min-height: 72px;
  margin: 0;
  border-radius: 8px;
  background: #182231;
}

.match-row {
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 78px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  background: #182231;
}

.match-row:hover {
  border-color: rgba(127, 199, 255, 0.28);
  background: #1c2635;
}

.match-row.paid {
  border-color: rgba(0, 136, 255, 0.24);
  background: #152537;
}

.match-row.selected {
  border-color: rgba(0, 205, 36, 0.72);
  background: #152d25;
}

.match-row-visual {
  display: grid;
  gap: 4px;
  width: 84px;
  min-width: 0;
}

.match-row-visual img {
  width: 84px;
  height: 48px;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 6px;
}

.match-row-visual span {
  color: #9fb1bf;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0;
}

.match-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.match-meta strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-meta span {
  overflow: hidden;
  color: #9fb1bf;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.match-row-actions button,
.public-arena-card button {
  min-width: 92px;
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
}

.match-row-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.match-empty {
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  background: rgba(11, 18, 25, 0.44);
}

.match-create-form.match-pane.active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  min-height: 0;
  padding: 0 24px 24px;
  overflow-y: auto;
}

.match-create-form label {
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(127, 199, 255, 0.14);
  border-radius: 8px;
  background: #182231;
}

.match-create-form label:first-child {
  grid-column: 1 / -1;
}

.match-create-form input,
.match-create-form select {
  min-height: 42px;
  border-color: rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  background: #08121b;
}

.match-create-form .match-paid-toggle,
.match-create-form .match-bots-toggle,
.match-create-form .match-observer-toggle,
.match-create-form .match-organizer-toggle {
  min-height: 58px;
  border-radius: 8px;
  background: #182231;
}

.match-create-mode-cards {
  grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
  gap: 10px;
}

.match-mode-card {
  min-height: 118px;
  padding: 8px;
  border-radius: 8px;
  background: #1b2432;
}

.match-mode-card img {
  height: 72px;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 6px;
}

.match-mode-card-body {
  padding-top: 7px;
}

.match-create-form button[type="submit"] {
  grid-column: 1 / -1;
  min-height: 50px;
  border-radius: 8px;
  border-color: rgba(0, 205, 36, 0.52);
  background: linear-gradient(180deg, #009b08 0%, #008606 100%);
  font-size: 15px;
}

@media (max-width: 980px) {
  .players-panel.match-panel {
    width: calc(100vw - 28px);
  }

  .match-row {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .match-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .match-row-actions button {
    flex: 1 1 0;
  }
}

@media (max-width: 980px) {
  .players-panel.match-panel {
    width: calc(100vw - 28px);
  }

  .match-row {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .match-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
}

@media (max-width: 760px) {
  .match-tabs {
    grid-template-columns: 1fr;
  }

  .match-lobby-head,
  .match-row {
    grid-template-columns: 1fr;
  }

  .match-lobby-head {
    align-items: stretch;
  }

  .match-row {
    display: grid;
  }

  .match-row-visual {
    width: 100%;
  }
}

@keyframes v3-online-dot-ring {
  0% {
    opacity: 0.46;
    transform: scale(0.55);
  }

  75%, 100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.v3-level-line {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-level-line small {
  color: var(--v3-xp-muted-figma);
  font-size: 14px;
  font-weight: 700;
  text-shadow: var(--v3-figma-shadow);
}

.v3-profile-main .progress-bar {
  width: 200px;
  height: 10px;
  margin-top: 6px;
  border-radius: 99px;
  background: linear-gradient(180deg, #3b414c 0%, #303641 48%, #262b34 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.v3-profile-main .progress-bar i {
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 42%, rgba(103, 255, 110, 0.74), transparent 50%),
    linear-gradient(180deg, #24f132 0%, #04c910 48%, #009107 100%);
  box-shadow: 0 0 7px rgba(0, 200, 10, 0.18);
}

.v3-rank-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.v3-rank-row img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  transform: translateY(-5px);
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.34));
}

.v3-rank-row div {
  display: grid;
  gap: 4px;
}

.v3-rank-row span {
  color: var(--v3-text-muted-figma);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-rank-row div > strong {
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-rank-row small {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--v3-xp-muted-figma);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-rank-row small strong {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(132, 164, 194, 0.18);
  border-radius: 5px;
  color: #cfe3f5;
  background: rgba(12, 21, 32, 0.45);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  text-shadow: var(--v3-figma-shadow);
}

.v3-rank-row small span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7c8490;
  font-size: 14px;
  font-weight: 650;
}

.side-quests {
  min-height: 309px;
  padding: 28px 24px 22px 25px;
}

.side-quests .progress-card-head {
  align-items: center;
  min-height: 25px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.side-quests .progress-card-head span {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.side-quests .progress-card-head small {
  color: var(--v3-xp-muted-figma);
  font-size: 14px;
  font-weight: 700;
  text-shadow: var(--v3-figma-shadow);
}

.side-quests .quest-list {
  gap: 0;
  max-height: none;
  overflow: hidden;
  padding-top: 21px;
  padding-right: 0;
}

.side-quests .quest-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 34px 64px;
  grid-template-rows: 18px 16px;
  align-items: center;
  column-gap: 9px;
  row-gap: 7px;
  min-height: 70px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.side-quests .quest-item.complete {
  background: transparent;
}

.side-quests .quest-icon {
  grid-row: 1 / 3;
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.side-quests .quest-item strong {
  grid-column: 2;
  padding: 0;
  color: var(--v3-text-muted-figma);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-quests .quest-item .progress-bar {
  grid-column: 2;
  grid-row: 2;
  width: 120px;
  max-width: 100%;
  min-width: 0;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(180deg, #3b414c 0%, #2d333d 48%, #242a33 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.side-quests .quest-item .progress-bar i {
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 35%, rgba(104, 255, 110, 0.72), transparent 48%),
    linear-gradient(180deg, #21ed2d 0%, #05c710 48%, #009908 100%);
  box-shadow: 0 0 6px rgba(0, 200, 10, 0.16);
}

.side-quests .quest-item small {
  grid-column: 3;
  grid-row: 2;
  color: var(--v3-xp-muted-figma);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  justify-self: end;
  white-space: nowrap;
  text-shadow: var(--v3-figma-shadow);
}

.side-quests .quest-status {
  position: static;
  grid-column: 4;
  grid-row: 2;
  min-width: 64px;
  color: var(--v3-xp-muted-figma);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  align-self: center;
  text-align: right;
  justify-self: end;
  white-space: nowrap;
  text-shadow: var(--v3-figma-shadow);
}

.side-quests .quest-item.complete strong,
.side-quests .quest-item.complete small,
.side-quests .quest-item.complete .quest-status {
  color: var(--v3-green);
  text-shadow: var(--v3-figma-shadow);
}

.v3-stats-card {
  min-height: 145px;
  padding: 16px 25px 15px;
}

.v3-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.v3-tabs button {
  height: 30px;
  border: 0;
  border-radius: 5px;
  color: #8a909b;
  background: #313742;
  font: 950 13px Montserrat, Segoe UI, Arial, sans-serif;
  text-shadow: var(--v3-figma-shadow);
}

.v3-tabs button.active {
  color: #fff;
}

.v3-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.v3-stats-grid span {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #d9dde4;
}

.v3-stats-grid img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.v3-stats-grid small {
  color: var(--v3-xp-muted-figma);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-stats-grid strong {
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-status-pills {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 10px;
}

.v3-status-pills span {
  height: 17px;
  padding: 0 8px;
  border-radius: 99px;
  color: #0ad413;
  background: #123927;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-shadow: var(--v3-figma-shadow);
}

.v3-status-pills span:nth-child(2) {
  color: #10a9f3;
  background: #123044;
}

.v3-status-pills span:nth-child(3) {
  color: #fff129;
  background: #363a18;
}

.chat-shortcut-hint {
  display: none;
}

.v3-template .chat-shortcut-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(127, 199, 255, 0.10);
  border-radius: 7px;
  background: #1b2029;
  color: #c6d3df;
  font: 850 12px Montserrat, Segoe UI, Arial, sans-serif;
  text-align: left;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.v3-template .chat-shortcut-hint:hover {
  border-color: rgba(127, 199, 255, 0.26);
  background: #202735;
}

.v3-template .chat-shortcut-hint kbd {
  min-width: 58px;
  padding: 5px 8px;
  border: 1px solid rgba(82, 255, 91, 0.22);
  border-radius: 5px;
  background: rgba(0, 200, 10, 0.10);
  color: #cfffca;
  font: 950 11px Montserrat, Segoe UI, Arial, sans-serif;
  text-align: center;
}

.matches-cta {
  min-height: 72px;
  margin-top: 4px;
  padding: 14px 18px 16px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(180deg, #078907, #008400);
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.play-area {
  left: calc(var(--sidebar-width) + ((100vw - var(--sidebar-width)) / 2));
  top: 104px;
  right: auto;
  bottom: auto;
  width: min(calc(100vw - var(--sidebar-width) - 170px), 1420px);
  aspect-ratio: 2200 / 1221;
  height: auto;
  transform: translateX(-50%);
  border: 0;
  border-radius: 51px;
  overflow: visible;
  background: #0d1a22;
  box-shadow: none;
}

.play-area::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  box-sizing: border-box;
  border: 6px solid #3e4656;
  border-radius: 51px;
  pointer-events: none;
}

.play-area.match-result-open::after {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 10;
  border-radius: 45px;
  background: rgba(3, 7, 11, 0.58);
  backdrop-filter: blur(1.5px);
  pointer-events: none;
}

.game-shell.sidebar-collapsed .play-area {
  left: calc(var(--sidebar-width) + ((100vw - var(--sidebar-width)) / 2));
}

.arena-topbar {
  inset: -42px 0 auto 0;
  display: grid;
  grid-template-columns: auto auto auto auto minmax(0, 1fr) auto;
  justify-content: start;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}

.arena-title,
.arena-count,
.v3-perf span {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  height: 32px;
  padding: 0 12px;
  border: 2px solid #263140;
  border-radius: 8px;
  color: var(--v3-blue-text);
  background:
    linear-gradient(180deg, #202635, #151b24);
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
  line-height: 12px;
  letter-spacing: 0;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-shadow: var(--v3-figma-shadow);
}

.arena-title {
  min-width: 108px;
  width: auto;
  justify-content: center;
  text-align: center;
  color: #d7e9f8;
}

.arena-count {
  min-width: 48px;
  width: auto;
  text-align: center;
  color: #b8d7f2;
}

.arena-mode-dots {
  display: none;
}

.mode-status {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}

.spectator-panel.in-topbar {
  grid-column: 4;
  position: static;
  align-self: center;
  width: auto;
  max-width: min(330px, 28vw);
  max-height: none;
  margin: 0;
  pointer-events: auto;
}

.spectator-panel.in-topbar.collapsed {
  top: auto;
  left: auto;
  width: min(430px, 36vw);
  min-height: 32px;
  opacity: 1;
}

.spectator-panel.in-topbar:not(.collapsed) {
  grid-column: 1 / -1;
  justify-self: start;
  position: absolute;
  top: 46px;
  left: 0;
  width: min(360px, calc(100vw - 220px));
  max-height: min(456px, calc(100vh - 110px));
}

.mode-status:empty {
  display: none;
}

.mode-status-score,
.mode-status-chip {
  box-sizing: border-box;
  display: grid;
  align-items: center;
  min-width: 0;
  height: 32px;
  border: 2px solid #263140;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(33, 42, 57, 0.98), rgba(17, 24, 35, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 6px 16px rgba(0, 0, 0, 0.18);
}

.mode-status-score {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  min-width: 0;
  width: max-content;
  padding: 0 10px;
}

.mode-status-score span,
.mode-status-chip span {
  color: #7e8da0;
  font-size: 10px;
  font-weight: 950;
  line-height: 10px;
  text-transform: uppercase;
  text-shadow: var(--v3-figma-shadow);
}

.mode-status-label {
  display: inline-flex;
  align-items: center;
  height: 14px;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}

.mode-status-score strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  height: 22px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  line-height: 22px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.mode-status-score b,
.mode-status-score i,
.mode-status-score em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  font-style: normal;
  line-height: 22px;
}

.mode-status-score b {
  min-width: 10px;
}

.mode-status-score i {
  color: #dcecff;
  font-size: 16px;
  transform: translateY(-1px);
}

.mode-status-score .blue {
  color: #8fd0ff;
  text-shadow: 0 0 13px rgba(127, 199, 255, 0.22);
}

.mode-status-score .red {
  color: #ff9a9a;
  text-shadow: 0 0 13px rgba(255, 122, 137, 0.20);
}

.mode-status-score em {
  align-self: center;
  justify-self: end;
  min-width: 0;
  padding-left: 6px;
  border-left: 1px solid rgba(137, 156, 181, 0.22);
  color: #7e8da0;
  font-size: 10px;
  font-weight: 950;
}

.mode-status-score.leading-blue {
  border-color: rgba(127, 199, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 0 16px rgba(127, 199, 255, 0.11);
}

.mode-status-score.leading-red {
  border-color: rgba(255, 122, 137, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 0 16px rgba(255, 122, 137, 0.12);
}

.mode-status-chip {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px;
  min-width: 92px;
  padding: 0 12px;
}

.mode-status-chip strong {
  color: #dfeaf2;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.mode-status-chip.blue {
  border-color: rgba(127, 199, 255, 0.30);
}

.mode-status-chip.red {
  border-color: rgba(255, 122, 137, 0.30);
}

.mode-status-chip.yellow {
  border-color: rgba(255, 215, 102, 0.38);
}

.mode-status-chip.yellow strong {
  color: #ffe279;
}

.mode-status-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 88px;
  height: 32px;
  padding: 0 12px;
  border: 2px solid rgba(68, 255, 110, 0.42);
  border-radius: 8px;
  color: #f5fff4;
  background: linear-gradient(180deg, #17a934, #087d19);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 160, 26, 0.16);
  font: 950 11px Montserrat, Segoe UI, Arial, sans-serif;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: auto;
  white-space: nowrap;
  transition: transform 0.14s ease, filter 0.14s ease, border-color 0.14s ease;
}

.mode-status-action::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
}

.mode-status-action:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
  border-color: rgba(105, 255, 132, 0.62);
}

.mode-status-action:disabled {
  cursor: not-allowed;
  color: rgba(229, 241, 233, 0.56);
  border-color: rgba(127, 199, 255, 0.16);
  background: linear-gradient(180deg, rgba(33, 47, 58, 0.96), rgba(18, 28, 38, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.v3-perf {
  grid-column: 6;
  justify-self: end;
  position: static;
  display: flex;
  gap: 6px;
}

.v3-perf span {
  min-width: 65px;
  padding: 0 12px;
  text-align: center;
}

#game {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 51px;
  background:
    radial-gradient(circle at 50% 62%, rgba(72, 108, 112, 0.22), transparent 17%),
    linear-gradient(rgba(50, 63, 76, 0.21) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50, 63, 76, 0.21) 1px, transparent 1px),
    #0d1a22;
  background-size: auto, 43px 43px, 43px 43px, auto;
  filter: none;
}

.matches-cta:disabled,
.matches-cta.locked {
  opacity: 1;
  color: #fff;
  background: linear-gradient(180deg, #078907, #008400);
  filter: none;
}

.arena-bottom-hud {
  left: 0;
  right: 0;
  bottom: -88px;
  display: grid;
  grid-template-columns: 324px 1fr 300px;
  align-items: end;
  justify-content: stretch;
}

.v3-hud-status {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}

.v3-health {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: 34px 16px;
  align-items: center;
  column-gap: 5px;
  width: 268px;
  height: 73px;
  padding: 10px 12px 9px;
  border: 2px solid #263140;
  border-radius: 10px;
  background:
    radial-gradient(circle at 22% 24%, rgba(76, 255, 82, 0.12), transparent 28%),
    linear-gradient(180deg, #202936, #151c27);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -10px 22px rgba(0, 0, 0, 0.18);
}

.v3-health img {
  grid-column: 1;
  grid-row: 1;
  width: 40px;
  height: 30px;
  filter: drop-shadow(0 0 8px rgba(76, 255, 82, 0.22));
}

.v3-health strong {
  grid-column: 2 / 5;
  grid-row: 1;
  transform: translateY(-2px);
  color: #4cff52;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-health small {
  display: none;
  grid-column: 3 / 5;
  grid-row: 1;
  margin-left: -5px;
  color: var(--v3-text-muted-figma);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-mic-indicator {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid #344251;
  border-radius: 8px;
  background: #151b24;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 rgba(76, 255, 82, 0);
  opacity: 0.45;
  transition: opacity 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.v3-mic-indicator::before {
  content: "";
  width: 10px;
  height: 16px;
  border: 2px solid #8194a4;
  border-radius: 7px;
  background: transparent;
}

.v3-mic-indicator::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 16px;
  height: 10px;
  border-right: 2px solid #8194a4;
  border-bottom: 2px solid #8194a4;
  border-left: 2px solid #8194a4;
  border-radius: 0 0 8px 8px;
  transform: translateX(-50%);
}

.v3-mic-indicator.active {
  opacity: 1;
  border-color: rgba(76, 255, 82, 0.62);
  background:
    radial-gradient(circle at 50% 18%, rgba(76, 255, 82, 0.22), transparent 62%),
    #15241c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 14px rgba(76, 255, 82, 0.22);
}

.v3-mic-indicator.active::before,
.v3-mic-indicator.active::after {
  border-color: #4cff52;
}

.v3-mic-indicator.ready {
  opacity: 0.62;
  border-color: rgba(129, 148, 164, 0.46);
  background: #151b24;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.v3-mic-indicator.ready::before,
.v3-mic-indicator.ready::after {
  border-color: #9aabba;
}

.v3-mic-indicator.muted {
  opacity: 1;
  border-color: rgba(255, 76, 76, 0.72);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 76, 76, 0.20), transparent 62%),
    #251719;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 14px rgba(255, 76, 76, 0.18);
}

.v3-mic-indicator.muted::before {
  border-color: #ff6969;
}

.v3-mic-indicator.muted::after {
  left: 50%;
  top: 50%;
  bottom: auto;
  width: 28px;
  height: 3px;
  border: 0;
  border-radius: 999px;
  background: #ff6969;
  box-shadow: 0 0 10px rgba(255, 76, 76, 0.38);
  transform: translate(-50%, -50%) rotate(-45deg);
}

.v3-health > i {
  position: relative;
  grid-row: 2;
  align-self: end;
  transform-origin: left center;
  height: 16px;
  border: 1px solid rgba(159, 178, 194, 0.30);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 100%),
    linear-gradient(180deg, #8796a4 0%, #546270 45%, #202936 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.v3-health > i::after {
  content: "";
  position: absolute;
  inset: 2px 4px auto 4px;
  height: 3px;
  border-radius: 2px;
  background: rgba(238, 246, 255, 0.26);
}

.v3-health > i.filled {
  border-color: rgba(126, 255, 130, 0.24);
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 255, 255, 0.15) 8% 13%, transparent 13% 100%),
    linear-gradient(180deg, #73ff79 0%, #1ed927 54%, #0b6828 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    0 0 10px rgba(76, 255, 82, 0.18);
}

.v3-health b {
  display: none;
}

.v3-health[data-hp-tone="orange"] strong {
  color: #d88709;
}

.v3-health[data-hp-tone="red"] strong {
  color: #b63838;
}

.v3-health[data-hp-tone="orange"] > i.filled {
  border-color: rgba(255, 211, 82, 0.20);
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 255, 255, 0.13) 8% 13%, transparent 13% 100%),
    linear-gradient(180deg, #ffe36b 0%, #d49513 58%, #6a4210 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 10px rgba(255, 199, 60, 0.16);
}

.v3-health[data-hp-tone="red"] > i.filled {
  border-color: rgba(255, 86, 86, 0.22);
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 255, 255, 0.11) 8% 13%, transparent 13% 100%),
    linear-gradient(180deg, #ff6262 0%, #c71924 58%, #64101b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 0 12px rgba(255, 68, 68, 0.20);
}

.v3-ammo {
  position: absolute;
  top: 10px;
  right: 6px;
  align-self: start;
  display: grid;
  grid-template-columns: repeat(var(--ammo-slots, 4), 8px);
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  gap: 5px;
  width: auto;
  min-width: 54px;
  height: 30px;
  padding: 6px 9px;
  border-radius: 7px;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none;
  overflow: visible;
  z-index: 2;
}

.v3-ammo::before {
  content: none;
}

.v3-ammo i {
  position: relative;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  width: 8px;
  height: 18px;
  border: 2px solid #40505c;
  border-bottom-width: 3px;
  border-radius: 6px 6px 1px 1px;
  background: #26313b;
  opacity: 1;
  transform: none !important;
}

.v3-ammo i::before {
  content: "";
  position: absolute;
  inset: 2px 2px 2px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #394854, #2b3742);
}

.v3-ammo i.loaded {
  border-color: #a9bac8;
  background: #6f7f8d;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.42);
}

.v3-ammo i.loaded::before {
  background: linear-gradient(180deg, #d6e0e8 0%, #8798a6 100%);
}

.v3-health > i:nth-of-type(1) {
  grid-column: 1;
}

.v3-health > i:nth-of-type(2) {
  grid-column: 2;
}

.v3-health > i:nth-of-type(3) {
  grid-column: 3;
}

.v3-health > i:nth-of-type(4) {
  grid-column: 4;
}

.v3-health > i:nth-of-type(5) {
  grid-column: 5;
}

.v3-skills {
  justify-self: center;
  display: flex;
  gap: 9px;
}

.v3-skills button {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  width: 62px;
  height: auto;
  min-width: 62px;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #9eacbc;
  background: transparent;
  font-size: 11px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.v3-skills button:not(.empty)::after {
  content: attr(data-v3-slot-label);
  position: absolute;
  left: 6px;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(127, 199, 255, 0.34);
  border-radius: 4px;
  color: #ffffff;
  background: rgba(13, 22, 33, 0.88);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  text-shadow: var(--v3-figma-shadow);
}

.v3-skills button.shotgun-control:not(.empty)::after {
  content: "";
  width: 18px;
  height: 18px;
  border-color: rgba(127, 199, 255, 0.34);
  border-radius: 4px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5.3 2.2h7.4c1.2 0 2.2 1 2.2 2.2v8.1c0 1.8-1.4 3.3-3.3 3.3H6.4c-1.8 0-3.3-1.4-3.3-3.3V4.4c0-1.2 1-2.2 2.2-2.2Z' fill='none' stroke='white' stroke-width='1.35'/%3E%3Cpath d='M9 2.7v7.8' stroke='white' stroke-width='1' opacity='.85'/%3E%3Cpath d='M9.8 3.3h3.7v7H9.8Z' fill='white'/%3E%3Crect x='7.85' y='4.1' width='2.1' height='3.2' rx='1' fill='%23101a28'/%3E%3C/svg%3E") center / 17px 17px no-repeat,
    rgba(13, 22, 33, 0.88);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.v3-skills button.shotgun-control:not(.empty)::before {
  content: none;
}

.v3-skills button.empty {
  cursor: default;
}

.v3-skills button.empty small {
  visibility: hidden;
}

.v3-skills button.empty::before {
  content: attr(data-v3-slot-label);
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 2px solid #263b50;
  border-radius: 8px;
  color: #9fb8d0;
  background: #141b26;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.v3-skills button.selected img {
  animation: v3-skill-icon-pulse 1.15s ease-in-out infinite;
}

.v3-skills img {
  width: 51px;
  height: 48px;
}

.v3-skills small {
  width: 62px;
  min-width: 62px;
  min-height: 13px;
  padding: 1px 4px;
  color: var(--v3-text-muted-figma);
  font-size: 10px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  text-shadow: var(--v3-figma-shadow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

@keyframes v3-skill-icon-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 3px rgba(var(--v3-skill-glow, 86, 255, 112), 0.18));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 12px rgba(var(--v3-skill-glow, 86, 255, 112), 0.72));
    transform: scale(1.05);
  }
}

.v3-footer {
  display: grid;
  justify-items: center;
  gap: 5px;
  justify-self: end;
  color: var(--v3-xp-muted-figma);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  pointer-events: auto;
  text-shadow: var(--v3-figma-shadow);
}

.v3-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  white-space: nowrap;
}

.v3-footer a,
.v3-footer b,
.v3-footer u {
  color: #8fa9c4;
  font-weight: 800;
  text-shadow: var(--v3-figma-shadow);
}

.v3-footer a {
  text-decoration: none;
  cursor: pointer;
}

.v3-footer a:hover {
  color: #cfe3f5;
}

.game-shell.sidebar-collapsed .v3-header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.game-shell.sidebar-collapsed .sidebar {
  top: 0;
  width: 0;
  height: 100vh;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.game-shell.sidebar-collapsed .sidebar > *:not(.sidebar-toggle) {
  display: none !important;
}

.game-shell.sidebar-collapsed .sidebar-toggle {
  top: 50%;
  left: 10px;
  border-color: rgba(127, 199, 255, 0.38);
  outline: none !important;
  background: rgba(32, 38, 53, 0.88);
  backdrop-filter: blur(8px);
  transition: opacity 0.16s ease, filter 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.game-shell.sidebar-collapsed.hud-overlap-toggle .sidebar-toggle {
  opacity: 0.22;
  filter: saturate(0.85);
  pointer-events: none;
}

.game-shell.sidebar-collapsed .play-area {
  inset: 0;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  transform: none;
  border-radius: 0;
}

.game-shell.sidebar-collapsed .play-area::before {
  border: 0;
  border-radius: 0;
}

.game-shell.sidebar-collapsed #game {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.game-shell.sidebar-collapsed .arena-topbar {
  inset: 12px 18px auto 54px;
  z-index: 8;
  transition: opacity 0.16s ease, filter 0.16s ease;
}

.game-shell.sidebar-collapsed .kill-feed {
  top: 52px;
  right: 18px;
}

.game-shell.sidebar-collapsed .spectator-panel:not(.collapsed) {
  top: 86px;
  left: 18px;
}

.game-shell.sidebar-collapsed .spectator-panel.collapsed {
  top: 72px;
  left: 18px;
}

.game-shell.sidebar-collapsed .spectator-panel.in-topbar.collapsed {
  position: static;
  top: auto;
  left: auto;
}

.game-shell.sidebar-collapsed .spectator-panel.in-topbar:not(.collapsed) {
  top: 46px;
  left: 0;
}

.game-shell.sidebar-collapsed .arena-bottom-hud {
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  transition: opacity 0.16s ease, filter 0.16s ease;
}

.game-shell.sidebar-collapsed.hud-overlap-top .arena-topbar,
.game-shell.sidebar-collapsed.hud-overlap-top .kill-feed,
.game-shell.sidebar-collapsed.hud-overlap-bottom .arena-bottom-hud {
  opacity: 0.22;
  filter: saturate(0.85);
}

.game-shell.sidebar-collapsed .v3-footer {
  display: none;
}

/* Play Game create page final override. Must stay last: older match styles are broad. */
.players-panel.match-panel {
  width: min(1320px, calc(100vw - 96px));
  max-height: min(860px, calc(100vh - 88px));
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 10px;
  background: #121922;
}

.players-panel.match-panel .players-head {
  min-height: 78px;
  padding: 18px 20px;
  background: #121922;
}

.players-panel.match-panel .match-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 20px;
  background: #121922;
}

#matchCreateForm.match-create-form.match-pane.active {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  max-height: calc(min(860px, 100vh - 88px) - 134px);
  padding: 0 20px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(127, 199, 255, 0.36) rgba(8, 18, 27, 0.78);
  scrollbar-width: thin;
}

#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar {
  width: 8px;
}

#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar-track {
  background: rgba(8, 18, 27, 0.78);
}

#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar-thumb {
  border: 2px solid rgba(8, 18, 27, 0.78);
  border-radius: 999px;
  background: rgba(127, 199, 255, 0.48);
}

#matchCreateForm .match-create-mode-cards {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 8px;
  background: #141d28;
}

#matchCreateForm .match-mode-card {
  display: grid;
  grid-template-rows: 72px auto;
  gap: 0;
  min-width: 0;
  min-height: 118px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  color: #dcebf4;
  background: #1b2432;
}

#matchCreateForm .match-mode-card:hover {
  border-color: rgba(127, 199, 255, 0.34);
  background: #202b3a;
}

#matchCreateForm .match-mode-card.active {
  border-color: rgba(0, 205, 36, 0.76);
  background: #152d25;
  box-shadow: 0 0 0 1px rgba(0, 205, 36, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#matchCreateForm .match-mode-card img {
  display: block;
  width: 100%;
  height: 72px;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #08121b;
}

#matchCreateForm .match-mode-card-body {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 2px 0;
  text-align: left;
}

#matchCreateForm .match-mode-card-body strong,
#matchCreateForm .match-mode-card-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#matchCreateForm .match-mode-card-body strong {
  color: #f3fbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

#matchCreateForm .match-mode-card-body small {
  color: #9fb1bf;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

#matchCreateForm.match-create-form label {
  grid-column: span 6;
  display: grid;
  gap: 8px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  background: #182231;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#matchCreateForm.match-create-form label:first-child {
  grid-column: span 8;
}

#matchCreateForm.match-create-form label:has(#matchTypeSelect) {
  grid-column: span 4;
}

#matchCreateForm.match-create-form label:has(#matchModeSelect) {
  display: none;
}

#matchCreateForm.match-create-form label:has(#matchMapSelect),
#matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
#matchCreateForm.match-create-form label:has(#matchFragLimitInput),
#matchCreateForm.match-create-form label:has(#matchPasswordInput) {
  grid-column: span 3;
}

#matchCreateForm.match-create-form label > span {
  color: #b8c8d5;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  text-transform: none;
}

#matchCreateForm.match-create-form input,
#matchCreateForm.match-create-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  color: #f3fbff;
  background: #08121b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-size: 14px;
}

#matchCreateForm.match-create-form input:focus,
#matchCreateForm.match-create-form select:focus {
  border-color: rgba(127, 199, 255, 0.48);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(127, 199, 255, 0.08);
}

#matchCreateForm .match-bots-toggle,
#matchCreateForm .match-observer-toggle,
#matchCreateForm .match-paid-toggle,
#matchCreateForm .match-organizer-toggle {
  grid-column: span 4;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
}

#matchCreateForm #paidMatchBlock {
  grid-column: 1 / -1;
}

#matchCreateForm button[type="submit"] {
  grid-column: 1 / -1;
  min-height: 52px;
  margin-top: 2px;
  border-radius: 8px;
}

@media (max-width: 1180px) {
  #matchCreateForm .match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #matchCreateForm.match-create-form label:first-child,
  #matchCreateForm.match-create-form label:has(#matchTypeSelect),
  #matchCreateForm.match-create-form label:has(#matchMapSelect),
  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm .match-bots-toggle,
  #matchCreateForm .match-observer-toggle,
  #matchCreateForm .match-paid-toggle,
  #matchCreateForm .match-organizer-toggle {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .players-panel.match-panel {
    width: calc(100vw - 24px);
  }

  #matchCreateForm .match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #matchCreateForm.match-create-form label:first-child,
  #matchCreateForm.match-create-form label:has(#matchTypeSelect),
  #matchCreateForm.match-create-form label:has(#matchMapSelect),
  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm .match-bots-toggle,
  #matchCreateForm .match-observer-toggle,
  #matchCreateForm .match-paid-toggle,
  #matchCreateForm .match-organizer-toggle {
    grid-column: 1 / -1;
  }
}

/* Create match final pass: compact row cards, inferred type/map, dimmed game backdrop. */
#matchesOverlay.settings-overlay.open {
  background: rgba(3, 8, 13, 0.68) !important;
  backdrop-filter: blur(5px);
}

#matchesOverlay .players-panel.match-panel {
  background: #111821 !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55) !important;
}

#matchCreateForm.match-create-form .match-system-field,
#matchCreateForm.match-create-form label:has(#matchTypeSelect),
#matchCreateForm.match-create-form label:has(#matchModeSelect),
#matchCreateForm.match-create-form label:has(#matchMapSelect) {
  display: none !important;
}

#matchCreateModeCards.match-create-mode-cards {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(112px, 1fr)) !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid rgba(127, 199, 255, 0.13) !important;
  border-radius: 8px !important;
  background: #141d28 !important;
  align-items: stretch !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > button.match-mode-card,
#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card {
  grid-column: auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
  display: grid !important;
  grid-template-rows: 74px auto !important;
  gap: 8px !important;
  min-height: 126px !important;
  padding: 8px !important;
  border-radius: 8px !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card > img {
  width: 100% !important;
  height: 74px !important;
  max-height: 74px !important;
  object-fit: contain !important;
  object-position: center !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card > .match-mode-card-body {
  align-self: end !important;
  min-width: 0 !important;
  padding: 0 2px !important;
}

#matchCreateForm.match-create-form label:first-child {
  grid-column: 1 / -1 !important;
}

#matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
#matchCreateForm.match-create-form label:has(#matchFragLimitInput),
#matchCreateForm.match-create-form label:has(#matchPasswordInput),
#matchCreateForm.match-create-form .match-bots-toggle,
#matchCreateForm.match-create-form .match-observer-toggle,
#matchCreateForm.match-create-form .match-paid-toggle,
#matchCreateForm.match-create-form .match-organizer-toggle {
  grid-column: span 4 !important;
}

@media (max-width: 980px) {
  #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(112px, 1fr)) !important;
  }

  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm.match-create-form .match-bots-toggle,
  #matchCreateForm.match-create-form .match-observer-toggle,
  #matchCreateForm.match-create-form .match-paid-toggle,
  #matchCreateForm.match-create-form .match-organizer-toggle {
    grid-column: span 6 !important;
  }
}

@media (max-width: 680px) {
  #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(112px, 1fr)) !important;
  }

  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm.match-create-form .match-bots-toggle,
  #matchCreateForm.match-create-form .match-observer-toggle,
  #matchCreateForm.match-create-form .match-paid-toggle,
  #matchCreateForm.match-create-form .match-organizer-toggle {
    grid-column: 1 / -1 !important;
  }
}

/* Last-pass create-mode layout: keep mode choices as compact cards, never full-width banners. */
#matchCreateForm #matchCreateModeCards.match-create-mode-cards {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(112px, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > button.match-mode-card,
#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card {
  grid-column: auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
  display: grid !important;
  grid-template-rows: 74px auto !important;
  gap: 8px !important;
  min-height: 126px !important;
  padding: 8px !important;
  border-radius: 8px !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card > img {
  width: 100% !important;
  height: 74px !important;
  max-height: 74px !important;
  object-fit: contain !important;
  object-position: center !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card > .match-mode-card-body {
  align-self: end !important;
  min-width: 0 !important;
  padding: 0 2px !important;
}

@media (max-width: 1320px) {
  #matchCreateForm #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(112px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #matchCreateForm #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(112px, 1fr)) !important;
  }
}

/* Final create-mode card layout guard: old banner rules must not stretch these cards. */
#matchCreateForm #matchCreateModeCards.match-create-mode-cards {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(112px, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > button.match-mode-card,
#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card {
  grid-column: auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
  display: grid !important;
  grid-template-rows: 74px auto !important;
  gap: 8px !important;
  min-height: 126px !important;
  padding: 8px !important;
  border-radius: 8px !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card > img {
  width: 100% !important;
  height: 74px !important;
  max-height: 74px !important;
  object-fit: contain !important;
  object-position: center !important;
}

#matchCreateForm #matchCreateModeCards.match-create-mode-cards > .match-mode-card > .match-mode-card-body {
  align-self: end !important;
  min-width: 0 !important;
  padding: 0 2px !important;
}

@media (max-width: 1320px) {
  #matchCreateForm #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(112px, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #matchCreateForm #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(112px, 1fr)) !important;
  }
}

/* Final create-match layout override. Keep this after older match-page rules. */
#matchesOverlay.settings-overlay.open {
  background: rgba(3, 8, 13, 0.68);
  backdrop-filter: blur(5px);
}

#matchCreateForm.match-create-form .match-system-field,
#matchCreateForm.match-create-form label:has(#matchTypeSelect),
#matchCreateForm.match-create-form label:has(#matchModeSelect),
#matchCreateForm.match-create-form label:has(#matchMapSelect) {
  display: none !important;
}

#matchCreateModeCards.match-create-mode-cards {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(118px, 1fr)) !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid rgba(127, 199, 255, 0.13) !important;
  border-radius: 8px !important;
  background: #141d28 !important;
}

#matchCreateModeCards .match-mode-card {
  min-height: 118px !important;
}

#matchCreateForm.match-create-form label:first-child {
  grid-column: 1 / -1 !important;
}

#matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
#matchCreateForm.match-create-form label:has(#matchFragLimitInput),
#matchCreateForm.match-create-form label:has(#matchPasswordInput),
#matchCreateForm.match-create-form .match-bots-toggle,
#matchCreateForm.match-create-form .match-observer-toggle,
#matchCreateForm.match-create-form .match-paid-toggle,
#matchCreateForm.match-create-form .match-organizer-toggle {
  grid-column: span 4 !important;
}

@media (max-width: 980px) {
  #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(118px, 1fr)) !important;
  }

  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm.match-create-form .match-bots-toggle,
  #matchCreateForm.match-create-form .match-observer-toggle,
  #matchCreateForm.match-create-form .match-paid-toggle,
  #matchCreateForm.match-create-form .match-organizer-toggle {
    grid-column: span 6 !important;
  }
}

@media (max-width: 680px) {
  #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(118px, 1fr)) !important;
  }

  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm.match-create-form .match-bots-toggle,
  #matchCreateForm.match-create-form .match-observer-toggle,
  #matchCreateForm.match-create-form .match-paid-toggle,
  #matchCreateForm.match-create-form .match-organizer-toggle {
    grid-column: 1 / -1 !important;
  }
}

/* Tournament final cascade guard. */
#matchesOverlay .players-panel.match-panel {
  grid-template-rows: 74px minmax(0, 1fr) !important;
}

#matchesOverlay .match-top-row {
  display: grid !important;
  grid-template-columns: minmax(140px, 220px) minmax(480px, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 14px 18px !important;
}

#matchesOverlay .match-top-row .match-tabs {
  grid-column: auto !important;
  grid-row: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#matchesOverlay .match-top-row .match-tabs button {
  min-height: 44px !important;
}

#tournamentPane.match-pane.active {
  display: block !important;
  height: 100% !important;
  padding: 14px 18px 18px !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 356px !important;
  gap: 14px !important;
  height: 100% !important;
  min-height: 0 !important;
}

#tournamentPane .tournament-browser {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 14px !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 16px !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  background: #111b27 !important;
}

#tournamentPane .tournament-player-grid {
  display: grid !important;
  grid-template-columns: 340px minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#tournamentPane.no-tournaments .tournament-player-grid {
  grid-template-columns: 1fr !important;
}

#tournamentPane.no-tournaments .tournament-list-shell {
  display: none !important;
}

#tournamentPane .tournament-list-shell,
#tournamentPane .tournament-details {
  min-height: 0 !important;
  border: 1px solid rgba(127, 199, 255, 0.11) !important;
  border-radius: 8px !important;
  background: #0d1722 !important;
}

#tournamentPane .tournament-details {
  display: grid !important;
  align-content: start !important;
  gap: 14px !important;
  padding: 16px !important;
  overflow: auto !important;
}

#tournamentPane.no-tournaments .tournament-details {
  align-content: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-empty-state {
  display: grid !important;
  justify-items: center !important;
  gap: 10px !important;
  width: min(460px, 100%) !important;
  padding: 30px 28px !important;
  border: 1px solid rgba(127, 199, 255, 0.12) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(28, 42, 58, 0.76), rgba(10, 18, 27, 0.92)) !important;
  text-align: center !important;
}

#tournamentPane .tournament-create-form {
  height: 100% !important;
  min-height: 0 !important;
  padding: 14px !important;
  overflow: auto !important;
  border-color: rgba(68, 255, 110, 0.14) !important;
  border-radius: 8px !important;
  background: #111b27 !important;
}

@media (max-width: 1180px) {
  #matchesOverlay .match-top-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #matchesOverlay .match-top-row > strong {
    display: none !important;
  }

  #tournamentPane .tournament-layout {
    grid-template-columns: 1fr !important;
    overflow: auto !important;
  }

  #tournamentPane .tournament-browser,
  #tournamentPane .tournament-create-form {
    min-height: 520px !important;
  }
}

@media (max-width: 760px) {
  #matchesOverlay .match-top-row .match-tabs,
  #tournamentPane .tournament-player-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Tournament header button alignment guard. */
#matchesOverlay .match-top-row {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

#matchesOverlay .match-top-row > strong {
  flex: 0 0 180px !important;
  min-width: 0 !important;
}

#matchesOverlay .match-top-row .match-tabs {
  flex: 1 1 auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  min-width: 420px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#matchesOverlay .match-top-row .match-tabs button {
  width: 100% !important;
  min-height: 44px !important;
}

#matchesOverlay .match-top-row > #closeMatchesButton {
  flex: 0 0 92px !important;
  width: 92px !important;
  min-height: 44px !important;
}

@media (max-width: 1180px) {
  #matchesOverlay .match-top-row > strong {
    display: none !important;
  }

  #matchesOverlay .match-top-row .match-tabs {
    min-width: 0 !important;
  }
}

@media (max-width: 760px) {
  #matchesOverlay .match-top-row {
    flex-wrap: wrap !important;
  }

  #matchesOverlay .match-top-row .match-tabs {
    flex-basis: 100% !important;
    grid-template-columns: 1fr !important;
  }
}

/* Notifications and tournament completed-tab true EOF guard. */
#notificationsPage .notifications-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#notificationsPage .notifications-request.match {
  border-left-color: #43c4ff !important;
}

#notificationsPage .notifications-request.tournament {
  border-left-color: #f5d460 !important;
}

#notificationsPage .notifications-request.success {
  border-left-color: #49ff7a !important;
}

#notificationsPage .notifications-request.match .notifications-request-icon {
  border-color: rgba(67, 196, 255, 0.34) !important;
}

#notificationsPage .notifications-request.tournament .notifications-request-icon {
  border-color: rgba(245, 212, 96, 0.34) !important;
}

#notificationsPage .notifications-request.match .notifications-request-body span {
  color: #7fc7ff !important;
}

#notificationsPage .notifications-request.tournament .notifications-request-body span {
  color: #f5d460 !important;
}

#tournamentPane .tournament-browser {
  grid-template-rows: auto auto minmax(0, 1fr) !important;
}

#tournamentPane .tournament-view-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  min-height: 0 !important;
}

#tournamentPane .tournament-view-tabs button {
  min-height: 38px !important;
  border: 1px solid rgba(127, 199, 255, 0.14) !important;
  border-radius: 8px !important;
  color: #b9c8d6 !important;
  background: #0e1824 !important;
  font: 950 11px Montserrat, Segoe UI, Arial, sans-serif !important;
  text-transform: uppercase !important;
}

#tournamentPane .tournament-view-tabs button.active {
  border-color: rgba(68, 255, 110, 0.44) !important;
  color: #f4fff7 !important;
  background: linear-gradient(180deg, #16a233 0%, #087a19 100%) !important;
}

#tournamentPane .tournament-view-panel {
  display: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-view-panel.active {
  display: block !important;
  height: 100% !important;
  min-height: 0 !important;
}

#tournamentPane #tournamentHistoryPanel.active {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 12px !important;
}

#tournamentPane .tournament-history-grid {
  display: grid !important;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-history-list-shell,
#tournamentPane .tournament-history-details {
  min-height: 0 !important;
}

#tournamentPane .tournament-history-list {
  min-height: 0 !important;
  overflow: auto !important;
  padding-bottom: 20px !important;
}

#tournamentPane .tournament-history-details {
  display: block !important;
  overflow: auto !important;
  padding: 14px 14px 28px !important;
  scrollbar-color: rgba(127, 199, 255, 0.34) rgba(8, 18, 27, 0.82) !important;
  scrollbar-width: thin !important;
}

#tournamentPane .tournament-history-card {
  display: grid !important;
  gap: 12px !important;
  min-width: 0 !important;
}

#tournamentPane .tournament-history-head {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
}

#tournamentPane .tournament-history-head strong,
#tournamentPane .tournament-history-head span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#tournamentPane .history-bracket {
  max-width: 100% !important;
  min-height: 252px !important;
  overflow: auto !important;
  padding: 8px 8px 14px !important;
  border: 1px solid rgba(127, 199, 255, 0.12) !important;
  border-radius: 8px !important;
  background: #0b141f !important;
}

#tournamentPane .history-bracket .tournament-round {
  flex-basis: 220px !important;
}

#tournamentPane .tournament-history-payouts {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
}

#tournamentPane .tournament-history-payout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto) minmax(132px, auto) !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(127, 199, 255, 0.12) !important;
  border-radius: 8px !important;
  background: #0b141f !important;
}

#tournamentPane .tournament-history-payout span,
#tournamentPane .tournament-history-payout b,
#tournamentPane .tournament-history-payout em {
  overflow: hidden !important;
  font-style: normal !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#tournamentPane .tournament-history-payout b,
#tournamentPane .tournament-history-payout em {
  justify-self: end !important;
}

#tournamentPane .tournament-history-payout em {
  max-width: 180px !important;
}

@media (max-width: 1180px) {
  #notificationsPage .notifications-grid,
  #tournamentPane .tournament-history-grid {
    grid-template-columns: 1fr !important;
  }

  #tournamentPane #tournamentHistoryPanel.active {
    overflow: auto !important;
  }

  #tournamentPane .tournament-history-grid {
    overflow: visible !important;
  }

  #tournamentPane .tournament-history-details {
    min-height: 420px !important;
  }
}

@media (max-width: 760px) {
  #tournamentPane .tournament-view-tabs,
  #tournamentPane .tournament-history-payout {
    grid-template-columns: 1fr !important;
  }

  #tournamentPane .tournament-history-payout {
    align-items: start !important;
    padding: 12px !important;
  }

  #tournamentPane .tournament-history-payout b,
  #tournamentPane .tournament-history-payout em {
    justify-self: start !important;
  }
}

/* Social requests and kill feed sit in the top-right game HUD lane. */
.kill-feed {
  top: 12px !important;
  right: 16px !important;
  width: min(300px, 30vw) !important;
}

.game-shell.sidebar-collapsed .kill-feed,
.game-shell.sidebar-collapsed.hud-overlap-top .kill-feed {
  top: 52px !important;
  right: 18px !important;
}

#socialRequestOverlay.social-request-overlay {
  inset: 0 !important;
  z-index: 64 !important;
  display: none !important;
  place-items: initial !important;
  padding: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  pointer-events: none !important;
}

#socialRequestOverlay.social-request-overlay.open {
  display: block !important;
}

#socialRequestOverlay .social-request-card {
  position: absolute !important;
  top: calc(var(--v3-header-height, 56px) + 54px) !important;
  right: 18px !important;
  width: min(360px, calc(100vw - 36px)) !important;
  gap: 10px !important;
  padding: 12px 13px !important;
  border-left: 3px solid #7fc7ff !important;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(127, 199, 255, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(127, 199, 255, 0.13), rgba(143, 220, 138, 0.08)),
    rgba(7, 14, 20, 0.95) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
  pointer-events: auto !important;
  animation: toastIn 180ms ease-out !important;
}

#socialRequestOverlay .social-request-card > strong {
  text-align: left !important;
}

#socialRequestOverlay .social-request-player {
  grid-template-columns: 44px minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 9px !important;
  border-radius: 8px !important;
  background: rgba(17, 27, 39, 0.86) !important;
}

#socialRequestOverlay .social-request-avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 8px !important;
  font-size: 16px !important;
}

#socialRequestOverlay .social-request-actions {
  gap: 8px !important;
}

#socialRequestOverlay .social-request-actions button {
  height: 34px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
}

.game-shell.sidebar-collapsed #socialRequestOverlay .social-request-card {
  top: 72px !important;
}

@media (min-width: 1200px) and (max-height: 980px) {
  .game-shell:not(.sidebar-collapsed) .kill-feed {
    top: 52px !important;
  }

  .game-shell:not(.sidebar-collapsed) #socialRequestOverlay .social-request-card {
    top: 72px !important;
  }
}

@media (max-width: 760px) {
  .kill-feed {
    top: 58px !important;
    right: 12px !important;
    width: min(300px, calc(100vw - 24px)) !important;
  }

  #socialRequestOverlay .social-request-card {
    top: 72px !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
  }
}

/* Laptop sidebar compactness: visual-only pass for shorter screens. */
@media (min-width: 861px) {
  :root {
    --sidebar-width: clamp(300px, 17vw, 340px);
  }

  .sidebar {
    gap: 12px;
    padding: 14px 16px 14px 18px;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-color: rgba(127, 199, 255, 0.32) rgba(8, 18, 27, 0.34);
    scrollbar-width: thin;
  }

  .sidebar::-webkit-scrollbar {
    width: 8px;
  }

  .sidebar::-webkit-scrollbar-track {
    background: rgba(8, 18, 27, 0.34);
  }

  .sidebar::-webkit-scrollbar-thumb {
    border: 2px solid rgba(8, 18, 27, 0.34);
    border-radius: 999px;
    background: rgba(127, 199, 255, 0.32);
  }

  .matches-cta {
    position: sticky;
    bottom: 10px;
    z-index: 8;
    min-height: 62px;
    border-radius: 7px;
    font-size: 26px;
    box-shadow:
      0 -16px 26px rgba(23, 28, 37, 0.74),
      inset 0 1px 0 rgba(255, 255, 255, 0.13);
  }

  .v3-level-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
  }

  .v3-level-line small {
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .v3-profile-main .progress-bar {
    width: min(200px, 100%);
  }
}

@media (min-width: 861px) and (max-width: 1440px) {
  :root {
    --sidebar-width: clamp(286px, 22vw, 320px);
  }
}

@media (min-width: 1600px) and (min-height: 981px) {
  .progress-panel.v3-profile-card {
    grid-template-columns: 68px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 10px;
    min-height: 174px;
    padding: 13px 15px 12px;
  }

  .v3-avatar-wrap,
  .v3-avatar {
    width: 64px;
    height: 72px;
  }

  .v3-avatar-level {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .v3-profile-main {
    align-content: start;
    padding-top: 6px;
  }

  .v3-name {
    overflow: hidden;
    font-size: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .v3-name i {
    width: 8px;
    height: 8px;
  }

  .v3-online {
    margin-top: 4px;
    font-size: 13px;
  }

  .v3-level-line {
    margin-top: 9px;
    font-size: 12px;
  }

  .v3-level-line small {
    font-size: 12px;
  }

  .v3-profile-main .progress-bar {
    width: 100%;
    height: 8px;
    margin-top: 5px;
  }

  .v3-rank-row {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 13px;
    padding-top: 12px;
    padding-bottom: 0;
  }

  .v3-rank-row img {
    width: 70px;
    height: 70px;
    transform: none;
  }

  .v3-rank-row span {
    font-size: 13px;
  }

  .v3-rank-row div > strong {
    font-size: 22px;
  }

  .v3-rank-row small,
  .v3-rank-row small span {
    font-size: 11px;
  }

  .v3-rank-row small strong {
    height: 18px;
    padding: 0 6px;
    font-size: 11px;
  }
}

@media (min-width: 1200px) and (max-height: 980px) {
  :root {
    --sidebar-width: clamp(292px, 16vw, 324px);
  }

  .sidebar {
    gap: 8px;
    padding: 10px 12px;
  }

  .progress-panel.v3-profile-card {
    grid-template-columns: 68px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 10px;
    min-height: 174px;
    padding: 13px 15px 12px;
  }

  .v3-avatar-wrap,
  .v3-avatar {
    width: 64px;
    height: 72px;
  }

  .v3-avatar-level {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .v3-profile-main {
    align-content: start;
    padding-top: 6px;
  }

  .v3-name {
    overflow: hidden;
    font-size: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .v3-name i {
    width: 8px;
    height: 8px;
  }

  .v3-online {
    margin-top: 4px;
    font-size: 13px;
  }

  .v3-level-line {
    margin-top: 9px;
    font-size: 12px;
  }

  .v3-level-line small {
    font-size: 12px;
  }

  .v3-profile-main .progress-bar {
    width: 100%;
    height: 8px;
    margin-top: 5px;
  }

  .v3-rank-row {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 13px;
    padding-top: 12px;
    padding-bottom: 0;
  }

  .v3-rank-row img {
    width: 70px;
    height: 70px;
    transform: none;
  }

  .v3-rank-row span {
    font-size: 13px;
  }

  .v3-rank-row div > strong {
    font-size: 22px;
  }

  .v3-rank-row small,
  .v3-rank-row small span {
    font-size: 11px;
  }

  .v3-rank-row small strong {
    height: 18px;
    padding: 0 6px;
    font-size: 11px;
  }

  .side-quests {
    min-height: 214px;
    padding: 14px 15px 12px;
  }

  .side-quests .progress-card-head {
    min-height: 20px;
    padding-bottom: 10px;
  }

  .side-quests .progress-card-head span {
    font-size: 18px;
  }

  .side-quests .progress-card-head small {
    font-size: 11px;
  }

  .side-quests .quest-list {
    padding-top: 11px;
  }

  .side-quests .quest-item {
    grid-template-columns: 38px minmax(0, 1fr) 28px 52px;
    grid-template-rows: 16px 14px;
    min-height: 52px;
    column-gap: 8px;
    row-gap: 5px;
  }

  .side-quests .quest-icon {
    width: 36px;
    height: 36px;
  }

  .side-quests .quest-item strong {
    font-size: 12px;
  }

  .side-quests .quest-item small {
    font-size: 11px;
  }

  .side-quests .quest-status {
    min-width: 52px;
    font-size: 13px;
  }

  .v3-stats-card {
    min-height: 106px;
    padding: 10px 14px;
  }

  .v3-tabs {
    gap: 7px;
  }

  .v3-tabs button {
    height: 27px;
    font-size: 11px;
  }

  .v3-stats-grid {
    gap: 8px;
    margin-top: 9px;
  }

  .v3-stats-grid img {
    width: 22px;
    height: 22px;
  }

  .v3-stats-grid small {
    font-size: 10px;
  }

  .v3-stats-grid strong {
    font-size: 14px;
  }

  .v3-status-pills {
    gap: 4px;
    margin-top: 0;
    margin-bottom: 4px;
  }

  .v3-status-pills span {
    height: 15px;
    padding: 0 6px;
    font-size: 9px;
    line-height: 15px;
  }

  .v3-template .chat-shortcut-hint {
    min-height: 32px;
    padding: 0 10px;
    font-size: 10px;
  }

  .v3-template .chat-shortcut-hint kbd {
    min-width: 46px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .matches-cta {
    bottom: 8px;
    min-height: 54px;
    padding: 12px 14px;
    font-size: 24px;
  }

  .sidebar-toggle {
    left: calc(var(--sidebar-width) - 13px);
    height: 58px;
  }
}

@media (min-width: 1200px) and (max-height: 820px) {
  :root {
    --sidebar-width: clamp(276px, 15.5vw, 304px);
  }

  .sidebar {
    gap: 7px;
    padding: 8px 10px;
  }

  .progress-panel.v3-profile-card {
    grid-template-columns: 58px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 8px;
    min-height: 158px;
    padding: 11px 12px 10px;
  }

  .v3-avatar-wrap,
  .v3-avatar {
    width: 58px;
    height: 65px;
  }

  .v3-avatar-level {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .v3-profile-main {
    padding-top: 4px;
  }

  .v3-name {
    font-size: 18px;
  }

  .v3-online {
    font-size: 12px;
  }

  .v3-level-line,
  .v3-level-line small {
    font-size: 11px;
  }

  .v3-rank-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 11px;
    padding-top: 9px;
  }

  .v3-rank-row img {
    width: 56px;
    height: 56px;
  }

  .v3-rank-row div > strong {
    font-size: 20px;
  }

  .side-quests {
    min-height: 192px;
    padding: 12px;
  }

  .side-quests .progress-card-head {
    padding-bottom: 8px;
  }

  .side-quests .progress-card-head span {
    font-size: 17px;
  }

  .side-quests .quest-list {
    padding-top: 9px;
  }

  .side-quests .quest-item {
    grid-template-columns: 34px minmax(0, 1fr) 26px 48px;
    min-height: 46px;
    column-gap: 7px;
  }

  .side-quests .quest-icon {
    width: 32px;
    height: 32px;
  }

  .side-quests .quest-item strong,
  .side-quests .quest-item small {
    font-size: 10px;
  }

  .side-quests .quest-status {
    min-width: 48px;
    font-size: 12px;
  }

  .v3-stats-card {
    min-height: 96px;
    padding: 9px 12px;
  }

  .v3-tabs button {
    height: 25px;
    font-size: 10px;
  }

  .v3-stats-grid {
    margin-top: 8px;
  }

  .v3-stats-grid img {
    width: 20px;
    height: 20px;
  }

  .v3-stats-grid small {
    font-size: 9px;
  }

  .v3-stats-grid strong {
    font-size: 13px;
  }

  .v3-template .chat-shortcut-hint {
    min-height: 30px;
  }

  .matches-cta {
    min-height: 50px;
    font-size: 22px;
  }
}

/* In-game toast layout guard: notifications belong to the arena, below the top HUD. */
.play-area > .notification-stack {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 48 !important;
  display: grid !important;
  justify-items: end !important;
  gap: 8px !important;
  width: min(390px, calc(100% - 32px)) !important;
  max-width: calc(100% - 32px) !important;
  pointer-events: none !important;
}

.play-area > .notification-stack .notification-toast {
  width: 100% !important;
  min-height: 58px !important;
  padding: 11px 13px 11px 15px !important;
  border-radius: 8px !important;
  backdrop-filter: blur(8px) !important;
}

.play-area > .notification-stack .notification-toast.has-action {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

.play-area > .notification-stack .notification-toast strong,
.play-area > .notification-stack .notification-toast span {
  max-width: 100% !important;
}

.play-area > .notification-stack .notification-toast button {
  flex: 0 0 auto !important;
  min-width: 82px !important;
}

@media (max-width: 760px) {
  .play-area > .notification-stack {
    inset: 12px 12px auto 12px !important;
    width: auto !important;
    max-width: none !important;
  }

  .play-area > .notification-stack .notification-toast.has-action {
    grid-template-columns: 1fr !important;
  }
}

/* Game notifications and tournament history scroll guards. */
.notifications-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notifications-request.match {
  border-left-color: #43c4ff;
}

.notifications-request.tournament {
  border-left-color: #f5d460;
}

.notifications-request.success {
  border-left-color: #49ff7a;
}

.notifications-request.match .notifications-request-icon {
  border-color: rgba(67, 196, 255, 0.34);
}

.notifications-request.tournament .notifications-request-icon {
  border-color: rgba(245, 212, 96, 0.34);
}

.notifications-request.match .notifications-request-body span {
  color: #7fc7ff;
}

.notifications-request.tournament .notifications-request-body span {
  color: #f5d460;
}

#tournamentPane .tournament-browser {
  grid-template-rows: auto auto minmax(0, 1fr) !important;
}

#tournamentPane .tournament-view-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}

#tournamentPane .tournament-view-tabs button {
  min-height: 38px;
  border: 1px solid rgba(127, 199, 255, 0.14);
  border-radius: 8px;
  color: #b9c8d6;
  background: #0e1824;
  font: 950 11px Montserrat, Segoe UI, Arial, sans-serif;
  text-transform: uppercase;
}

#tournamentPane .tournament-view-tabs button.active {
  border-color: rgba(68, 255, 110, 0.44);
  color: #f4fff7;
  background: linear-gradient(180deg, #16a233 0%, #087a19 100%);
}

#tournamentPane .tournament-view-panel {
  display: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-view-panel.active {
  display: block !important;
  height: 100% !important;
  min-height: 0 !important;
}

#tournamentPane #tournamentHistoryPanel.active {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

#tournamentPane .tournament-history-grid {
  display: grid !important;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

#tournamentPane .tournament-history-list-shell,
#tournamentPane .tournament-history-details {
  min-height: 0 !important;
}

#tournamentPane .tournament-history-list {
  min-height: 0 !important;
  overflow: auto !important;
  padding-bottom: 20px !important;
}

#tournamentPane .tournament-history-details {
  display: block !important;
  overflow: auto !important;
  padding: 14px 14px 28px !important;
  scrollbar-color: rgba(127, 199, 255, 0.34) rgba(8, 18, 27, 0.82);
  scrollbar-width: thin;
}

#tournamentPane .tournament-history-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

#tournamentPane .tournament-history-head {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#tournamentPane .tournament-history-head strong {
  overflow: hidden;
  color: #f4fbff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tournamentPane .tournament-history-head span {
  overflow: hidden;
  color: #9db0bf;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tournamentPane .history-bracket {
  max-width: 100%;
  min-height: 252px;
  overflow: auto !important;
  padding: 8px 8px 14px !important;
  border: 1px solid rgba(127, 199, 255, 0.12);
  border-radius: 8px;
  background: #0b141f;
}

#tournamentPane .history-bracket .tournament-round {
  flex-basis: 220px;
}

#tournamentPane .tournament-history-payouts {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#tournamentPane .tournament-history-payout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto) minmax(132px, auto);
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(127, 199, 255, 0.12);
  border-radius: 8px;
  background: #0b141f;
}

#tournamentPane .tournament-history-payout.error {
  border-color: rgba(255, 95, 95, 0.34);
}

#tournamentPane .tournament-history-payout span,
#tournamentPane .tournament-history-payout b,
#tournamentPane .tournament-history-payout em {
  overflow: hidden;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tournamentPane .tournament-history-payout span {
  color: #f4fbff;
  font-size: 12px;
}

#tournamentPane .tournament-history-payout b {
  justify-self: end;
  color: #dfffea;
  font-size: 12px;
}

#tournamentPane .tournament-history-payout em {
  justify-self: end;
  max-width: 180px;
  color: #7fc7ff;
  font-size: 11px;
}

#tournamentPane .tournament-history-payout a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .notifications-grid {
    grid-template-columns: 1fr;
  }

  #tournamentPane #tournamentHistoryPanel.active {
    overflow: auto !important;
  }

  #tournamentPane .tournament-history-grid {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

  #tournamentPane .tournament-history-details {
    min-height: 420px !important;
  }
}

@media (max-width: 760px) {
  #tournamentPane .tournament-view-tabs {
    grid-template-columns: 1fr;
  }

  #tournamentPane .tournament-history-payout {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 12px;
  }

  #tournamentPane .tournament-history-payout b,
  #tournamentPane .tournament-history-payout em {
    justify-self: start;
  }
}

/* Tournament page final polish. Keep registration and creation clearly separated. */
#matchesOverlay .players-panel.match-panel {
  display: grid !important;
  grid-template-rows: 74px minmax(0, 1fr) !important;
  width: min(1500px, calc(100vw - 88px)) !important;
  height: min(820px, calc(100vh - 92px)) !important;
  max-height: min(820px, calc(100vh - 92px)) !important;
}

#matchesOverlay .match-top-row {
  display: grid !important;
  grid-template-columns: minmax(140px, 220px) minmax(480px, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 0 !important;
  padding: 14px 18px !important;
}

#matchesOverlay .match-top-row > strong {
  display: block !important;
}

#matchesOverlay .match-top-row .match-tabs {
  grid-column: auto !important;
  grid-row: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#matchesOverlay .match-top-row .match-tabs button {
  min-height: 44px !important;
  padding: 0 14px !important;
}

#tournamentPane.match-pane.active {
  display: block !important;
  height: 100% !important;
  padding: 14px 18px 18px !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 356px !important;
  gap: 14px !important;
  height: 100% !important;
  min-height: 0 !important;
}

#tournamentPane .tournament-player-panel,
#tournamentPane .tournament-organizer-panel {
  min-height: 0 !important;
}

#tournamentPane .tournament-browser,
#tournamentPane .tournament-create-form {
  height: 100% !important;
  min-height: 0 !important;
  border-radius: 8px !important;
  background: #111b27 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

#tournamentPane .tournament-browser {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 14px !important;
  padding: 16px !important;
}

#tournamentPane .tournament-browser > .tournament-section-head {
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(127, 199, 255, 0.1) !important;
  background: transparent !important;
}

#tournamentPane .tournament-player-grid {
  display: grid !important;
  grid-template-columns: 340px minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#tournamentPane.no-tournaments .tournament-player-grid {
  grid-template-columns: 1fr !important;
}

#tournamentPane.no-tournaments .tournament-list-shell {
  display: none !important;
}

#tournamentPane .tournament-list-shell,
#tournamentPane .tournament-details {
  min-height: 0 !important;
  border: 1px solid rgba(127, 199, 255, 0.11) !important;
  border-radius: 8px !important;
  background: #0d1722 !important;
}

#tournamentPane .tournament-list-shell {
  padding: 14px !important;
}

#tournamentPane .tournament-list {
  min-height: 0 !important;
  overflow: auto !important;
  padding: 0 4px 0 0 !important;
}

#tournamentPane .tournament-details {
  display: grid !important;
  align-content: start !important;
  gap: 14px !important;
  padding: 16px !important;
  overflow: auto !important;
}

#tournamentPane.no-tournaments .tournament-details {
  align-content: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(460px, 100%);
  padding: 30px 28px;
  border: 1px solid rgba(127, 199, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(28, 42, 58, 0.76), rgba(10, 18, 27, 0.92)),
    #0d1722;
  text-align: center;
}

#tournamentPane .tournament-empty-state span {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 38px;
  border: 1px solid rgba(68, 255, 110, 0.28);
  border-radius: 8px;
  color: #eaffef;
  background: rgba(13, 132, 34, 0.34);
  font-size: 13px;
  font-weight: 950;
}

#tournamentPane .tournament-empty-state strong {
  color: #f4fbff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
}

#tournamentPane .tournament-empty-state p {
  max-width: 360px;
  margin: 0;
  color: #8fa2b2;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

#tournamentPane .tournament-create-form {
  align-content: start !important;
  gap: 10px !important;
  padding: 14px !important;
  overflow: auto !important;
  border-color: rgba(68, 255, 110, 0.14) !important;
}

#tournamentPane .tournament-create-form .tournament-section-head {
  padding: 12px !important;
  border: 1px solid rgba(68, 255, 110, 0.16) !important;
  border-radius: 8px !important;
  background: rgba(18, 70, 42, 0.24) !important;
}

#tournamentPane .tournament-create-form label {
  min-height: 64px !important;
  padding: 10px 12px !important;
  border-color: rgba(127, 199, 255, 0.11) !important;
  background: #172231 !important;
}

#tournamentPane .tournament-wallet-card {
  background: rgba(18, 70, 42, 0.28) !important;
}

#tournamentPane .tournament-create-form button[type="submit"] {
  min-height: 46px !important;
  margin-top: 2px !important;
}

@media (max-width: 1180px) {
  #matchesOverlay .match-top-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #matchesOverlay .match-top-row > strong {
    display: none !important;
  }

  #matchesOverlay .match-top-row .match-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #tournamentPane .tournament-layout {
    grid-template-columns: 1fr !important;
    overflow: auto !important;
  }

  #tournamentPane .tournament-browser,
  #tournamentPane .tournament-create-form {
    min-height: 520px !important;
  }
}

@media (max-width: 760px) {
  #matchesOverlay .players-panel.match-panel {
    width: calc(100vw - 24px) !important;
    height: calc(100vh - 24px) !important;
    max-height: calc(100vh - 24px) !important;
  }

  #matchesOverlay .match-top-row .match-tabs {
    grid-template-columns: 1fr !important;
  }

  #tournamentPane .tournament-player-grid {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }
}

/* Fast cup tournaments. */
#matchesOverlay .players-panel.match-panel {
  grid-template-rows: auto minmax(0, 1fr) !important;
}

#matchesOverlay .match-top-row {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(320px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.1);
  background: #121922;
}

#matchesOverlay .match-top-row > strong {
  overflow: hidden;
  color: #f5fbff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

#matchesOverlay .match-top-row > button {
  min-width: 86px;
  min-height: 42px;
  border: 1px solid rgba(127, 199, 255, 0.2);
  border-radius: 8px;
  color: #f3fbff;
  background: #1d2736;
}

#matchesOverlay .match-top-row .match-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px;
  min-height: 0;
  padding: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
}

#tournamentPane.match-pane.active {
  display: block;
  min-height: 0;
  height: 100%;
  padding: 0 20px 20px;
  overflow: hidden;
}

.tournament-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  height: 100%;
}

.tournament-create-form,
.tournament-browser,
.tournament-details {
  min-width: 0;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 8px;
  background: #151f2b;
}

.tournament-create-form {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow: auto;
  scrollbar-color: rgba(127, 199, 255, 0.32) rgba(8, 18, 27, 0.82);
  scrollbar-width: thin;
}

.tournament-section-head {
  display: grid;
  gap: 4px;
  padding-bottom: 4px;
}

.tournament-section-head strong {
  color: #f6fbff;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0;
}

.tournament-section-head span {
  color: #91a5b6;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.tournament-create-form label {
  display: grid;
  gap: 7px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid rgba(127, 199, 255, 0.12);
  border-radius: 8px;
  background: #182231;
}

.tournament-create-form label > span {
  color: #94a8b7;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.tournament-create-form input,
.tournament-create-form select {
  width: 100%;
  min-height: 38px;
  border: 0;
  color: #f3fbff;
  background: transparent;
  outline: none;
  font-size: 14px;
  font-weight: 850;
}

.tournament-create-form input:focus,
.tournament-create-form select:focus {
  color: #ffffff;
}

.tournament-wallet-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(64, 205, 95, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 72, 43, 0.36), rgba(12, 23, 20, 0.92));
}

.tournament-wallet-card .paid-wallet-head,
.tournament-wallet-card .paid-wallet-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tournament-wallet-card .paid-wallet-head img {
  width: 30px;
  height: 30px;
}

.tournament-wallet-card .paid-wallet-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tournament-wallet-card .paid-wallet-head strong {
  color: #f5fbff;
  font-size: 13px;
  line-height: 1;
}

.tournament-wallet-card .paid-wallet-head span {
  color: #9fceb1;
  font-size: 11px;
  font-weight: 850;
}

.tournament-wallet-card .paid-wallet-row code {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #dfffea;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-wallet-card .paid-wallet-row button,
.tournament-create-form button[type="submit"],
.tournament-widget button {
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  color: #f3fbff;
  background: #101b28;
}

.tournament-wallet-card .paid-wallet-row button {
  flex: 0 0 38px;
  width: 38px;
  height: 34px;
}

.tournament-create-form button[type="submit"] {
  min-height: 48px;
  border-color: rgba(68, 255, 110, 0.45);
  background: linear-gradient(180deg, #16a233 0%, #087a19 100%);
  font-weight: 950;
}

.tournament-browser {
  display: grid;
  grid-template-rows: auto minmax(112px, 0.38fr) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 14px;
}

.tournament-list,
.tournament-details {
  min-height: 0;
  overflow: auto;
  scrollbar-color: rgba(127, 199, 255, 0.32) rgba(8, 18, 27, 0.82);
  scrollbar-width: thin;
}

.tournament-list {
  padding-right: 4px;
}

#matchesOverlay .match-row.tournament-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  min-height: 76px;
  cursor: pointer;
}

#matchesOverlay .match-row.tournament-row.selected {
  border-color: rgba(68, 255, 110, 0.42);
  background: linear-gradient(90deg, rgba(24, 96, 52, 0.28), #182231 42%);
}

.tournament-row-actions {
  align-items: center;
}

#matchesOverlay .tournament-row-actions .tournament-bracket-button {
  min-width: 84px;
  border-color: rgba(127, 199, 255, 0.18) !important;
  background: #101b28 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

#matchesOverlay .tournament-row-actions .tournament-bracket-button::before {
  display: none !important;
}

#matchesOverlay .tournament-row-actions .tournament-action-button:not(.secondary):not(:disabled) {
  min-width: 104px;
  border-color: rgba(68, 255, 110, 0.44) !important;
  background: linear-gradient(180deg, #16a233 0%, #087a19 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 160, 26, 0.16) !important;
}

#matchesOverlay .tournament-row-actions .tournament-action-button.secondary {
  border-color: rgba(127, 199, 255, 0.18) !important;
  background: #243041 !important;
}

.tournament-details {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.tournament-details-head {
  display: grid;
  gap: 5px;
}

.tournament-details-head strong {
  color: #f6fbff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.05;
}

.tournament-details-head span {
  color: #9db0bf;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.tournament-participants {
  display: grid;
  gap: 8px;
}

.tournament-participants > strong,
.tournament-round > strong {
  color: #d8e7f3;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tournament-participant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tournament-participant-chips span {
  max-width: 180px;
  overflow: hidden;
  padding: 7px 9px;
  border: 1px solid rgba(127, 199, 255, 0.14);
  border-radius: 999px;
  color: #aebfcd;
  background: #101a26;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-participant-chips span.checked {
  border-color: rgba(68, 255, 110, 0.34);
  color: #e6ffec;
  background: rgba(18, 90, 42, 0.5);
}

.tournament-participant-chips span.eliminated {
  border-color: rgba(255, 96, 96, 0.28);
  color: #8996a5;
  background: rgba(60, 22, 30, 0.55);
}

.tournament-bracket {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-height: 168px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tournament-round {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 0 0 min(230px, 72vw);
  min-width: 0;
}

.tournament-match {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 10px;
  border: 1px solid rgba(127, 199, 255, 0.14);
  border-radius: 8px;
  background: #101a26;
}

.tournament-match.active {
  border-color: rgba(245, 212, 96, 0.45);
  background: linear-gradient(180deg, rgba(95, 75, 25, 0.32), #101a26);
}

.tournament-match.completed,
.tournament-match.bye {
  border-color: rgba(68, 255, 110, 0.22);
}

.tournament-match span {
  min-width: 0;
  overflow: hidden;
  color: #9badbd;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-match span.winner {
  color: #f3fff5;
}

.tournament-match small {
  align-self: end;
  color: #718494;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.tournament-match-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tournament-match-footer small {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-match-footer button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(127, 199, 255, 0.25);
  border-radius: 6px;
  color: #eaf6ff;
  background: rgba(14, 25, 38, 0.92);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.tournament-match-footer button.replay {
  border-color: rgba(68, 255, 110, 0.34);
  color: #eaffef;
  background: rgba(15, 73, 37, 0.72);
}

.tournament-match-footer button:hover {
  border-color: rgba(127, 199, 255, 0.5);
  transform: translateY(-1px);
}

.tournament-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 55;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(68, 255, 110, 0.28);
  border-radius: 8px;
  color: #f6fbff;
  background: linear-gradient(180deg, rgba(19, 45, 35, 0.96), rgba(10, 18, 26, 0.96));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

.tournament-widget[hidden] {
  display: none;
}

.tournament-widget strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-widget span {
  color: #a8dac1;
  font-size: 12px;
  font-weight: 900;
}

.tournament-widget.next-match {
  border-color: rgba(255, 215, 92, 0.38);
  background: linear-gradient(180deg, rgba(48, 39, 18, 0.96), rgba(10, 18, 26, 0.96));
}

.tournament-widget.next-match span {
  color: #ffe28a;
}

.tournament-widget .tournament-widget-opponent {
  color: #d8e7f0;
}

.tournament-widget .tournament-widget-timer {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 7px;
  color: #dfffea;
  background: rgba(7, 15, 24, 0.38);
  font-size: 11px;
  font-weight: 950;
}

.tournament-widget div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tournament-widget button {
  min-height: 34px;
  padding: 0 12px;
  font-weight: 950;
}

.tournament-widget button:last-child {
  border-color: rgba(68, 255, 110, 0.45);
  background: #0b8d21;
}

.tournament-checkin-card {
  border-color: rgba(68, 255, 110, 0.3);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(68, 255, 110, 0.08);
}

.tournament-checkin-card .social-request-avatar {
  color: #eaffef;
  background: linear-gradient(180deg, #16a233, #0a7118);
}

@media (max-width: 980px) {
  #matchesOverlay .players-panel.match-panel {
    width: calc(100vw - 24px) !important;
    height: calc(100vh - 24px) !important;
    max-height: calc(100vh - 24px) !important;
  }

  #matchesOverlay .match-top-row {
    grid-template-columns: 1fr auto;
  }

  #matchesOverlay .match-top-row .match-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .tournament-layout {
    grid-template-columns: 1fr;
    overflow: auto;
    padding-right: 4px;
  }

  .tournament-create-form,
  .tournament-browser {
    overflow: visible;
  }

  .tournament-browser {
    min-height: 520px;
  }
}

@media (max-width: 640px) {
  #matchesOverlay .match-top-row {
    gap: 10px;
    padding: 12px;
  }

  #matchesOverlay .match-top-row .match-tabs {
    grid-template-columns: 1fr !important;
  }

  #tournamentPane.match-pane.active {
    padding: 0 12px 12px;
  }

  #matchesOverlay .match-row.tournament-row {
    grid-template-columns: 1fr !important;
  }

  .tournament-row-actions {
    justify-content: stretch !important;
  }

  .tournament-row-actions button {
    flex: 1 1 120px;
  }

  .tournament-widget {
    right: 12px;
    bottom: 12px;
  }
}

/* Tournament split layout: player registration first, organizer creation second. */
.tournament-layout {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 370px) !important;
  align-items: stretch;
}

.tournament-player-panel,
.tournament-organizer-panel {
  min-width: 0;
  min-height: 0;
}

.tournament-browser {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 8px;
  background: #151f2b;
}

.tournament-player-grid {
  display: grid;
  grid-template-columns: minmax(292px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.tournament-list-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.12);
  border-radius: 8px;
  background: #101925;
}

.tournament-column-head {
  display: grid;
  gap: 4px;
  padding-bottom: 2px;
}

.tournament-column-head strong {
  color: #f3fbff;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}

.tournament-column-head span {
  color: #879aaa;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.tournament-create-form {
  height: 100%;
  border-color: rgba(68, 255, 110, 0.15);
  background: #121c28;
}

.tournament-create-form .tournament-section-head {
  padding: 12px;
  border: 1px solid rgba(68, 255, 110, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 82, 42, 0.28), rgba(16, 28, 40, 0.9));
}

.tournament-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tournament-form-row label {
  min-width: 0;
}

#matchesOverlay .match-row.tournament-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch;
  min-height: 128px;
  padding: 12px;
  border-color: rgba(127, 199, 255, 0.12);
  background: #141f2d;
}

#matchesOverlay .match-row.tournament-row:hover {
  border-color: rgba(127, 199, 255, 0.26);
  background: #172436;
}

#matchesOverlay .match-row.tournament-row.selected {
  border-color: rgba(68, 255, 110, 0.44);
  background: linear-gradient(90deg, rgba(20, 88, 47, 0.34), #141f2d 46%);
}

#matchesOverlay .match-row.tournament-row .match-meta {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
}

.tournament-row-kicker {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid rgba(68, 255, 110, 0.2);
  border-radius: 6px;
  color: #bdf7c9 !important;
  background: rgba(16, 83, 39, 0.32);
  font-size: 10px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tournament-badges,
.tournament-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.tournament-badge {
  display: grid;
  gap: 2px;
  min-width: 74px;
  padding: 7px 9px;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 7px;
  background: #0e1824;
}

.tournament-badge.time {
  min-width: 124px;
  border-color: rgba(245, 212, 96, 0.18);
}

.tournament-badge small {
  overflow: hidden;
  color: #708696;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tournament-badge b {
  overflow: hidden;
  color: #f2f8ff;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-row-actions {
  display: grid !important;
  align-content: center;
  justify-items: stretch;
  min-width: 128px;
}

#matchesOverlay .tournament-row-actions button,
.tournament-detail-actions button {
  min-height: 36px;
  border-radius: 8px;
  font-weight: 950;
}

.tournament-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tournament-detail-actions .tournament-action-button:not(.secondary):not(:disabled) {
  min-width: 160px;
  border-color: rgba(68, 255, 110, 0.44);
  color: #f6fff8;
  background: linear-gradient(180deg, #16a233 0%, #087a19 100%);
}

.tournament-detail-actions .tournament-action-button.secondary {
  min-width: 132px;
  border-color: rgba(127, 199, 255, 0.18);
  color: #f3fbff;
  background: #243041;
}

.tournament-details {
  grid-template-rows: auto;
  align-content: start;
  border-color: rgba(127, 199, 255, 0.12);
  background: #101925;
}

.tournament-details-head {
  padding-bottom: 2px;
}

.tournament-details-empty {
  align-self: center;
  justify-self: center;
  max-width: 360px;
  text-align: center;
}

.tournament-participants {
  padding-top: 2px;
}

.tournament-bracket {
  min-height: 210px;
  padding: 2px 2px 8px;
}

@media (max-width: 1180px) {
  .tournament-layout {
    grid-template-columns: 1fr !important;
    overflow: auto;
    padding-right: 4px;
  }

  .tournament-browser,
  .tournament-create-form {
    min-height: 520px;
    overflow: hidden;
  }

  .tournament-player-grid {
    grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .tournament-browser,
  .tournament-create-form {
    min-height: auto;
    overflow: visible;
  }

  .tournament-player-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .tournament-list-shell,
  .tournament-details {
    min-height: 300px;
  }

  .tournament-form-row {
    grid-template-columns: 1fr;
  }

  #matchesOverlay .match-row.tournament-row {
    min-height: 0;
  }

  .tournament-row-actions {
    min-width: 0;
  }
}

/* Final arena overrides. */
.matches-cta::after {
  content: none !important;
  animation: none !important;
}

.hud-row:has(#hp) {
  display: none !important;
}

.arena-bottom-hud {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.v3-hud-status {
  justify-self: start;
}

.v3-skills {
  grid-column: 2;
}

.v3-health {
  display: flex;
  align-items: center;
  width: auto;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.v3-health img,
.v3-health strong,
.v3-health small,
.v3-health > i {
  display: none !important;
}

.v3-health .v3-ammo {
  position: static;
  min-width: 54px;
  height: 30px;
  padding: 6px 9px;
  border: 1px solid #263140;
  border-radius: 7px;
  background: #151b24 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.v3-footer {
  display: none !important;
}

@media (max-width: 1500px), (max-height: 980px) {
  .game-shell:not(.sidebar-collapsed) .v3-header {
    display: none;
  }

  .game-shell:not(.sidebar-collapsed) .sidebar {
    width: var(--sidebar-width);
  }

  .game-shell:not(.sidebar-collapsed) .play-area {
    left: var(--sidebar-width) !important;
    top: 0 !important;
    width: calc(100vw - var(--sidebar-width)) !important;
    height: 100vh !important;
    aspect-ratio: auto !important;
    transform: none !important;
    border-radius: 0 !important;
  }

  .game-shell:not(.sidebar-collapsed) .play-area::before {
    border: 0;
    border-radius: 0;
  }

  .game-shell:not(.sidebar-collapsed) .play-area.match-result-open::after {
    inset: 0;
    border-radius: 0;
  }

  .game-shell:not(.sidebar-collapsed) #game {
    border-radius: 0;
  }

  .game-shell:not(.sidebar-collapsed) .arena-topbar {
    inset: 12px 14px auto 14px;
    z-index: 8;
  }

  .game-shell:not(.sidebar-collapsed) .arena-bottom-hud {
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 8;
  }
}

.matches-cta::after {
  content: none !important;
  animation: none !important;
}

.hud-row:has(#hp) {
  display: none !important;
}

.arena-bottom-hud {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.v3-hud-status {
  justify-self: start;
}

.v3-skills {
  grid-column: 2;
}

.v3-health {
  display: flex;
  align-items: center;
  width: auto;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.v3-health img,
.v3-health strong,
.v3-health small,
.v3-health > i {
  display: none !important;
}

.v3-health .v3-ammo {
  position: static;
  min-width: 54px;
  height: 30px;
  padding: 6px 9px;
  border: 1px solid #263140;
  border-radius: 7px;
  background: #151b24 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.v3-footer {
  display: none !important;
}

@media (max-width: 1500px), (max-height: 980px) {
  .game-shell:not(.sidebar-collapsed) .v3-header {
    display: none;
  }

  .game-shell:not(.sidebar-collapsed) .sidebar {
    width: var(--sidebar-width);
  }

  .game-shell:not(.sidebar-collapsed) .play-area {
    left: var(--sidebar-width) !important;
    top: 0 !important;
    width: calc(100vw - var(--sidebar-width)) !important;
    height: 100vh !important;
    aspect-ratio: auto !important;
    transform: none !important;
    border-radius: 0 !important;
  }

  .game-shell:not(.sidebar-collapsed) .play-area::before {
    border: 0;
    border-radius: 0;
  }

  .game-shell:not(.sidebar-collapsed) .play-area.match-result-open::after {
    inset: 0;
    border-radius: 0;
  }

  .game-shell:not(.sidebar-collapsed) #game {
    border-radius: 0;
  }

  .game-shell:not(.sidebar-collapsed) .arena-topbar {
    inset: 12px 14px auto 14px;
    z-index: 8;
  }

  .game-shell:not(.sidebar-collapsed) .arena-bottom-hud {
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 8;
  }
}

/* Create match final layout */
#matchesOverlay.settings-overlay.open {
  background: rgba(3, 8, 13, 0.74) !important;
  backdrop-filter: blur(5px);
}

#matchesOverlay .players-panel.match-panel {
  background: #121922 !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58) !important;
}

#matchCreateForm.match-create-form.match-pane.active {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  align-content: start !important;
  gap: 12px !important;
  padding: 0 20px 20px !important;
}

#matchCreateForm.match-create-form .match-system-field {
  display: none !important;
}

#matchCreateForm.match-create-form label:first-child {
  grid-column: 1 / -1 !important;
}

#matchCreateModeCards.match-create-mode-cards {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(120px, 1fr)) !important;
  gap: 10px !important;
  padding: 12px !important;
  max-height: none !important;
  overflow: visible !important;
  border: 1px solid rgba(127, 199, 255, 0.14) !important;
  border-radius: 8px !important;
  background: #141d28 !important;
}

#matchCreateModeCards > .match-mode-card {
  display: grid !important;
  grid-template-rows: 70px auto !important;
  min-height: 118px !important;
  height: auto !important;
  padding: 8px !important;
  align-content: start !important;
  border-radius: 8px !important;
  background: #1d2735 !important;
}

#matchCreateModeCards > .match-mode-card > img {
  width: 100% !important;
  height: 70px !important;
  max-height: 70px !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 6px !important;
  background: #07121a !important;
}

#matchCreateModeCards > .match-mode-card > .match-mode-card-body {
  min-height: 28px !important;
  padding-top: 8px !important;
}

#matchCreateModeCards .match-mode-card-body strong {
  font-size: 13px !important;
  line-height: 1.1 !important;
}

#matchCreateModeCards .match-mode-card-body small {
  margin-top: 3px !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
}

#matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
#matchCreateForm.match-create-form label:has(#matchFragLimitInput),
#matchCreateForm.match-create-form label:has(#matchPasswordInput),
#matchCreateForm .match-bots-toggle,
#matchCreateForm .match-observer-toggle,
#matchCreateForm .match-paid-toggle,
#matchCreateForm .match-organizer-toggle {
  grid-column: span 4 !important;
}

#matchCreateForm #paidMatchBlock,
#matchCreateForm button[type="submit"] {
  grid-column: 1 / -1 !important;
}

@media (max-width: 1420px) {
  #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 860px) {
  #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #matchCreateForm.match-create-form label:first-child,
  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm .match-bots-toggle,
  #matchCreateForm .match-observer-toggle,
  #matchCreateForm .match-paid-toggle,
  #matchCreateForm .match-organizer-toggle {
    grid-column: 1 / -1 !important;
  }
}

/* Match creation final layout: mode cards choose the map automatically. */
#matchCreateForm.match-create-form label:has(#matchModeSelect),
#matchCreateForm.match-create-form label:has(#matchMapSelect) {
  display: none !important;
}

#matchCreateForm .match-create-mode-cards {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 10px !important;
  padding: 12px !important;
  border-color: rgba(127, 199, 255, 0.16) !important;
  background: #141c27 !important;
}

#matchCreateForm .match-mode-card {
  grid-template-rows: 86px auto !important;
  min-height: 134px !important;
  padding: 8px !important;
  background: #1b2533 !important;
}

#matchCreateForm .match-mode-card.active {
  border-color: rgba(0, 205, 36, 0.78) !important;
  background: #142f24 !important;
}

#matchCreateForm .match-mode-card img {
  height: 86px !important;
  object-fit: contain !important;
  background: #08131d !important;
}

#matchCreateForm.match-create-form label:first-child,
#matchCreateForm.match-create-form label:has(#matchTypeSelect) {
  grid-column: span 6;
}

#matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
#matchCreateForm.match-create-form label:has(#matchFragLimitInput) {
  grid-column: span 6;
}

#matchCreateForm.match-create-form label:has(#matchPasswordInput) {
  grid-column: 1 / -1;
}

#matchCreateForm .match-bots-toggle,
#matchCreateForm .match-observer-toggle,
#matchCreateForm .match-paid-toggle {
  grid-column: span 4;
}

#matchCreateForm .match-observer-toggle:has(input:disabled) {
  opacity: 0.55;
}

/* Play game page cleanup: keep create/find compact and settings-like. */
#matchesOverlay .players-panel.match-panel {
  width: min(1320px, calc(100vw - 112px)) !important;
  height: min(820px, calc(100vh - 108px)) !important;
  max-height: min(820px, calc(100vh - 108px)) !important;
  display: grid !important;
  grid-template-rows: 78px 74px minmax(0, 1fr);
  overflow: hidden !important;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 10px;
  background: #121922;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

#matchesOverlay .players-panel.match-panel .players-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.1);
  background: #121922;
}

#matchesOverlay .players-panel.match-panel .players-head strong {
  color: #f5fbff;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

#matchesOverlay .players-panel.match-panel .players-head button {
  min-width: 86px;
  min-height: 38px;
  border: 1px solid rgba(127, 199, 255, 0.2);
  border-radius: 8px;
  color: #f3fbff;
  background: #1d2736;
}

#matchesOverlay .match-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  min-height: 0;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.1);
  background: #121922;
}

#matchesOverlay .match-tabs button,
#matchesOverlay .match-filter-tabs button {
  min-height: 46px;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  color: #a9b8c5;
  background: #1c2534;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#matchesOverlay .match-tabs button.active,
#matchesOverlay .match-filter-tabs button.active {
  border-color: rgba(0, 205, 36, 0.62);
  color: #ffffff;
  background: #009400;
  box-shadow: 0 0 0 1px rgba(0, 205, 36, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#matchesOverlay .match-pane {
  min-height: 0;
  overflow: hidden;
}

#matchFindPane.match-pane.active {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 0 20px 20px;
}

#matchesOverlay .match-browser-head,
#matchesOverlay .match-lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 8px;
  background: #16202d;
}

#matchesOverlay .match-browser-head strong,
#matchesOverlay .match-lobby-head strong {
  color: #f3fbff;
}

#matchesOverlay .match-browser-head span,
#matchesOverlay .match-lobby-head span {
  color: #9db0bf;
}

#matchesOverlay .match-filter-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
}

#matchesOverlay .match-list-pane.active,
#matchesOverlay .match-lobby-pane.match-pane.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

#matchesOverlay .match-lobby-list,
#matchesOverlay .matches-list {
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 0 4px 0 0;
  scrollbar-color: rgba(127, 199, 255, 0.32) rgba(8, 18, 27, 0.82);
  scrollbar-width: thin;
}

#matchesOverlay .match-lobby-list::-webkit-scrollbar,
#matchesOverlay .matches-list::-webkit-scrollbar,
#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar {
  width: 8px;
}

#matchesOverlay .match-lobby-list::-webkit-scrollbar-track,
#matchesOverlay .matches-list::-webkit-scrollbar-track,
#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar-track {
  background: rgba(8, 18, 27, 0.82);
}

#matchesOverlay .match-lobby-list::-webkit-scrollbar-thumb,
#matchesOverlay .matches-list::-webkit-scrollbar-thumb,
#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar-thumb {
  border: 2px solid rgba(8, 18, 27, 0.82);
  border-radius: 999px;
  background: rgba(127, 199, 255, 0.46);
}

#matchesOverlay .match-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  padding: 12px 14px;
  border: 1px solid rgba(127, 199, 255, 0.14);
  border-radius: 8px;
  background: #182231;
}

#matchesOverlay .match-row.lobby-instance {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 70px;
}

#matchesOverlay .match-row + .match-row,
#matchesOverlay .match-empty + .match-row,
#matchesOverlay .match-row + .match-empty {
  margin-top: 10px;
}

#matchesOverlay .match-row-visual {
  display: grid;
  grid-template-rows: 64px 14px;
  justify-items: center;
  align-content: center;
  gap: 6px;
  width: 136px;
  min-height: 82px;
  padding: 6px 8px;
  min-width: 0;
  border-radius: 9px;
  background: rgba(7, 15, 24, 0.64);
}

#matchesOverlay .match-row-visual img {
  width: 72px;
  height: 64px;
  object-fit: contain;
  border-radius: 6px;
  background: transparent;
}

#matchesOverlay .match-row-visual span {
  width: 100%;
  overflow: hidden;
  color: #b7c8d6;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

#matchesOverlay .match-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#matchesOverlay .match-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 999px;
  color: #ddecf4;
  background: rgba(13, 22, 32, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font: 950 10px Montserrat, Segoe UI, Arial, sans-serif;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

#matchesOverlay .match-type-badge.free {
  border-color: rgba(82, 255, 112, 0.28);
  color: #dffff0;
  background: rgba(20, 83, 45, 0.48);
}

#matchesOverlay .match-type-badge.ranked {
  border-color: rgba(127, 199, 255, 0.34);
  color: #e6f7ff;
  background: rgba(30, 74, 108, 0.50);
}

#matchesOverlay .match-type-badge.ape {
  border-color: rgba(244, 211, 94, 0.42);
  color: #fff6ca;
  background: rgba(112, 82, 16, 0.46);
}

#matchesOverlay .match-row-actions button {
  min-width: 84px;
  min-height: 36px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 8px;
  color: #f3fbff;
  background: #101b28;
}

#matchesOverlay .match-row-actions button:first-child:not(:disabled),
#matchesOverlay .match-row-actions button.match-primary-action:not(:disabled) {
  border-color: rgba(0, 205, 36, 0.42);
  background: #008f00;
}

#matchesOverlay .public-arena-slot:empty {
  display: none;
}

#matchesOverlay .match-row.public-instance {
  border-color: rgba(96, 255, 136, 0.24);
  background:
    linear-gradient(90deg, rgba(33, 125, 70, 0.2), rgba(24, 34, 49, 0.96) 34%),
    #182231;
}

#matchesOverlay .match-row-actions button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

#matchesOverlay .match-row-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(127, 199, 255, 0.34);
  background: #132235;
}

#matchesOverlay .match-row-actions button:first-child:not(:disabled),
#matchesOverlay .match-row-actions button.match-primary-action:not(:disabled) {
  min-width: 104px;
  border-color: rgba(68, 255, 110, 0.44);
  background: linear-gradient(180deg, #16a233 0%, #087a19 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 160, 26, 0.16);
}

#matchesOverlay .match-row-actions button:first-child:not(:disabled)::before,
#matchesOverlay .match-row-actions button.match-primary-action:not(:disabled)::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  opacity: 0.9;
}

#matchCreateForm.match-create-form.match-pane.active {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  height: 100%;
  max-height: none !important;
  min-height: 0;
  padding: 0 20px 20px;
  overflow: auto;
  scrollbar-color: rgba(127, 199, 255, 0.32) rgba(8, 18, 27, 0.82);
  scrollbar-width: thin;
}

#matchCreateModeCards.match-create-mode-cards {
  grid-column: 1 / -1;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(124px, 1fr)) !important;
  gap: 10px;
  max-height: none !important;
  padding: 12px;
  overflow: visible !important;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 8px;
  background: #141d28;
}

#matchCreateModeCards > .match-mode-card {
  box-sizing: border-box;
  display: grid !important;
  grid-template-rows: 66px auto !important;
  gap: 0;
  min-width: 0 !important;
  min-height: 112px !important;
  height: auto !important;
  padding: 8px !important;
  overflow: hidden !important;
  border: 1px solid rgba(127, 199, 255, 0.15) !important;
  border-radius: 8px !important;
  background: #1b2432 !important;
  cursor: pointer;
}

#matchCreateModeCards > .match-mode-card.active {
  border-color: rgba(0, 205, 36, 0.78) !important;
  background: #152d25 !important;
}

#matchCreateModeCards > .match-mode-card:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.45;
}

#matchCreateModeCards > .match-mode-card > img {
  width: 100% !important;
  height: 66px !important;
  max-height: 66px !important;
  object-fit: contain !important;
  border-radius: 6px !important;
  background: #08121b !important;
}

#matchCreateModeCards > .match-mode-card > .match-mode-card-body {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 8px 2px 0;
  text-align: left;
}

#matchCreateModeCards .match-mode-card-body strong,
#matchCreateModeCards .match-mode-card-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#matchCreateModeCards .match-mode-card-body strong {
  color: #f3fbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

#matchCreateModeCards .match-mode-card-body small {
  color: #9fb1bf;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

#matchCreateForm.match-create-form label {
  min-height: 72px;
  border-radius: 8px;
  background: #182231;
}

#matchCreateForm.match-create-form input,
#matchCreateForm.match-create-form select {
  color-scheme: dark;
  outline: none;
}

#matchCreateForm.match-create-form input:focus,
#matchCreateForm.match-create-form select:focus,
#matchesOverlay button:focus-visible {
  border-color: rgba(127, 199, 255, 0.52);
  box-shadow: 0 0 0 2px rgba(127, 199, 255, 0.12);
}

@media (max-width: 1280px) {
  #matchesOverlay .players-panel.match-panel {
    width: min(1180px, calc(100vw - 56px)) !important;
  }

  #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(124px, 1fr)) !important;
  }
}

/* Final Play Game create layout override. Keep this last so older match styles cannot stretch the mode cards. */
.players-panel.match-panel {
  width: min(1320px, calc(100vw - 96px));
  max-height: min(860px, calc(100vh - 88px));
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 10px;
  background: #121922;
}

.players-panel.match-panel .players-head,
.players-panel.match-panel .match-tabs {
  background: #121922;
}

.players-panel.match-panel .match-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 20px;
  gap: 10px;
}

#matchCreateForm.match-create-form.match-pane.active {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  max-height: calc(min(860px, 100vh - 88px) - 132px);
  padding: 0 20px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(127, 199, 255, 0.35) rgba(8, 18, 27, 0.7);
  scrollbar-width: thin;
}

#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar {
  width: 8px;
}

#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar-track {
  background: rgba(8, 18, 27, 0.7);
}

#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(127, 199, 255, 0.35);
}

#matchCreateForm .match-create-mode-cards {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 8px;
  background: #141d28;
}

#matchCreateForm .match-mode-card {
  display: grid;
  grid-template-rows: 72px auto;
  gap: 0;
  min-width: 0;
  min-height: 118px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  color: #dcebf4;
  background: #1b2432;
}

#matchCreateForm .match-mode-card:hover {
  border-color: rgba(127, 199, 255, 0.34);
  background: #202b3a;
}

#matchCreateForm .match-mode-card.active {
  border-color: rgba(0, 205, 36, 0.76);
  background: #152d25;
  box-shadow: 0 0 0 1px rgba(0, 205, 36, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#matchCreateForm .match-mode-card img {
  display: block;
  width: 100%;
  height: 72px;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #08121b;
}

#matchCreateForm .match-mode-card-body {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 2px 0;
  text-align: left;
}

#matchCreateForm .match-mode-card-body strong,
#matchCreateForm .match-mode-card-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#matchCreateForm .match-mode-card-body strong {
  color: #f3fbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

#matchCreateForm .match-mode-card-body small {
  color: #9fb1bf;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

#matchCreateForm.match-create-form label {
  grid-column: span 6;
  display: grid;
  gap: 8px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  background: #182231;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#matchCreateForm.match-create-form label:first-child {
  grid-column: span 8;
}

#matchCreateForm.match-create-form label:has(#matchTypeSelect) {
  grid-column: span 4;
}

#matchCreateForm.match-create-form label:has(#matchModeSelect) {
  display: none;
}

#matchCreateForm.match-create-form label:has(#matchMapSelect),
#matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
#matchCreateForm.match-create-form label:has(#matchFragLimitInput),
#matchCreateForm.match-create-form label:has(#matchPasswordInput) {
  grid-column: span 3;
}

#matchCreateForm.match-create-form label > span {
  color: #b8c8d5;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  text-transform: none;
}

#matchCreateForm.match-create-form input,
#matchCreateForm.match-create-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  color: #f3fbff;
  background: #08121b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-size: 14px;
}

#matchCreateForm.match-create-form input:focus,
#matchCreateForm.match-create-form select:focus {
  border-color: rgba(127, 199, 255, 0.48);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(127, 199, 255, 0.08);
}

#matchCreateForm .match-bots-toggle,
#matchCreateForm .match-observer-toggle,
#matchCreateForm .match-paid-toggle,
#matchCreateForm .match-organizer-toggle {
  grid-column: span 4;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
}

#matchCreateForm button[type="submit"] {
  grid-column: 1 / -1;
  min-height: 52px;
  margin-top: 2px;
  border-radius: 8px;
}

@media (max-width: 1180px) {
  #matchCreateForm .match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #matchCreateForm.match-create-form label:first-child,
  #matchCreateForm.match-create-form label:has(#matchTypeSelect),
  #matchCreateForm.match-create-form label:has(#matchMapSelect),
  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm .match-bots-toggle,
  #matchCreateForm .match-observer-toggle,
  #matchCreateForm .match-paid-toggle,
  #matchCreateForm .match-organizer-toggle {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .players-panel.match-panel {
    width: calc(100vw - 24px);
  }

  #matchCreateForm .match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #matchCreateForm.match-create-form label:first-child,
  #matchCreateForm.match-create-form label:has(#matchTypeSelect),
  #matchCreateForm.match-create-form label:has(#matchMapSelect),
  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm .match-bots-toggle,
  #matchCreateForm .match-observer-toggle,
  #matchCreateForm .match-paid-toggle,
  #matchCreateForm .match-organizer-toggle {
    grid-column: 1 / -1;
  }
}

/* Play Game create form polish. This sits at the end to override older match styles. */
.players-panel.match-panel {
  width: min(1320px, calc(100vw - 96px));
  max-height: min(860px, calc(100vh - 88px));
  overflow: hidden;
}

.players-panel.match-panel .players-head {
  background: #121922;
}

.match-create-form.match-pane.active {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  padding: 0 24px 24px;
  overflow-y: auto;
  scrollbar-color: rgba(127, 199, 255, 0.34) rgba(8, 18, 27, 0.7);
  scrollbar-width: thin;
}

.match-create-form.match-pane.active::-webkit-scrollbar,
.match-lobby-list::-webkit-scrollbar,
.matches-list::-webkit-scrollbar {
  width: 8px;
}

.match-create-form.match-pane.active::-webkit-scrollbar-track,
.match-lobby-list::-webkit-scrollbar-track,
.matches-list::-webkit-scrollbar-track {
  background: rgba(8, 18, 27, 0.7);
}

.match-create-form.match-pane.active::-webkit-scrollbar-thumb,
.match-lobby-list::-webkit-scrollbar-thumb,
.matches-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(127, 199, 255, 0.34);
}

.match-create-form label {
  grid-column: span 6;
  display: grid;
  gap: 8px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  background: #182231;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.match-create-form label:first-child {
  grid-column: span 8;
}

.match-create-form label:has(#matchTypeSelect) {
  grid-column: span 4;
}

.match-create-form label:has(#matchModeSelect) {
  display: none;
}

.match-create-form label:has(#matchMapSelect),
.match-create-form label:has(#matchTeamSizeSelect),
.match-create-form label:has(#matchFragLimitInput),
.match-create-form label:has(#matchPasswordInput) {
  grid-column: span 3;
}

.match-create-form label > span {
  color: #b8c8d5;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  text-transform: none;
}

.match-create-form input,
.match-create-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  color: #f3fbff;
  background: #08121b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-size: 14px;
}

.match-create-form input:focus,
.match-create-form select:focus {
  border-color: rgba(127, 199, 255, 0.48);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(127, 199, 255, 0.08);
}

.match-create-mode-cards {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 8px;
  background: #141d28;
}

.match-create-form .match-mode-card {
  display: grid;
  grid-template-rows: 76px auto;
  min-height: 126px;
  padding: 8px;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  background: #1b2432;
  overflow: hidden;
}

.match-create-form .match-mode-card:hover {
  border-color: rgba(127, 199, 255, 0.34);
  background: #202b3a;
}

.match-create-form .match-mode-card.active {
  border-color: rgba(0, 205, 36, 0.76);
  background: #152d25;
  box-shadow: 0 0 0 1px rgba(0, 205, 36, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.match-create-form .match-mode-card img {
  width: 100%;
  height: 76px;
  object-fit: contain;
  border-radius: 6px;
  background: #08121b;
}

.match-create-form .match-mode-card-body {
  display: grid;
  gap: 3px;
  padding: 8px 2px 0;
}

.match-create-form .match-mode-card-body strong {
  overflow: hidden;
  color: #f3fbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-create-form .match-mode-card-body small {
  overflow: hidden;
  color: #9fb1bf;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.match-create-form .match-bots-toggle,
.match-create-form .match-observer-toggle,
.match-create-form .match-paid-toggle,
.match-create-form .match-organizer-toggle {
  grid-column: span 4;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
  background: #182231;
}

.match-create-form .match-bots-toggle > span,
.match-create-form .match-observer-toggle > span,
.match-create-form .match-paid-toggle > span,
.match-create-form .match-organizer-toggle > span {
  align-self: center;
}

#paidMatchBlock {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 8px;
  background: #141d28;
}

#paidMatchBlock[hidden] {
  display: none;
}

#paidMatchBlock .paid-wallet-card {
  grid-column: span 6;
}

#paidMatchBlock label {
  grid-column: span 3;
  background: #182231;
}

#paidMatchBlock label:has(#matchTxHashInput) {
  grid-column: span 6;
}

#paidMatchBlock .match-organizer-toggle {
  grid-column: span 3;
}

#paidMatchHint {
  grid-column: 1 / -1;
  margin: 0;
  color: #9fb1bf;
  font-size: 11px;
  font-weight: 850;
}

.match-create-form button[type="submit"] {
  grid-column: 1 / -1;
  min-height: 52px;
  margin-top: 2px;
  border: 1px solid rgba(0, 205, 36, 0.54);
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, #009b08 0%, #008606 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 15px;
  font-weight: 950;
}

@media (max-width: 1180px) {
  .match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .match-create-form label:first-child,
  .match-create-form label:has(#matchTypeSelect),
  .match-create-form label:has(#matchMapSelect),
  .match-create-form label:has(#matchTeamSizeSelect),
  .match-create-form label:has(#matchFragLimitInput),
  .match-create-form label:has(#matchPasswordInput),
  .match-create-form .match-bots-toggle,
  .match-create-form .match-observer-toggle,
  .match-create-form .match-paid-toggle,
  .match-create-form .match-organizer-toggle {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-create-form label:first-child,
  .match-create-form label:has(#matchTypeSelect),
  .match-create-form label:has(#matchMapSelect),
  .match-create-form label:has(#matchTeamSizeSelect),
  .match-create-form label:has(#matchFragLimitInput),
  .match-create-form label:has(#matchPasswordInput),
  .match-create-form .match-bots-toggle,
  .match-create-form .match-observer-toggle,
  .match-create-form .match-paid-toggle,
  .match-create-form .match-organizer-toggle,
  #paidMatchBlock .paid-wallet-card,
  #paidMatchBlock label,
  #paidMatchBlock label:has(#matchTxHashInput) {
    grid-column: 1 / -1;
  }
}

.game-shell.sidebar-collapsed #game {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.settings-page,
.lobby-page,
.replays-page,
.leaderboard-page,
.team-page-panel,
.notifications-page-panel {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: none;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #171c25;
}

.settings-page.open,
.lobby-page.open,
.replays-page.open,
.leaderboard-page.open,
.profile-page-overlay.open,
.team-page-panel.open,
.notifications-page-panel.open {
  display: grid;
}

.legal-page-panel.open {
  place-items: start center;
  overflow: auto;
  padding: 28px;
}

.play-area.settings-page-open,
.play-area.lobby-page-open,
.play-area.replays-page-open,
.play-area.leaderboard-page-open,
.play-area.profile-page-open,
.play-area.security-page-open,
.play-area.team-page-open,
.play-area.notifications-page-open {
  border-radius: 10px;
  aspect-ratio: auto;
  height: min(840px, calc(100vh - 132px));
}

.play-area.legal-page-open {
  height: min(760px, calc(100vh - 132px));
}

.play-area.settings-page-open.settings-graphics-open {
  height: min(840px, calc(100vh - 132px));
}

.play-area.settings-page-open::before,
.play-area.lobby-page-open::before,
.play-area.replays-page-open::before,
.play-area.leaderboard-page-open::before,
.play-area.profile-page-open::before,
.play-area.security-page-open::before,
.play-area.team-page-open::before,
.play-area.notifications-page-open::before {
  border-radius: 10px;
}

.play-area.settings-page-open #game,
.play-area.settings-page-open .arena-topbar,
.play-area.settings-page-open .arena-bottom-hud,
.play-area.settings-page-open #spectatorPanel,
.play-area.settings-page-open #paidEntryOverlay,
.play-area.settings-page-open #matchPayoutLink,
.play-area.settings-page-open #matchShareBlock,
.play-area.settings-page-open #killFeed,
.play-area.profile-page-open #game,
.play-area.profile-page-open .arena-topbar,
.play-area.profile-page-open .arena-bottom-hud,
.play-area.profile-page-open #spectatorPanel,
.play-area.profile-page-open #paidEntryOverlay,
.play-area.profile-page-open #matchPayoutLink,
.play-area.profile-page-open #matchShareBlock,
.play-area.profile-page-open #killFeed,
.play-area.security-page-open #game,
.play-area.security-page-open .arena-topbar,
.play-area.security-page-open .arena-bottom-hud,
.play-area.security-page-open #spectatorPanel,
.play-area.security-page-open #paidEntryOverlay,
.play-area.security-page-open #matchPayoutLink,
.play-area.security-page-open #matchShareBlock,
.play-area.security-page-open #killFeed,
.play-area.lobby-page-open #game,
.play-area.lobby-page-open .arena-topbar,
.play-area.lobby-page-open .arena-bottom-hud,
.play-area.lobby-page-open #spectatorPanel,
.play-area.lobby-page-open #paidEntryOverlay,
.play-area.lobby-page-open #matchPayoutLink,
.play-area.lobby-page-open #matchShareBlock,
.play-area.lobby-page-open #killFeed,
.play-area.replays-page-open #game,
.play-area.replays-page-open .arena-topbar,
.play-area.replays-page-open .arena-bottom-hud,
.play-area.replays-page-open #spectatorPanel,
.play-area.replays-page-open #paidEntryOverlay,
.play-area.replays-page-open #matchPayoutLink,
.play-area.replays-page-open #matchShareBlock,
.play-area.replays-page-open #killFeed,
.play-area.leaderboard-page-open #game,
.play-area.leaderboard-page-open .arena-topbar,
.play-area.leaderboard-page-open .arena-bottom-hud,
.play-area.leaderboard-page-open #spectatorPanel,
.play-area.leaderboard-page-open #paidEntryOverlay,
.play-area.leaderboard-page-open #matchPayoutLink,
.play-area.leaderboard-page-open #matchShareBlock,
.play-area.leaderboard-page-open #killFeed,
.play-area.team-page-open #game,
.play-area.team-page-open .arena-topbar,
.play-area.team-page-open .arena-bottom-hud,
.play-area.team-page-open #spectatorPanel,
.play-area.team-page-open #paidEntryOverlay,
.play-area.team-page-open #matchPayoutLink,
.play-area.team-page-open #matchShareBlock,
.play-area.team-page-open #killFeed,
.play-area.notifications-page-open #game,
.play-area.notifications-page-open .arena-topbar,
.play-area.notifications-page-open .arena-bottom-hud,
.play-area.notifications-page-open #spectatorPanel,
.play-area.notifications-page-open #paidEntryOverlay,
.play-area.notifications-page-open #matchPayoutLink,
.play-area.notifications-page-open #matchShareBlock,
.play-area.notifications-page-open #killFeed {
  display: none !important;
}

.settings-page-shell,
.lobby-page-shell,
.replays-page-shell,
.leaderboard-page-shell,
.team-page-shell,
.notifications-page-shell,
.auth-page-shell,
.profile-page-shell,
.security-page-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 24px 26px 22px;
}

.settings-page-head,
.lobby-page-head,
.replays-page-head,
.leaderboard-page-head,
.team-page-head,
.notifications-page-head,
.auth-page-head,
.profile-page-head,
.security-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.settings-page-head div:first-child,
.lobby-page-head div:first-child,
.replays-page-head div:first-child,
.leaderboard-page-head div:first-child,
.team-page-head div:first-child,
.notifications-page-head div:first-child,
.auth-page-head div:first-child,
.profile-page-head div:first-child,
.security-page-head div:first-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.settings-page-head span,
.lobby-page-head span,
.replays-page-head span,
.leaderboard-page-head span,
.team-page-head span,
.notifications-page-head span,
.auth-page-head span,
.profile-page-head span,
.security-page-head span {
  color: #7c8490;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.settings-page-head strong,
.lobby-page-head strong,
.replays-page-head strong,
.leaderboard-page-head strong,
.team-page-head strong,
.notifications-page-head strong,
.auth-page-head strong,
.profile-page-head strong,
.security-page-head strong {
  color: #fff;
  font-size: 29px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.settings-page-actions,
.lobby-page-actions,
.replays-page-actions,
.leaderboard-page-actions,
.team-page-actions,
.notifications-page-actions,
.auth-page-actions,
.profile-page-actions,
.security-page-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.settings-page-actions button,
.settings-tabs button,
.lobby-page-actions button,
.replays-page-actions button,
.leaderboard-page-actions button,
.lobby-tabs button,
.replays-tabs button,
.leaderboard-tabs button,
.team-page-actions button,
.notifications-page-actions button,
.auth-page-actions button,
.profile-page-actions button,
.security-page-actions button {
  height: 36px;
  border: 1px solid #303946;
  border-radius: 7px;
  color: var(--v3-clean-muted);
  background: #202635;
  font: 950 13px Montserrat, Segoe UI, Arial, sans-serif;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.settings-page-actions button,
.lobby-page-actions button,
.replays-page-actions button,
.leaderboard-page-actions button,
.team-page-actions button,
.notifications-page-actions button,
.auth-page-actions button,
.profile-page-actions button,
.security-page-actions button {
  min-width: 82px;
  padding: 0 14px;
}

.settings-page-actions button:first-child {
  color: #c7d4e4;
}

.settings-page-actions button:last-child {
  color: #fff;
  border-color: rgba(127, 199, 255, 0.28);
}

.settings-page-actions button:hover,
.settings-tabs button:hover,
.lobby-tabs button:hover,
.replays-tabs button:hover,
.leaderboard-tabs button:hover,
.replays-page-actions button:hover,
.leaderboard-page-actions button:hover,
.team-page-actions button:hover,
.notifications-page-actions button:hover,
.auth-page-actions button:hover,
.profile-page-actions button:hover,
.security-page-actions button:hover {
  color: #fff;
  border-color: #465162;
  background: #252c3a;
}

.settings-tabs,
.lobby-tabs,
.replays-tabs,
.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding: 6px;
  border: 1px solid #2d3543;
  border-radius: 9px;
  background: #151b24;
}

.settings-tabs button.active,
.lobby-tabs button.active,
.replays-tabs button.active,
.leaderboard-tabs button.active {
  color: #fff;
  border-color: rgba(0, 200, 10, 0.38);
  background: linear-gradient(180deg, #078907, #007a00);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.settings-page-body,
.lobby-page-body,
.replays-page-body,
.leaderboard-page-body,
.team-page-body,
.notifications-page-body,
.auth-page-body,
.profile-page-body,
.security-page-body {
  min-width: 0;
  min-height: 0;
  margin-top: 14px;
  overflow: hidden auto;
  padding-right: 6px;
  scrollbar-color: #3a4556 #151b24;
  scrollbar-width: thin;
}

.lobby-page-body {
  display: grid;
  overflow: hidden;
  padding-right: 0;
}

.replays-tabs,
.leaderboard-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.replays-page-body,
.leaderboard-page-body {
  display: grid;
  overflow: hidden;
  padding-right: 0;
}

.replays-card,
.leaderboard-board {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  border: 1px solid #303946;
  border-radius: 9px;
  background: #202635;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.leaderboard-board {
  grid-template-rows: auto minmax(0, 1fr);
}

.replays-card-head,
.leaderboard-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #2b3442;
}

.replays-card-head div,
.leaderboard-board-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.replays-card-head strong,
.leaderboard-board-head strong {
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
  text-shadow: var(--v3-figma-shadow);
}

.replays-card-head span,
.leaderboard-board-head span {
  color: #a9bfd0;
  font-size: 12px;
  font-weight: 850;
}

.replays-card-head small,
.leaderboard-board-head small {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 7px;
  color: #cfe4f5;
  background: #151b24;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.replays-list,
.leaderboard-page .leaderboard-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  overflow: hidden auto;
  padding-right: 4px;
  scrollbar-color: #3a4556 #151b24;
  scrollbar-width: thin;
}

.leaderboard-page .leaderboard-list {
  height: auto;
}

.replays-page .history-row,
.leaderboard-page .leader-row {
  border: 1px solid #303946;
  border-radius: 9px;
  background: #171f2a;
  box-shadow: inset 3px 0 0 rgba(127, 199, 255, 0.22);
}

.replays-page .history-row {
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto) 110px;
  min-height: 74px;
  padding: 12px;
}

.replays-page .history-row:hover,
.leaderboard-page .leader-row:hover {
  border-color: #3b4758;
  background: #1b2532;
}

.replays-page .history-meta span {
  color: #9eb1c2;
  font-size: 12px;
  font-weight: 850;
}

.replays-page .history-tags {
  justify-content: flex-end;
}

.replays-page .history-tags span,
.leaderboard-page .leader-badges small,
.leaderboard-page .leader-badges a {
  border-color: rgba(127, 199, 255, 0.16);
  border-radius: 7px;
  color: #cfe4f5;
  background: #111a24;
}

.replays-page .history-row > button {
  height: 36px;
  border: 1px solid rgba(0, 200, 10, 0.38);
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(180deg, #078907, #007a00);
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
}

.replays-page .history-row > button:hover {
  filter: brightness(1.08);
}

.replays-pagination {
  grid-template-columns: 110px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 10px;
}

.replays-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid #324157;
  border-radius: 8px;
  color: #e7f0f8;
  background: #1d2736;
  cursor: pointer;
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
}

.replays-pagination button:hover:not(:disabled) {
  border-color: #46607f;
  background: #243247;
}

.replays-pagination button:disabled {
  opacity: 0.45;
  cursor: default;
}

.replays-pagination span {
  color: #9fb3c4;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.leaderboard-page .leader-row {
  display: grid;
  grid-template-columns: 38px 42px minmax(0, 1fr) minmax(300px, auto);
  align-items: center;
  column-gap: 8px;
  row-gap: 10px;
  min-height: 66px;
  padding: 10px 12px;
}

.leaderboard-page .leader-row > strong:first-child {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #dff0ff;
  background: #101924;
}

.leader-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(127, 199, 255, 0.24);
  border-radius: 9px;
  object-fit: cover;
  background: #0c151f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 16px rgba(0, 0, 0, 0.24);
}

.leaderboard-page .leader-row > span:not(.leader-badges) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.leaderboard-page .leader-row > span:not(.leader-badges) > strong {
  color: #fff;
  font-size: 15px;
  font-weight: 950;
}

.leaderboard-page .leader-row small {
  color: #9fb3c4;
  font-size: 11px;
  font-weight: 850;
}

.team-page-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.auth-page-shell {
  width: min(1280px, calc(100vw - 72px));
  height: min(840px, calc(100vh - 72px));
  border: 1px solid #273342;
  border-radius: 10px;
  background: #161b24;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.auth-page-shell {
  width: min(1160px, calc(100vw - 72px));
  height: auto;
}

.profile-page-shell,
.security-page-shell {
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-page-body {
  display: grid;
  grid-template-columns: minmax(360px, 0.98fr) minmax(340px, 0.9fr);
  gap: 14px;
  overflow: visible;
  padding-right: 0;
}

.auth-info-card,
.auth-page-form,
.security-avatar-card,
.security-account-card,
.profile-hero-card,
.profile-stat-card,
.profile-rank-card,
.profile-achievement-card {
  border: 1px solid #303946;
  border-radius: 9px;
  background: #202635;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.auth-info-card {
  --auth-accent: #31e741;
  --auth-accent-rgb: 49, 231, 65;
  position: relative;
  display: grid;
  grid-template-rows: minmax(300px, 1fr) auto;
  gap: 24px;
  min-height: 560px;
  padding: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(17, 29, 39, 0.98), rgba(8, 13, 20, 0.99));
}

.auth-overlay[data-auth-mode="login"] .auth-info-card {
  --auth-accent: #58bfff;
  --auth-accent-rgb: 88, 191, 255;
}

.auth-overlay[data-auth-mode="reset"] .auth-info-card {
  --auth-accent: #f1c247;
  --auth-accent-rgb: 241, 194, 71;
}

.auth-info-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(118, 154, 185, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(118, 154, 185, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.42;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.76) 58%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.76) 58%, transparent 100%);
  pointer-events: none;
}

.auth-info-card::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--auth-accent-rgb), 0.46), transparent);
  pointer-events: none;
}

.auth-info-visual,
.auth-info-copy {
  position: relative;
  z-index: 1;
}

.auth-info-visual {
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(74, 93, 114, 0.64);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--auth-accent-rgb), 0.13), rgba(18, 29, 41, 0.78) 45%, rgba(7, 12, 18, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

.auth-info-visual::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(var(--auth-accent-rgb), 0.24);
  border-radius: 6px;
}

.auth-info-visual::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--auth-accent-rgb), 0.54), transparent);
}

.auth-circuit,
.auth-node,
.auth-lock-mark {
  position: absolute;
  display: block;
}

.auth-circuit {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--auth-accent-rgb), 0.8), transparent);
}

.auth-circuit-a {
  left: 8%;
  top: 28%;
  width: 43%;
}

.auth-circuit-b {
  right: 10%;
  top: 38%;
  width: 30%;
}

.auth-circuit-c {
  left: 17%;
  bottom: 25%;
  width: 58%;
}

.auth-node {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(var(--auth-accent-rgb), 0.88);
  border-radius: 3px;
  background: #101a24;
  box-shadow: 0 0 16px rgba(var(--auth-accent-rgb), 0.2);
}

.auth-node-a {
  left: 14%;
  top: 24%;
}

.auth-node-b {
  right: 24%;
  top: 35%;
}

.auth-node-c {
  left: 27%;
  bottom: 21%;
}

.auth-lock-mark {
  left: 50%;
  top: 54%;
  width: 104px;
  height: 78px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(var(--auth-accent-rgb), 0.9);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(var(--auth-accent-rgb), 0.2), rgba(8, 13, 20, 0.92));
  box-shadow:
    0 0 0 8px rgba(var(--auth-accent-rgb), 0.05),
    0 20px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.auth-lock-mark::before {
  content: "";
  position: absolute;
  left: 23px;
  right: 23px;
  top: -40px;
  height: 48px;
  border: 8px solid rgba(var(--auth-accent-rgb), 0.78);
  border-bottom: 0;
  border-radius: 34px 34px 0 0;
}

.auth-lock-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 28px;
  width: 12px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 -12px 0 -4px rgba(255, 255, 255, 0.88);
}

.auth-info-copy {
  display: grid;
  gap: 10px;
}

.auth-info-copy > span {
  color: var(--auth-accent);
  font-size: 12px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
}

.auth-info-card strong,
.security-avatar-card strong,
.security-account-card h3 {
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.05;
  text-shadow: var(--v3-figma-shadow);
}

.auth-info-card p,
.security-avatar-card p,
.profile-page-summary,
.profile-stat-card small,
.profile-rank-card small,
.profile-achievement-card small {
  margin: 0;
  color: #a9bed2;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.auth-page-form {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px 32px;
  border-color: #263241;
  background:
    linear-gradient(180deg, rgba(22, 29, 40, 0.96), rgba(13, 19, 27, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 0 0 1px rgba(6, 11, 17, 0.28);
}

.auth-page-form label,
.security-form label {
  display: grid;
  gap: 9px;
  color: #c7d6e5;
  font-size: 13px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
}

.auth-page-form label span {
  color: #d8e6f1;
  letter-spacing: 0.2px;
}

.auth-page-form input,
.security-form input {
  width: 100%;
  height: 56px;
  min-width: 0;
  border: 1px solid #26394f;
  border-radius: 9px;
  color: #fff;
  background:
    linear-gradient(180deg, #0b141d 0%, #080f16 100%);
  padding: 0 16px;
  font: 900 16px Montserrat, Segoe UI, Arial, sans-serif;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.12);
}

.auth-page-form input:-webkit-autofill,
.auth-page-form input:-webkit-autofill:hover,
.auth-page-form input:-webkit-autofill:focus,
.security-form input:-webkit-autofill,
.security-form input:-webkit-autofill:hover,
.security-form input:-webkit-autofill:focus,
.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
  border-color: #26394f;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  box-shadow:
    0 0 0 1000px #08121b inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.12);
  transition: background-color 9999s ease-out, color 9999s ease-out;
}

.auth-page-form input:focus,
.security-form input:focus {
  border-color: rgba(77, 187, 255, 0.72);
  background: #0a151f;
  box-shadow:
    0 0 0 3px rgba(77, 187, 255, 0.09),
    0 0 24px rgba(77, 187, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-page-form .auth-wallet-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 14px 0 16px;
  border: 1px solid #26394f;
  border-radius: 9px;
  background: linear-gradient(180deg, #0b141d 0%, #081018 100%);
  cursor: pointer;
}

.auth-page-form .auth-wallet-toggle span:first-child {
  color: #d8e6f1;
  letter-spacing: 0.2px;
}

.auth-page-form .auth-wallet-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.auth-page-form .auth-wallet-switch {
  position: relative;
  flex: 0 0 auto;
  width: 54px;
  height: 30px;
  border: 1px solid #344962;
  border-radius: 999px;
  background: #07111a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-page-form .auth-wallet-switch::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #a9bdd0;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-page-form .auth-wallet-toggle input:checked + .auth-wallet-switch {
  border-color: #16c72d;
  background: #008f12;
  box-shadow:
    0 0 16px rgba(0, 210, 32, 0.18),
    inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.auth-page-form .auth-wallet-toggle input:checked + .auth-wallet-switch::after {
  transform: translateX(24px);
  background: #eaffea;
  box-shadow: 0 0 12px rgba(53, 255, 83, 0.3);
}

.auth-page-form button,
.security-form button,
.security-avatar-upload {
  height: 54px;
  border: 1px solid #2b3b50;
  border-radius: 9px;
  color: #fff;
  background: #17202c;
  font: 950 15px Montserrat, Segoe UI, Arial, sans-serif;
  text-shadow: var(--v3-figma-shadow);
}

.auth-page-form button[type="submit"],
.security-form button[type="submit"],
.security-avatar-upload {
  border-color: rgba(49, 231, 65, 0.34);
  background: #078b0a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.auth-page-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.auth-page-actions .auth-link-button {
  grid-column: 1 / -1;
  justify-self: center;
  width: auto;
  min-width: 220px;
  height: 36px;
  margin-top: 18px;
  border: 0;
  color: #b9dfff;
  background: transparent;
  box-shadow: none;
}

.auth-page-actions .auth-link-button:hover {
  color: #fff;
  background: rgba(127, 199, 255, 0.07);
}

.auth-error {
  min-height: 18px;
  color: #ff9cae;
  font-size: 12px;
  font-weight: 850;
}

.security-page-body {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  padding-right: 0;
}

.security-avatar-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  align-content: start;
  gap: 18px;
  min-height: 100%;
  padding: 22px;
  border-color: #263446;
  background:
    radial-gradient(circle at 50% 16%, rgba(49, 231, 65, 0.12), transparent 34%),
    linear-gradient(180deg, #1d2534 0%, #121923 100%);
}

.security-avatar-frame {
  display: grid;
  place-items: center;
  width: 184px;
  height: 184px;
  margin: 2px auto 0;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(9, 18, 28, 0.96), rgba(8, 13, 20, 0.98));
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.security-avatar-preview {
  width: 146px;
  height: 146px;
  border: 0;
  border-radius: 14px;
  background: #0c1520;
  object-fit: cover;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.32));
}

.security-avatar-copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.security-avatar-copy h3 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.security-avatar-copy p {
  max-width: 240px;
  margin: 0 auto;
  color: #9fb5c9;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.security-avatar-upload {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 2px;
  overflow: hidden;
  border-color: rgba(49, 231, 65, 0.28);
  background:
    linear-gradient(180deg, #078c0a, #057806);
}

.security-avatar-upload:hover {
  background:
    linear-gradient(180deg, #0a9f0d, #078407);
  border-color: rgba(49, 231, 65, 0.46);
}

.security-avatar-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.security-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
  min-height: 100%;
  padding: 22px;
  border: 1px solid #263446;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(17, 25, 35, 0.98), rgba(10, 16, 24, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 0 0 1px rgba(6, 11, 17, 0.25);
}

.security-form-head {
  display: grid;
  grid-column: 1 / -1;
  gap: 5px;
  padding: 0 0 4px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.1);
}

.security-form-head h3 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.security-form-head span {
  color: #8ea5ba;
  font-size: 12px;
  font-weight: 850;
}

.security-form label {
  min-width: 0;
}

.security-form label span {
  color: #b8cbe0;
}

.security-form input:disabled {
  color: #a7b8ca;
  background:
    linear-gradient(180deg, #0b131c 0%, #080e15 100%);
  opacity: 1;
}

.security-wide-field {
  grid-column: 1 / -1;
}

.security-form label:nth-of-type(3),
.security-form .auth-error,
.security-form-actions {
  grid-column: 1 / -1;
}

.security-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
}

.security-form-actions button {
  min-width: 132px;
  padding: 0 22px;
}

.security-form #logoutButton {
  border-color: rgba(255, 141, 107, 0.34);
  color: #ffd5dd;
  background:
    linear-gradient(180deg, rgba(82, 28, 40, 0.72), rgba(43, 18, 26, 0.96));
}

.security-form #logoutButton:hover {
  border-color: rgba(255, 141, 107, 0.56);
  background:
    linear-gradient(180deg, rgba(103, 35, 50, 0.82), rgba(53, 21, 31, 0.98));
}

.profile-page-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 0;
  scrollbar-color: #3a4556 #151b24;
  scrollbar-width: thin;
}

.profile-page-overlay.open,
.security-page-overlay.open {
  place-items: stretch;
  padding: 0;
}

.profile-hero-card-old,
.profile-hero-card-old + #profileModeStatsOld,
.profile-section-old,
.profile-section:has(#profileRankCollectionOld),
.profile-section:has(#profileAchievementGridOld),
#profileModeStatsOld {
  display: none !important;
}

.profile-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-color: #263446;
  background: #17202b;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-page-avatar-frame {
  display: grid;
  place-items: center;
  width: 102px;
  height: 116px;
  flex: 0 0 auto;
  clip-path: polygon(50% 0, 94% 24%, 94% 72%, 50% 100%, 6% 72%, 6% 24%);
  background: #0b141d;
  box-shadow: inset 0 0 0 1px rgba(127, 199, 255, 0.24), 0 14px 24px rgba(0, 0, 0, 0.24);
}

.profile-page-avatar,
#profilePageAvatar {
  width: 96px;
  height: 110px;
  border: 0;
  border-radius: 0;
  clip-path: polygon(50% 0, 94% 24%, 94% 72%, 50% 100%, 6% 72%, 6% 24%);
  background: #101821;
  object-fit: cover;
}

.profile-identity-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-hero-status {
  color: #31e741;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.profile-identity-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.profile-identity-copy p {
  margin: 0;
  color: #a9bed2;
  font-size: 13px;
  font-weight: 900;
}

.profile-social-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.profile-social-actions a,
.profile-social-actions button {
  display: inline-grid;
  place-items: center;
  min-width: 118px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #2d4055;
  border-radius: 7px;
  color: #cfe4f6;
  background: #111b25;
  font-size: 11px;
  font-weight: 950;
  text-decoration: none;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.profile-social-actions a {
  min-width: 0;
  color: #9fd3ff;
  border-color: rgba(127, 199, 255, 0.28);
}

.profile-social-actions button:last-child {
  border-color: rgba(49, 231, 65, 0.34);
  color: #eaffef;
  background: rgba(0, 151, 0, 0.24);
}

.profile-social-actions button:disabled {
  opacity: 0.52;
  cursor: default;
}

.profile-hero-rank {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 10px 14px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #263446;
  border-radius: 9px;
  background: #101821;
}

.profile-hero-rank img {
  grid-row: span 2;
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.profile-hero-rank span {
  justify-self: start;
  align-self: end;
  color: #879db3;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-hero-rank b {
  justify-self: start;
  align-self: start;
  color: #fff;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.profile-content-grid {
  display: block;
  min-height: 0;
}

.profile-tabs,
.profile-mode-tabs {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid #2b384a;
  border-radius: 9px;
  background: #111923;
}

.profile-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-mode-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 14px;
}

.profile-tabs button,
.profile-mode-tabs button {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #303b4d;
  border-radius: 7px;
  color: #aebccd;
  background: #202837;
  font-size: 12px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.profile-tabs button.active,
.profile-mode-tabs button.active {
  border-color: rgba(49, 231, 65, 0.42);
  color: #fff;
  background: #009700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.profile-panel {
  display: none;
}

.profile-panel.active {
  display: block;
}

.profile-section {
  min-width: 0;
  border: 1px solid #303946;
  border-radius: 9px;
  background: #17202b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.profile-core-section,
.profile-mode-section,
.profile-ranks-section,
.profile-achievements-section {
  padding: 16px;
}

.profile-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.10);
}

.profile-section-head h3 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.profile-section-head span {
  color: #8ea5ba;
  font-size: 11px;
  font-weight: 900;
}

.profile-core-stats {
  display: grid;
  margin-top: 6px;
}

.profile-core-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.08);
}

.profile-core-row:last-child {
  border-bottom: 0;
}

.profile-core-code {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #2c4056;
  border-radius: 7px;
  color: #9fd3ff;
  background: #0f1822;
  font-size: 9px;
  font-weight: 950;
}

.profile-core-row b {
  color: #d6e2ef;
  font-size: 13px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
}

.profile-core-row strong {
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

.profile-stat-grid,
.profile-rank-collection,
.profile-achievement-grid {
  display: grid;
  gap: 10px;
}

.profile-stat-grid {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.profile-stat-card,
.profile-rank-card,
.profile-achievement-card {
  padding: 14px;
  border: 1px solid #28384b;
  border-radius: 8px;
  background: #151e29;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.profile-stat-card b {
  color: #fff;
  font-size: 16px;
  font-weight: 950;
}

.profile-stat-card > span {
  display: block;
  color: #a9bed2;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.profile-stat-card > strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.profile-stat-card > p {
  max-width: 760px;
  margin: 10px 0 0;
  color: #a9bed2;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.profile-stat-card > em,
.profile-rank-card > span,
.profile-achievement-card > em {
  display: block;
  margin-top: 8px;
  color: #8fa9c4;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}

.profile-stat-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.profile-stat-values span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(127, 199, 255, 0.10);
  border-radius: 7px;
  background: #121b25;
  color: #a9bed2;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-stat-values small {
  color: #8398ae;
  font-size: 9px;
  font-weight: 950;
}

.profile-stat-values strong {
  color: #fff;
  font-size: 16px;
}

.profile-rank-collection {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  margin-top: 14px;
}

.profile-rank-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 156px;
  text-align: center;
}

.profile-rank-card.locked {
  opacity: 0.54;
  filter: saturate(0.65);
}

.profile-rank-card img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.profile-rank-card small {
  color: #8ea5ba;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.profile-rank-card b,
.profile-rank-card strong,
.profile-achievement-card b,
.profile-achievement-card strong {
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.profile-achievement-grid {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.profile-achievement-group {
  display: grid;
  gap: 10px;
}

.profile-achievement-group + .profile-achievement-group {
  margin-top: 16px;
}

.profile-achievement-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(127, 199, 255, 0.10);
}

.profile-achievement-group-head strong {
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
}

.profile-achievement-group-head span {
  color: #94aac0;
  font-size: 11px;
  font-weight: 900;
}

.profile-achievement-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.profile-achievement-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 78px;
}

.profile-achievement-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.profile-achievement-icon img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38));
}

.profile-achievement-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-achievement-copy strong,
.profile-achievement-copy small,
.profile-achievement-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-achievement-card.locked {
  opacity: 0.58;
}

.profile-achievement-card.locked .profile-achievement-icon img {
  filter: grayscale(0.9) saturate(0.35) opacity(0.72) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.34));
}

.profile-achievement-card.unlocked .profile-achievement-icon img {
  filter: saturate(1.14) drop-shadow(0 0 10px rgba(49, 231, 65, 0.24)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38));
}

@media (max-width: 1180px) {
  .profile-hero-card,
  .profile-tabs,
  .profile-mode-tabs {
    grid-template-columns: 1fr;
  }
}

.team-page-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 14px;
  min-height: 0;
}

.team-page-intro {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid #303946;
  border-radius: 8px;
  background: #202635;
}

.team-page-intro strong {
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
  text-shadow: var(--v3-figma-shadow);
}

.team-page-intro p {
  max-width: 720px;
  margin: 0;
  color: #b9c6d4;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.legal-page-shell {
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, 100%);
  max-width: none;
  min-height: 0;
  padding: 0;
}

.legal-page-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  margin-top: 16px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-color: #3a4556 #151b24;
  scrollbar-width: thin;
}

.legal-section {
  padding: 18px 20px;
  border: 1px solid rgba(104, 144, 184, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(27, 39, 55, 0.96), rgba(19, 31, 45, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.legal-section h3 {
  margin: 0 0 10px;
  color: #f2f8ff;
  font: 950 22px Montserrat, Segoe UI, Arial, sans-serif;
  letter-spacing: 0;
  text-shadow: var(--v3-figma-shadow);
}

.legal-section p {
  max-width: 980px;
  margin: 0;
  color: #b3c8dc;
  font: 800 14px Montserrat, Segoe UI, Arial, sans-serif;
  line-height: 1.7;
}

.legal-section p + p {
  margin-top: 10px;
}

.notifications-page-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.notifications-page-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding-right: 0;
}

.notifications-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #303946;
  border-radius: 8px;
  background: #202635;
}

.notifications-hero div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.notifications-hero strong {
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.05;
  text-shadow: var(--v3-figma-shadow);
}

.notifications-hero p {
  margin: 0;
  color: var(--v3-clean-muted);
  font-size: 13px;
  font-weight: 800;
}

.notifications-hero > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(0, 200, 10, 0.38);
  border-radius: 8px;
  color: #fff;
  background: #152b21;
  font-size: 13px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
  white-space: nowrap;
}

.notifications-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
}

.notifications-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  border: 1px solid #303946;
  border-radius: 10px;
  background: #1b2029;
}

.notifications-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(48, 57, 70, 0.72);
}

.notifications-card-head span {
  color: var(--v3-clean-muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.notifications-card-head strong {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #303946;
  border-radius: 7px;
  color: #fff;
  background: #111923;
  font-size: 14px;
  font-weight: 950;
}

.notifications-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: hidden auto;
  padding-right: 4px;
  scrollbar-color: #3a4556 #151b24;
  scrollbar-width: thin;
}

.notifications-request {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #303946;
  border-left: 3px solid #00c80a;
  border-radius: 8px;
  background: #202635;
}

.notifications-request.party {
  border-left-color: #7fc7ff;
}

.notifications-request-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 200, 10, 0.28);
  border-radius: 8px;
  color: #fff;
  background: #111a24;
  font-size: 15px;
  font-weight: 950;
  text-shadow: var(--v3-figma-shadow);
}

.notifications-request.party .notifications-request-icon {
  border-color: rgba(127, 199, 255, 0.32);
}

.notifications-request-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notifications-request-body span {
  color: #00c80a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.notifications-request.party .notifications-request-body span {
  color: #7fc7ff;
}

.notifications-request-body strong {
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-shadow: var(--v3-figma-shadow);
  white-space: nowrap;
}

.notifications-request-body small {
  overflow: hidden;
  color: var(--v3-clean-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notifications-request-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notifications-request-actions button {
  min-width: 82px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #303946;
  border-radius: 7px;
  color: #cfe0f1;
  background: #111923;
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.notifications-request-actions button:hover {
  color: #fff;
  border-color: #465162;
  background: #252c3a;
}

.notifications-request-actions .accept {
  color: #fff;
  border-color: rgba(0, 200, 10, 0.38);
  background: #078907;
}

.notifications-request-actions .accept:hover {
  background: #009a08;
}

.notifications-empty {
  display: grid;
  place-items: center;
  min-height: 78px;
  padding: 12px;
  border: 1px dashed #303946;
  border-radius: 8px;
  color: var(--v3-clean-muted);
  background: #151b24;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.team-member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  min-width: 0;
}

.team-member-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  border: 1px solid #303946;
  border-radius: 8px;
  background: #202635;
}

.team-member-art {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid #303946;
  background: #151b24;
}

.team-member-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 70px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(32, 38, 53, 0.74) 0%, rgba(32, 38, 53, 0.38) 46%, rgba(32, 38, 53, 0) 78%),
    linear-gradient(180deg, rgba(32, 38, 53, 0) 0%, rgba(32, 38, 53, 0.58) 100%);
}

.team-member-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center bottom;
}

.team-member-info {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 14px 16px;
}

.team-member-info > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.team-member-info span {
  color: #00c80a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: var(--v3-figma-shadow);
}

.team-member-info strong {
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.team-member-info p {
  margin: 0;
  color: #8a909b;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.team-member-info a {
  flex: 0 0 auto;
  min-width: 132px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #303946;
  border-radius: 7px;
  color: #cfe0f1;
  background: #111a24;
  font: 950 13px Montserrat, Segoe UI, Arial, sans-serif;
  text-decoration: none;
  text-shadow: var(--v3-figma-shadow);
  cursor: pointer;
}

.team-member-info a:hover {
  color: #fff;
  border-color: #465162;
  background: #252c3a;
}

.play-area.settings-graphics-open .settings-page-body {
  overflow: visible;
}

.play-area.settings-graphics-open .settings-section.active {
  min-height: auto;
}

.settings-section,
.lobby-section {
  display: none;
  align-content: start;
  gap: 15px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid #303946;
  border-radius: 10px;
  background: #1b2029;
  box-shadow: none;
}

.lobby-section {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.lobby-section[data-lobby-panel="chat"] {
  gap: 12px;
  padding: 14px;
}

.lobby-section[data-lobby-panel="chat"] .lobby-section-head {
  min-height: 42px;
  padding-right: 200px;
  padding-bottom: 11px;
}

.settings-section.active,
.lobby-section.active {
  display: grid;
}

.settings-section-head,
.lobby-section-head {
  display: grid;
  gap: 6px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.settings-section-head strong,
.lobby-section-head strong {
  color: #fff;
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.settings-section-head span,
.lobby-section-head span {
  color: var(--v3-clean-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lobby-chat-layout {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 9px;
  border: 1px solid #303946;
  border-radius: 9px;
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 200, 10, 0.07), transparent 30%),
    #151b24;
}

.lobby-chat-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.lobby-chat-toolbar label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 30px;
  min-width: 72px;
  padding: 0 8px;
  border: 1px solid #303946;
  border-radius: 7px;
  color: #c8d5df;
  background: #202635;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.lobby-chat-toolbar input {
  accent-color: #04c910;
}

.lobby-chat-messages,
.lobby-players-list,
.lobby-friend-list,
.lobby-party-panel {
  min-height: 0;
  overflow: hidden auto;
  border: 1px solid #303946;
  border-radius: 8px;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 200, 10, 0.08), transparent 28%),
    #151b24;
  scrollbar-color: #3a4556 #151b24;
  scrollbar-width: thin;
}

.lobby-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  max-height: 100%;
  overflow: hidden auto;
  padding: 4px;
  border: 0;
  background: transparent;
}

.lobby-chat-messages .chat-line {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(69, 81, 99, 0.75);
  border-radius: 6px;
  background: rgba(32, 38, 53, 0.56);
  font-size: 13px;
  line-height: 1.25;
}

.lobby-chat-messages .system-line {
  border-color: rgba(76, 255, 82, 0.18);
  background: rgba(14, 42, 26, 0.36);
}

.lobby-chat-form,
.lobby-friend-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  align-self: end;
  z-index: 2;
  min-height: 56px;
  padding: 7px;
  border: 1px solid #303946;
  border-radius: 8px;
  background: #101720;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 -12px 22px rgba(8, 12, 18, 0.12);
}

.lobby-chat-form input,
.lobby-friend-form input {
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  border: 1px solid #263140;
  border-radius: 7px;
  color: #e9f1f6;
  background: #151b24;
  font: 850 13px Montserrat, Segoe UI, Arial, sans-serif;
  outline: none;
}

.lobby-chat-form input:focus,
.lobby-friend-form input:focus {
  border-color: rgba(0, 200, 10, 0.45);
}

.lobby-chat-form button,
.lobby-friend-form button,
.lobby-action-button {
  height: 40px;
  border: 1px solid rgba(0, 200, 10, 0.35);
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(180deg, #078907, #007a00);
  font: 950 12px Montserrat, Segoe UI, Arial, sans-serif;
  cursor: pointer;
  text-shadow: var(--v3-figma-shadow);
}

.lobby-friend-form {
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  padding: 7px;
  overflow: hidden;
  background: #101720;
}

.lobby-friend-form input {
  height: 42px;
}

.lobby-friend-form button {
  width: 100%;
  min-width: 0;
  height: 42px;
  border-color: rgba(68, 199, 91, 0.50);
  background: linear-gradient(180deg, rgba(42, 134, 58, 0.92), rgba(20, 88, 39, 0.94));
}

.lobby-social-card .friend-row {
  grid-template-columns: 66px minmax(0, 1fr) minmax(0, auto);
  gap: 12px;
  min-height: 88px;
  padding: 10px 12px;
}

.lobby-social-card .friend-rank img {
  width: 50px;
  height: 50px;
}

.lobby-social-card .friend-row button {
  min-width: 96px;
  min-height: 40px;
  padding: 0 12px;
}

.lobby-social-card .friend-party-status {
  min-height: 34px;
  padding: 0 12px;
}

.lobby-players-list {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  padding: 9px;
}

.lobby-player-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 70px;
  padding: 9px 12px 9px 9px;
  border: 1px solid rgba(52, 72, 86, 0.78);
  border-radius: 8px;
  background:
    radial-gradient(circle at 9% 0%, rgba(127, 199, 255, 0.10), transparent 34%),
    linear-gradient(90deg, rgba(76, 255, 82, 0.045), rgba(17, 25, 35, 0.96) 42%, rgba(14, 21, 30, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 3px 0 0 var(--player-accent, #7fc7ff),
    0 8px 18px rgba(0, 0, 0, 0.10);
}

.lobby-player-row.own {
  border-color: rgba(76, 255, 82, 0.28);
  background:
    radial-gradient(circle at 7% 0%, rgba(76, 255, 82, 0.15), transparent 36%),
    linear-gradient(90deg, rgba(76, 255, 82, 0.13), rgba(17, 25, 35, 0.96) 52%, rgba(14, 21, 30, 0.98));
}

.lobby-player-row.down {
  opacity: 0.68;
}

.lobby-player-rank {
  display: grid;
  grid-template-rows: 44px auto;
  place-items: center;
  gap: 1px;
  min-width: 0;
}

.lobby-player-rank img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.42));
}

.lobby-player-rank small {
  max-width: 62px;
  overflow: hidden;
  color: #9fb0be;
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.lobby-player-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lobby-player-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lobby-player-swatch {
  width: 9px;
  min-width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.lobby-player-row strong {
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-player-info > small {
  overflow: hidden;
  color: var(--v3-clean-muted);
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-player-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lobby-action-button {
  height: 31px;
  min-width: 68px;
  padding: 0 10px;
  border-color: #344151;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(34, 42, 57, 0.98), rgba(14, 21, 31, 0.98));
  color: #c8d5df;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lobby-action-button:hover {
  color: #fff;
  border-color: rgba(0, 200, 10, 0.45);
  background:
    radial-gradient(circle at 50% 0%, rgba(76, 255, 82, 0.13), transparent 60%),
    linear-gradient(180deg, rgba(38, 48, 62, 0.98), rgba(14, 21, 31, 0.98));
}

.lobby-social-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.lobby-social-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid #303946;
  border-radius: 8px;
  background: #202635;
}

.lobby-friends-card {
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
}

.lobby-party-invite-card {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.lobby-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.lobby-card-head strong {
  color: #fff;
  font-size: 15px;
  font-weight: 950;
}

.lobby-card-head span {
  color: var(--v3-xp-muted-figma);
  font-size: 11px;
  font-weight: 850;
}

.lobby-party-panel,
.lobby-friend-list {
  padding: 10px;
}

.lobby-friend-list {
  display: grid;
  min-height: 0;
}

.lobby-party-friend-list {
  align-content: start;
  gap: 8px;
}

.lobby-party-friend-list .friend-row.invite-only {
  min-height: 78px;
}

.lobby-friend-list .players-empty {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 0;
  color: #bfd0dc;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.lobby-party-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(76, 255, 82, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(18, 25, 35, 0.95), rgba(13, 20, 29, 0.95));
}

.lobby-party-panel .party-slots {
  gap: 12px;
}

.lobby-party-panel .party-slot {
  min-height: 112px;
  padding: 14px;
  border-color: #344151;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(35, 43, 58, 0.92), rgba(18, 25, 35, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 12px 24px rgba(0, 0, 0, 0.14);
}

.lobby-party-panel .party-slot::after {
  background:
    radial-gradient(circle at 18% 8%, rgba(132, 255, 154, 0.13), transparent 36%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 44%);
  opacity: 1;
}

.lobby-party-panel .party-slot.filled {
  border-color: rgba(76, 255, 82, 0.28);
  background:
    radial-gradient(circle at 16% 18%, rgba(76, 255, 82, 0.16), transparent 35%),
    linear-gradient(180deg, rgba(30, 47, 40, 0.94), rgba(18, 25, 35, 0.98));
}

.lobby-party-panel .party-slot .brand-dot {
  width: 24px;
  height: 24px;
  border: 5px solid rgba(20, 34, 30, 0.92);
  box-shadow:
    0 0 0 1px rgba(143, 220, 138, 0.34),
    0 0 18px rgba(76, 255, 82, 0.28);
}

.lobby-party-panel .party-slot.empty {
  border-color: rgba(127, 199, 255, 0.18);
  background:
    repeating-linear-gradient(135deg, rgba(127, 199, 255, 0.035) 0 8px, transparent 8px 16px),
    rgba(11, 22, 30, 0.70);
}

.lobby-party-panel .party-slot.empty::before {
  content: "+";
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 7px;
  border: 1px solid rgba(127, 199, 255, 0.24);
  border-radius: 7px;
  color: #9fb7c8;
  background: rgba(21, 31, 43, 0.86);
  font: 950 20px Montserrat, Segoe UI, Arial, sans-serif;
}

.lobby-party-panel .party-slot.empty small {
  color: #9fb0bd;
  font-size: 12px;
}

.lobby-party-panel .party-slot strong {
  font-size: 15px;
}

.lobby-party-panel .party-slot small {
  color: #a8b8c6;
}

.lobby-party-panel .party-primary-action,
.lobby-party-panel .party-leave-action {
  position: relative;
  justify-self: start;
  min-width: 132px;
  height: 36px;
  border-radius: 7px;
  overflow: hidden;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    filter 0.14s ease,
    box-shadow 0.14s ease;
}

.lobby-party-panel .party-primary-action {
  border-color: rgba(91, 255, 111, 0.42) !important;
  color: #fff !important;
  background:
    linear-gradient(100deg, transparent 0 34%, rgba(255, 255, 255, 0.18) 45%, transparent 56%),
    radial-gradient(circle at 18% 0%, rgba(154, 255, 166, 0.18), transparent 42%),
    linear-gradient(180deg, #109a24, #076f19) !important;
  background-size: 240% 100%, 100% 100%, 100% 100%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 22px rgba(0, 200, 10, 0.12);
}

.lobby-party-panel .party-primary-action:hover {
  transform: translateY(-1px);
  border-color: rgba(136, 255, 150, 0.62) !important;
  filter: brightness(1.06);
  background-position: 100% 0, 0 0, 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 14px 26px rgba(0, 200, 10, 0.18);
}

.lobby-party-panel .party-primary-action:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.lobby-party-panel .party-leave-action {
  border-color: #344151 !important;
  color: #c8d5df !important;
  background:
    linear-gradient(180deg, #202635, #151b24) !important;
}

.lobby-party-panel .party-leave-action:hover {
  color: #fff !important;
  border-color: rgba(255, 116, 116, 0.36) !important;
  background:
    linear-gradient(180deg, #2b2732, #181b25) !important;
}

.lobby-social-card:has(.lobby-friend-form) {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.controls-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(220px, 0.7fr) minmax(430px, 1.42fr);
  gap: 12px;
  align-items: start;
}

.control-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #303946;
  border-radius: 8px;
  background: #202635;
}

.control-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.control-group-head strong {
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  text-shadow: var(--v3-figma-shadow);
}

.control-group-head span {
  min-width: 0;
  overflow: hidden;
  color: #7c8490;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movement-bind-grid,
.action-bind-grid,
.skill-bind-grid {
  display: grid;
  gap: 7px;
}

.movement-bind-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-bind-grid {
  grid-template-columns: 1fr;
}

.skill-bind-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-drag-hint {
  display: block;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 8px;
  color: #b9cce0;
  background:
    linear-gradient(90deg, rgba(127, 199, 255, 0.10), transparent 72%),
    #151b24;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 0 12px rgba(127, 199, 255, 0.16);
}

.skill-drag-hint.inactive {
  border-color: rgba(127, 199, 255, 0.10);
  color: #8793a2;
  background:
    linear-gradient(90deg, rgba(127, 199, 255, 0.055), transparent 72%),
    #151b24;
}

.movement-spacer {
  min-height: 44px;
  border: 1px solid rgba(48, 57, 70, 0.36);
  border-radius: 8px;
  background: rgba(21, 27, 36, 0.32);
}

.settings-page .bind-button {
  min-height: 44px;
  border: 1px solid #303946;
  border-radius: 8px;
  background: #151b24;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.settings-page .bind-button:hover {
  border-color: #465162;
  background: #252c3a;
}

.settings-page .bind-button:focus-visible {
  border-color: rgba(127, 199, 255, 0.36);
  box-shadow: inset 0 0 0 1px rgba(127, 199, 255, 0.12);
}

.settings-page .bind-button.waiting {
  border-color: rgba(0, 200, 10, 0.42);
  background:
    linear-gradient(90deg, rgba(0, 200, 10, 0.10), transparent 64%),
    #17212a;
  box-shadow: inset 0 0 0 1px rgba(0, 200, 10, 0.08);
}

.settings-page .bind-button.waiting strong {
  color: #ffffff;
  background: #087f0a;
}

.settings-page .bind-button strong {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  border-radius: 6px;
  color: #fff;
  background: #151b24;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.settings-page .skill-bind-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  user-select: none;
}

.settings-page .skill-bind-button[draggable="true"] {
  cursor: grab;
}

.settings-page .skill-bind-button.skill-order-sequential .bind-skill-icon {
  opacity: 0.72;
}

.settings-page .skill-bind-button.dragging {
  opacity: 0.58;
  cursor: grabbing;
  transform: scale(0.985);
}

.settings-page .skill-bind-button.dragging .bind-skill-icon {
  box-shadow:
    inset 0 0 0 1px rgba(127, 199, 255, 0.26),
    0 0 14px rgba(127, 199, 255, 0.18);
}

.settings-page .skill-bind-button.drag-over {
  border-color: rgba(76, 255, 82, 0.54);
  background:
    linear-gradient(90deg, rgba(76, 255, 82, 0.12), transparent 62%),
    #17212a;
  box-shadow:
    inset 0 0 0 1px rgba(76, 255, 82, 0.10),
    0 0 16px rgba(76, 255, 82, 0.10);
}

.bind-skill-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  background: rgba(127, 199, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(127, 199, 255, 0.16);
}

.settings-page .setting-range,
.settings-page .setting-select,
.settings-page .setting-color,
.settings-page .setting-checkbox {
  min-height: 58px;
  padding: 11px 14px;
  border: 1px solid #303946;
  border-radius: 8px;
  background: #202635;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.settings-page .setting-range:hover,
.settings-page .setting-select:hover,
.settings-page .setting-color:hover,
.settings-page .setting-checkbox:hover {
  border-color: #465162;
  background: #252c3a;
}

.settings-page .setting-range,
.settings-page .setting-select {
  position: relative;
  align-content: center;
}

.settings-page .setting-select::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 25px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8fa9c4;
  border-bottom: 2px solid #8fa9c4;
  pointer-events: none;
  transform: rotate(45deg);
}

.settings-page .setting-select:focus-within {
  border-color: rgba(127, 199, 255, 0.52);
}

.settings-page .setting-select:focus-within::after {
  border-color: #cfe3f5;
}

.settings-page .setting-select select {
  appearance: none;
  padding: 0 38px 0 12px;
}

.settings-page .setting-switch {
  min-height: 58px;
}

.settings-page .setting-switch::before {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 50px;
  height: 28px;
  border: 1px solid #3a4658;
  border-radius: 999px;
  background: #151b24;
  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.34);
  transform: translateY(-50%);
}

.settings-page .setting-switch::after {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #cbd7e6, #8d9bad);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.34);
  transform: translateY(-50%);
}

.settings-page .setting-switch:has(input:checked)::before {
  border-color: rgba(0, 200, 10, 0.62);
  background: linear-gradient(180deg, #078907, #007a00);
}

.settings-page .setting-switch:has(input:checked)::after {
  background: linear-gradient(180deg, #ffffff, #b7ffb4);
}

.settings-page .setting-switch span {
  color: #a4a9b3;
  font-size: 13px;
  font-weight: 850;
}

.settings-page .setting-checkbox:not(.setting-switch)::before {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 50px;
  height: 28px;
  border: 1px solid #3a4658;
  border-radius: 999px;
  background: #151b24;
  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.34);
  transform: translateY(-50%);
}

.settings-page .setting-checkbox:not(.setting-switch)::after {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #cbd7e6, #8d9bad);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.34);
  transform: translateY(-50%);
}

.settings-page .setting-checkbox:not(.setting-switch):has(input:checked)::before {
  border-color: rgba(0, 200, 10, 0.62);
  background: linear-gradient(180deg, #078907, #007a00);
}

.settings-page .setting-checkbox:not(.setting-switch):has(input:checked)::after {
  background: linear-gradient(180deg, #ffffff, #b7ffb4);
}

.settings-page .setting-checkbox span {
  color: #a4a9b3;
  font-size: 13px;
  font-weight: 850;
}

.settings-page .setting-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-page .setting-checkbox {
  cursor: pointer;
}

.settings-page .setting-checkbox:focus-within {
  border-color: rgba(127, 199, 255, 0.52);
}

.settings-page .setting-checkbox:has(input:checked) span {
  color: #ffffff;
}

.settings-page .setting-checkbox:has(input:checked)::after,
.settings-page .setting-switch:has(input:checked)::after {
  transform: translate(22px, -50%);
}

.settings-page .setting-checkbox::before,
.settings-page .setting-checkbox::after {
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.settings-page .setting-select option {
  color: #f2f5ef;
  background: #151b24;
}

.settings-page .graphics-native-field {
  display: none;
}

.graphics-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.graphics-picker-toggle {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 98px;
  padding: 8px 12px 8px 8px;
  border: 1px solid #303946;
  border-radius: 8px;
  color: #fff;
  background: #202635;
  text-align: left;
  cursor: pointer;
}

.graphics-picker-toggle:hover {
  border-color: #465162;
  background: #252c3a;
}

.graphics-picker-toggle span:last-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.graphics-picker-toggle small {
  color: #a4a9b3;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.graphics-picker-toggle strong {
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graphics-picker-toggle::after {
  content: "";
  justify-self: end;
  grid-column: 3;
  grid-row: 1;
  width: 10px;
  height: 10px;
  margin-right: 2px;
  border-right: 2px solid #8fa9c4;
  border-bottom: 2px solid #8fa9c4;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.graphics-picker.open .graphics-picker-toggle::after {
  transform: translateY(4px) rotate(225deg);
}

.graphics-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.22s ease, opacity 0.16s ease, transform 0.16s ease;
}

.graphics-picker.open .graphics-picker-grid {
  max-height: 720px;
  opacity: 1;
  transform: translateY(0);
}

.graphics-picker-grid button {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid #303946;
  border-radius: 8px;
  color: #a4a9b3;
  background: #202635;
  font: 900 11px Montserrat, Segoe UI, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

.graphics-picker-grid button:hover {
  border-color: #465162;
  background: #252c3a;
}

.graphics-picker-grid button.active {
  color: #fff;
  border-color: rgba(0, 200, 10, 0.48);
  background:
    linear-gradient(180deg, rgba(0, 200, 10, 0.10), rgba(0, 200, 10, 0.03)),
    #202635;
}

.graphics-picker-grid strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graphics-map-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 184 / 114;
  height: auto;
  overflow: hidden;
  border: 1px solid #303946;
  border-radius: 7px;
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.graphics-picker-toggle .graphics-map-preview {
  width: 156px;
}

.settings-page .setting-range span,
.settings-page .setting-select span {
  font-size: 13px;
  font-weight: 850;
  color: #a4a9b3;
}

.settings-page .setting-range input {
  appearance: none;
  -webkit-appearance: none;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #16d924 var(--range-progress, 0%), #0f1723 var(--range-progress, 0%));
  box-shadow:
    inset 0 0 0 1px rgba(127, 199, 255, 0.14),
    inset 0 2px 8px rgba(0, 0, 0, 0.34);
  outline: none;
}

.settings-page .setting-range input::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: transparent;
}

.settings-page .setting-range input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -4px;
  border: 2px solid #0d1824;
  border-radius: 50%;
  background: linear-gradient(180deg, #eff8ff, #afc6d8);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.34),
    0 0 0 2px rgba(22, 217, 36, 0.18);
}

.settings-page .setting-range input::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: transparent;
}

.settings-page .setting-range input::-moz-range-progress {
  height: 10px;
  border-radius: 999px;
  background: #16d924;
}

.settings-page .setting-range input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #0d1824;
  border-radius: 50%;
  background: linear-gradient(180deg, #eff8ff, #afc6d8);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.34);
}

.settings-page .setting-select select {
  height: 38px;
  border-radius: 8px;
  border-color: #303946;
  background: #151b24;
  color: #fff;
}

.settings-page .setting-color {
  min-height: 58px;
}

.settings-page .setting-color input {
  width: 54px;
  height: 32px;
  border-color: #3b4658;
  background: #151b24;
}

.settings-page .setting-checkbox {
  display: flex;
  align-items: center;
  padding-left: 78px;
  color: #a4a9b3;
}

.settings-page .setting-checkbox:has(input:checked) {
  border-color: rgba(0, 200, 10, 0.34);
  background:
    linear-gradient(90deg, rgba(0, 200, 10, 0.10), transparent 58%),
    #202635;
}

.settings-page .setting-checkbox::before {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.settings-page .setting-checkbox::after {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.settings-page .setting-checkbox:has(input:checked)::after {
  transform: translate(22px, -50%);
}

.game-shell.sidebar-collapsed .settings-page,
.game-shell.sidebar-collapsed .profile-page-overlay,
.game-shell.sidebar-collapsed .security-page-overlay,
.game-shell.sidebar-collapsed .team-page-panel,
.game-shell.sidebar-collapsed .notifications-page-panel {
  border-radius: 10px;
}

@media (max-width: 900px) {
  .settings-page-shell,
  .team-page-shell,
  .notifications-page-shell,
  .auth-page-shell,
  .profile-page-shell,
  .security-page-shell {
    width: min(100%, calc(100vw - 28px));
    height: min(100%, calc(100vh - 28px));
    padding: 18px;
  }

  .settings-page-head,
  .team-page-head,
  .notifications-page-head,
  .auth-page-head,
  .profile-page-head,
  .security-page-head,
  .notifications-hero,
  .team-member-info {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-tabs,
  .settings-form-grid,
  .controls-layout,
  .graphics-picker-grid,
  .team-member-grid,
  .notifications-grid {
    grid-template-columns: 1fr;
  }

  .auth-page-body,
  .security-page-body,
  .profile-hero-card,
  .profile-stat-grid {
    grid-template-columns: 1fr;
  }

  .auth-page-body {
    overflow: hidden auto;
    padding-right: 6px;
  }

  .auth-info-card {
    min-height: 260px;
    padding: 22px;
    grid-template-rows: auto auto;
  }

  .auth-info-visual {
    min-height: 180px;
  }

  .auth-lock-mark {
    width: 82px;
    height: 64px;
  }

  .auth-lock-mark::before {
    left: 18px;
    right: 18px;
    top: -32px;
    height: 40px;
    border-width: 7px;
  }

  .auth-page-form {
    padding: 24px 22px;
  }

  .auth-page-actions {
    grid-template-columns: 1fr;
  }

  .auth-page-actions .auth-link-button {
    width: 100%;
    min-width: 0;
    margin-top: 6px;
  }

  .profile-rank-hero {
    justify-items: start;
  }

  .team-member-card {
    grid-template-rows: 260px auto;
  }

  .team-member-art {
    min-height: 260px;
  }

  .team-member-info a {
    width: 100%;
  }

  .skill-bind-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .graphics-picker-toggle {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .graphics-picker-toggle .graphics-map-preview {
    width: 112px;
  }
}

@media (max-height: 920px) and (min-width: 1200px) {
  .play-area.settings-page-open.settings-graphics-open {
    height: min(820px, calc(100vh - 132px));
  }

  .settings-page-shell {
    padding: 20px 26px 18px;
  }

  .settings-tabs {
    margin-top: 14px;
  }

  .settings-page-body {
    margin-top: 12px;
  }


  .settings-section {
    gap: 12px;
    padding: 16px;
  }


  .settings-section-head {
    gap: 5px;
    padding-bottom: 10px;
  }

  .settings-form-grid {
    gap: 10px;
  }

  .settings-page .setting-range,
  .settings-page .setting-select,
  .settings-page .setting-color,
  .settings-page .setting-checkbox {
    min-height: 52px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .graphics-picker-toggle {
    min-height: 90px;
  }

  .graphics-picker-toggle .graphics-map-preview {
    width: 144px;
  }
}

@media (max-width: 1100px) {
  .v3-header {
    grid-template-columns: 260px 1fr;
    padding-right: 20px;
  }

  .v3-actions {
    display: none;
  }

  .sidebar {
    width: min(360px, 82vw);
  }

  .play-area,
  .game-shell.sidebar-collapsed .play-area {
    left: calc(min(360px, 82vw) + ((100vw - min(360px, 82vw)) / 2));
    width: min(calc(100vw - min(360px, 82vw) - 32px), 1420px);
  }
}

@media (max-height: 1080px) and (min-width: 1200px) {
  .sidebar {
    gap: 14px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .progress-panel.v3-profile-card {
    min-height: 232px;
    padding-top: 18px;
    padding-bottom: 18px;
    row-gap: 14px;
  }

  .side-quests {
    min-height: 292px;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .side-quests .progress-card-head {
    padding-bottom: 15px;
  }

  .side-quests .quest-list {
    padding-top: 18px;
  }

  .side-quests .quest-item {
    min-height: 66px;
  }

  .v3-stats-card {
    min-height: 132px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .v3-status-pills {
    margin-top: 0;
    margin-bottom: 0;
  }

  .v3-template .chat-shortcut-hint {
    min-height: 36px;
  }

  .matches-cta {
    min-height: 68px;
    margin-top: 0;
    padding-top: 13px;
    padding-bottom: 15px;
    font-size: 28px;
  }
}

@media (max-height: 980px) and (min-width: 1200px) {
  .v3-header {
    padding-right: max(
      85px,
      calc((100vw - var(--sidebar-width) - 1420px) / 2),
      calc((100vw - var(--sidebar-width) - ((100vh - 194px) * 1.802)) / 2)
    );
  }

  .play-area {
    top: 98px;
    width: min(calc(100vw - var(--sidebar-width) - 170px), calc((100vh - 194px) * 1.802), 1420px);
  }

  .arena-topbar {
    inset: -42px 0 auto 0;
  }

  .arena-bottom-hud {
    bottom: -86px;
  }

  .sidebar {
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .progress-panel.v3-profile-card {
    min-height: 224px;
    padding-top: 16px;
    padding-bottom: 16px;
    row-gap: 14px;
  }

  .side-quests {
    min-height: 286px;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .side-quests .progress-card-head {
    padding-bottom: 15px;
  }

  .side-quests .quest-list {
    gap: 0;
    padding-top: 17px;
  }

  .side-quests .quest-item {
    min-height: 64px;
  }

  .side-quests .quest-icon {
    width: 44px;
    height: 44px;
  }

  .v3-stats-card {
    min-height: 132px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .matches-cta {
    min-height: 68px;
    margin-top: 0;
    padding-top: 13px;
    padding-bottom: 15px;
    font-size: 28px;
  }
}

.v3-socials {
  gap: 7px;
}

.v3-socials span,
.v3-socials a {
  width: 30px;
  min-width: 30px;
  height: 30px;
  background: #1d2331;
  opacity: 0.86;
}

.v3-socials img {
  opacity: 0.88;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.22));
}

.v3-socials span:nth-child(1) img,
.v3-socials span:nth-child(3) img,
.v3-socials a:nth-child(1) img,
.v3-socials a:nth-child(3) img {
  width: 14px;
  height: 14px;
}

.v3-socials span:nth-child(2) img,
.v3-socials a:nth-child(2) img {
  width: 16px;
  height: 16px;
}

.v3-socials span:nth-child(4) img,
.v3-socials a:nth-child(4) img {
  width: 16px;
  height: 16px;
}

.matches-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.matches-cta::after {
  content: "";
  position: absolute;
  inset: -35% auto -35% -48%;
  z-index: -1;
  width: 42%;
  transform: skewX(-18deg);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), rgba(183, 255, 186, 0.26), transparent);
  animation: playButtonShine 3.2s ease-in-out infinite;
}

.matches-cta:not(:disabled):not(.locked):hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 28px rgba(25, 180, 35, 0.28);
}

.matches-cta:disabled::after,
.matches-cta.locked::after {
  display: none;
}

@keyframes playButtonShine {
  0%, 36% {
    transform: translateX(0) skewX(-18deg);
    opacity: 0;
  }
  48% {
    opacity: 0.95;
  }
  68%, 100% {
    transform: translateX(360%) skewX(-18deg);
    opacity: 0;
  }
}

.game-shell.sidebar-collapsed .v3-header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.game-shell.sidebar-collapsed .sidebar {
  top: 0;
  width: 0;
  height: 100vh;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.game-shell.sidebar-collapsed .sidebar > *:not(.sidebar-toggle) {
  display: none !important;
}

.game-shell.sidebar-collapsed .sidebar-toggle {
  top: 50%;
  left: 10px;
  border-color: rgba(127, 199, 255, 0.38);
  background: rgba(32, 38, 53, 0.88);
  backdrop-filter: blur(8px);
}

.game-shell.sidebar-collapsed .play-area {
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  aspect-ratio: auto;
  transform: none;
  border-radius: 0;
}

.game-shell.sidebar-collapsed .play-area::before {
  border: 0;
  border-radius: 0;
}

.game-shell.sidebar-collapsed #game {
  border-radius: 0;
}

.game-shell.sidebar-collapsed .arena-topbar {
  inset: 12px 18px auto 54px;
  z-index: 8;
}

.game-shell.sidebar-collapsed .arena-bottom-hud {
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 8;
}

.game-shell.sidebar-collapsed .v3-footer {
  display: none;
}

/* Create match compact layout: final cascade guard. */
.players-panel.match-panel {
  width: min(1320px, calc(100vw - 96px));
  max-height: min(860px, calc(100vh - 88px));
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.16);
  border-radius: 10px;
  background: #121922;
}

.players-panel.match-panel .players-head {
  min-height: 78px;
  padding: 18px 20px;
  background: #121922;
}

.players-panel.match-panel .match-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 20px;
  background: #121922;
}

#matchCreateForm.match-create-form.match-pane.active {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  max-height: calc(min(860px, 100vh - 88px) - 134px);
  padding: 0 20px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(127, 199, 255, 0.36) rgba(8, 18, 27, 0.78);
  scrollbar-width: thin;
}

#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar {
  width: 8px;
}

#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar-track {
  background: rgba(8, 18, 27, 0.78);
}

#matchCreateForm.match-create-form.match-pane.active::-webkit-scrollbar-thumb {
  border: 2px solid rgba(8, 18, 27, 0.78);
  border-radius: 999px;
  background: rgba(127, 199, 255, 0.48);
}

#matchCreateForm .match-create-mode-cards {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(127, 199, 255, 0.13);
  border-radius: 8px;
  background: #141d28;
}

#matchCreateForm .match-mode-card {
  display: grid;
  grid-template-rows: 72px auto;
  min-width: 0;
  min-height: 118px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  color: #dcebf4;
  background: #1b2432;
}

#matchCreateForm .match-mode-card.active {
  border-color: rgba(0, 205, 36, 0.76);
  background: #152d25;
  box-shadow: 0 0 0 1px rgba(0, 205, 36, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#matchCreateForm .match-mode-card img {
  display: block;
  width: 100%;
  height: 72px;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #08121b;
}

#matchCreateForm .match-mode-card-body {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 2px 0;
  text-align: left;
}

#matchCreateForm .match-mode-card-body strong,
#matchCreateForm .match-mode-card-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#matchCreateForm .match-mode-card-body strong {
  color: #f3fbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

#matchCreateForm .match-mode-card-body small {
  color: #9fb1bf;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

#matchCreateForm.match-create-form label {
  grid-column: span 6;
  display: grid;
  gap: 8px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(127, 199, 255, 0.15);
  border-radius: 8px;
  background: #182231;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#matchCreateForm.match-create-form label:first-child {
  grid-column: span 8;
}

#matchCreateForm.match-create-form label:has(#matchTypeSelect) {
  grid-column: span 4;
}

#matchCreateForm.match-create-form label:has(#matchModeSelect) {
  display: none;
}

#matchCreateForm.match-create-form label:has(#matchMapSelect),
#matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
#matchCreateForm.match-create-form label:has(#matchFragLimitInput),
#matchCreateForm.match-create-form label:has(#matchPasswordInput) {
  grid-column: span 3;
}

#matchCreateForm.match-create-form input,
#matchCreateForm.match-create-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(127, 199, 255, 0.18);
  border-radius: 8px;
  color: #f3fbff;
  background: #08121b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-size: 14px;
}

#matchCreateForm .match-bots-toggle,
#matchCreateForm .match-observer-toggle,
#matchCreateForm .match-paid-toggle,
#matchCreateForm .match-organizer-toggle {
  grid-column: span 4;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
}

#matchCreateForm #paidMatchBlock {
  grid-column: 1 / -1;
}

#matchCreateForm button[type="submit"] {
  grid-column: 1 / -1;
  min-height: 52px;
  margin-top: 2px;
  border-radius: 8px;
}

@media (max-width: 1180px) {
  #matchCreateForm .match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #matchCreateForm.match-create-form label:first-child,
  #matchCreateForm.match-create-form label:has(#matchTypeSelect),
  #matchCreateForm.match-create-form label:has(#matchMapSelect),
  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm .match-bots-toggle,
  #matchCreateForm .match-observer-toggle,
  #matchCreateForm .match-paid-toggle,
  #matchCreateForm .match-organizer-toggle {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .players-panel.match-panel {
    width: calc(100vw - 24px);
  }

  #matchCreateForm .match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #matchCreateForm.match-create-form label:first-child,
  #matchCreateForm.match-create-form label:has(#matchTypeSelect),
  #matchCreateForm.match-create-form label:has(#matchMapSelect),
  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm .match-bots-toggle,
  #matchCreateForm .match-observer-toggle,
  #matchCreateForm .match-paid-toggle,
  #matchCreateForm .match-organizer-toggle {
    grid-column: 1 / -1;
  }
}

/* Create match EOF override: compact row cards, inferred type/map, dimmed game backdrop. */
#matchesOverlay.settings-overlay.open {
  background: rgba(3, 8, 13, 0.68) !important;
  backdrop-filter: blur(5px);
}

#matchesOverlay .players-panel.match-panel {
  background: #111821 !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55) !important;
}

#matchCreateForm.match-create-form .match-system-field,
#matchCreateForm.match-create-form label:has(#matchTypeSelect),
#matchCreateForm.match-create-form label:has(#matchModeSelect),
#matchCreateForm.match-create-form label:has(#matchMapSelect) {
  display: none !important;
}

#matchCreateModeCards.match-create-mode-cards {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(118px, 1fr)) !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid rgba(127, 199, 255, 0.13) !important;
  border-radius: 8px !important;
  background: #141d28 !important;
}

#matchCreateModeCards .match-mode-card {
  min-height: 118px !important;
  padding: 8px !important;
}

#matchCreateModeCards .match-mode-card img {
  height: 72px !important;
  object-fit: contain !important;
}

#matchCreateForm.match-create-form label:first-child {
  grid-column: 1 / -1 !important;
}

#matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
#matchCreateForm.match-create-form label:has(#matchFragLimitInput),
#matchCreateForm.match-create-form label:has(#matchPasswordInput),
#matchCreateForm.match-create-form .match-bots-toggle,
#matchCreateForm.match-create-form .match-observer-toggle,
#matchCreateForm.match-create-form .match-paid-toggle,
#matchCreateForm.match-create-form .match-organizer-toggle {
  grid-column: span 4 !important;
}

@media (max-width: 980px) {
  #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(4, minmax(118px, 1fr)) !important;
  }

  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm.match-create-form .match-bots-toggle,
  #matchCreateForm.match-create-form .match-observer-toggle,
  #matchCreateForm.match-create-form .match-paid-toggle,
  #matchCreateForm.match-create-form .match-organizer-toggle {
    grid-column: span 6 !important;
  }
}

@media (max-width: 680px) {
  #matchCreateModeCards.match-create-mode-cards {
    grid-template-columns: repeat(2, minmax(118px, 1fr)) !important;
  }

  #matchCreateForm.match-create-form label:has(#matchTeamSizeSelect),
  #matchCreateForm.match-create-form label:has(#matchFragLimitInput),
  #matchCreateForm.match-create-form label:has(#matchPasswordInput),
  #matchCreateForm.match-create-form .match-bots-toggle,
  #matchCreateForm.match-create-form .match-observer-toggle,
  #matchCreateForm.match-create-form .match-paid-toggle,
  #matchCreateForm.match-create-form .match-organizer-toggle {
    grid-column: 1 / -1 !important;
  }
}

/* Tournament true EOF cascade guard. */
#matchesOverlay .players-panel.match-panel {
  grid-template-rows: 74px minmax(0, 1fr) !important;
}

#matchesOverlay .match-top-row {
  display: grid !important;
  grid-template-columns: minmax(140px, 220px) minmax(480px, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 14px 18px !important;
}

#matchesOverlay .match-top-row .match-tabs {
  grid-column: auto !important;
  grid-row: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#matchesOverlay .match-top-row .match-tabs button {
  min-height: 44px !important;
}

#tournamentPane.match-pane.active {
  display: block !important;
  height: 100% !important;
  padding: 14px 18px 18px !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 356px !important;
  gap: 14px !important;
  height: 100% !important;
  min-height: 0 !important;
}

#tournamentPane .tournament-browser {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 14px !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 16px !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  background: #111b27 !important;
}

#tournamentPane .tournament-player-grid {
  display: grid !important;
  grid-template-columns: 340px minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#tournamentPane.no-tournaments .tournament-player-grid {
  grid-template-columns: 1fr !important;
}

#tournamentPane.no-tournaments .tournament-list-shell {
  display: none !important;
}

#tournamentPane .tournament-list-shell,
#tournamentPane .tournament-details {
  min-height: 0 !important;
  border: 1px solid rgba(127, 199, 255, 0.11) !important;
  border-radius: 8px !important;
  background: #0d1722 !important;
}

#tournamentPane .tournament-details {
  display: grid !important;
  align-content: start !important;
  gap: 14px !important;
  padding: 16px !important;
  overflow: auto !important;
}

#tournamentPane.no-tournaments .tournament-details {
  align-content: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-empty-state {
  display: grid !important;
  justify-items: center !important;
  gap: 10px !important;
  width: min(460px, 100%) !important;
  padding: 30px 28px !important;
  border: 1px solid rgba(127, 199, 255, 0.12) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, rgba(28, 42, 58, 0.76), rgba(10, 18, 27, 0.92)) !important;
  text-align: center !important;
}

#tournamentPane .tournament-create-form {
  height: 100% !important;
  min-height: 0 !important;
  padding: 14px !important;
  overflow: auto !important;
  border-color: rgba(68, 255, 110, 0.14) !important;
  border-radius: 8px !important;
  background: #111b27 !important;
}

@media (max-width: 1180px) {
  #matchesOverlay .match-top-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  #matchesOverlay .match-top-row > strong {
    display: none !important;
  }

  #tournamentPane .tournament-layout {
    grid-template-columns: 1fr !important;
    overflow: auto !important;
  }
}

@media (max-width: 760px) {
  #matchesOverlay .match-top-row .match-tabs,
  #tournamentPane .tournament-player-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Tournament header button alignment EOF guard. */
#matchesOverlay .match-top-row {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

#matchesOverlay .match-top-row > strong {
  flex: 0 0 180px !important;
  min-width: 0 !important;
}

#matchesOverlay .match-top-row .match-tabs {
  flex: 1 1 auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  min-width: 420px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#matchesOverlay .match-top-row .match-tabs button {
  width: 100% !important;
  min-height: 44px !important;
}

#matchesOverlay .match-top-row > #closeMatchesButton {
  flex: 0 0 92px !important;
  width: 92px !important;
  min-height: 44px !important;
}

@media (max-width: 1180px) {
  #matchesOverlay .match-top-row > strong {
    display: none !important;
  }

  #matchesOverlay .match-top-row .match-tabs {
    min-width: 0 !important;
  }
}

@media (max-width: 760px) {
  #matchesOverlay .match-top-row {
    flex-wrap: wrap !important;
  }

  #matchesOverlay .match-top-row .match-tabs {
    flex-basis: 100% !important;
    grid-template-columns: 1fr !important;
  }
}

/* Notifications and tournament completed-tab actual EOF guard. */
#notificationsPage .notifications-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#notificationsPage .notifications-request.match {
  border-left-color: #43c4ff !important;
}

#notificationsPage .notifications-request.tournament {
  border-left-color: #f5d460 !important;
}

#notificationsPage .notifications-request.success {
  border-left-color: #49ff7a !important;
}

#notificationsPage .notifications-request.match .notifications-request-icon {
  border-color: rgba(67, 196, 255, 0.34) !important;
}

#notificationsPage .notifications-request.tournament .notifications-request-icon {
  border-color: rgba(245, 212, 96, 0.34) !important;
}

#notificationsPage .notifications-request.match .notifications-request-body span {
  color: #7fc7ff !important;
}

#notificationsPage .notifications-request.tournament .notifications-request-body span {
  color: #f5d460 !important;
}

#tournamentPane .tournament-browser {
  grid-template-rows: auto auto minmax(0, 1fr) !important;
}

#tournamentPane .tournament-view-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  min-height: 0 !important;
}

#tournamentPane .tournament-view-tabs button {
  min-height: 38px !important;
  border: 1px solid rgba(127, 199, 255, 0.14) !important;
  border-radius: 8px !important;
  color: #b9c8d6 !important;
  background: #0e1824 !important;
  font: 950 11px Montserrat, Segoe UI, Arial, sans-serif !important;
  text-transform: uppercase !important;
}

#tournamentPane .tournament-view-tabs button.active {
  border-color: rgba(68, 255, 110, 0.44) !important;
  color: #f4fff7 !important;
  background: linear-gradient(180deg, #16a233 0%, #087a19 100%) !important;
}

#tournamentPane .tournament-view-panel {
  display: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-view-panel.active {
  display: block !important;
  height: 100% !important;
  min-height: 0 !important;
}

#tournamentPane #tournamentHistoryPanel.active {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 12px !important;
}

#tournamentPane .tournament-history-grid {
  display: grid !important;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#tournamentPane .tournament-history-list-shell,
#tournamentPane .tournament-history-details {
  min-height: 0 !important;
}

#tournamentPane .tournament-history-list {
  min-height: 0 !important;
  overflow: auto !important;
  padding-bottom: 20px !important;
}

#tournamentPane .tournament-history-details {
  display: block !important;
  overflow: auto !important;
  padding: 14px 14px 28px !important;
  scrollbar-color: rgba(127, 199, 255, 0.34) rgba(8, 18, 27, 0.82) !important;
  scrollbar-width: thin !important;
}

#tournamentPane .tournament-history-card {
  display: grid !important;
  gap: 12px !important;
  min-width: 0 !important;
}

#tournamentPane .tournament-history-head {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
}

#tournamentPane .tournament-history-head strong,
#tournamentPane .tournament-history-head span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#tournamentPane .history-bracket {
  max-width: 100% !important;
  min-height: 252px !important;
  overflow: auto !important;
  padding: 8px 8px 14px !important;
  border: 1px solid rgba(127, 199, 255, 0.12) !important;
  border-radius: 8px !important;
  background: #0b141f !important;
}

#tournamentPane .history-bracket .tournament-round {
  flex-basis: 220px !important;
}

#tournamentPane .tournament-history-payouts {
  display: grid !important;
  gap: 8px !important;
  min-width: 0 !important;
}

#tournamentPane .tournament-history-payout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto) minmax(132px, auto) !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(127, 199, 255, 0.12) !important;
  border-radius: 8px !important;
  background: #0b141f !important;
}

#tournamentPane .tournament-history-payout span,
#tournamentPane .tournament-history-payout b,
#tournamentPane .tournament-history-payout em {
  overflow: hidden !important;
  font-style: normal !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#tournamentPane .tournament-history-payout b,
#tournamentPane .tournament-history-payout em {
  justify-self: end !important;
}

#tournamentPane .tournament-history-payout em {
  max-width: 180px !important;
}

@media (max-width: 1180px) {
  #notificationsPage .notifications-grid,
  #tournamentPane .tournament-history-grid {
    grid-template-columns: 1fr !important;
  }

  #tournamentPane #tournamentHistoryPanel.active {
    overflow: auto !important;
  }

  #tournamentPane .tournament-history-grid {
    overflow: visible !important;
  }

  #tournamentPane .tournament-history-details {
    min-height: 420px !important;
  }
}

@media (max-width: 760px) {
  #tournamentPane .tournament-view-tabs,
  #tournamentPane .tournament-history-payout {
    grid-template-columns: 1fr !important;
  }

  #tournamentPane .tournament-history-payout {
    align-items: start !important;
    padding: 12px !important;
  }

  #tournamentPane .tournament-history-payout b,
  #tournamentPane .tournament-history-payout em {
    justify-self: start !important;
  }
}
