/* ==========================================================================
   BloxStrike Arena - website styles (dark esports theme)
   ========================================================================== */

:root {
  --bg: #0f1013;
  --bg-2: #13151a;
  --surface: #1a1c21;
  --surface-2: #212429;
  --surface-3: #2a2d34;
  --border: #2a2e35;
  --border-strong: #383c45;
  --text: #f2f3f5;
  --text-2: #b8bcc6;
  --muted: #7f8591;
  --accent: #f25c16;
  --accent-hover: #ff6f2c;
  --accent-soft: rgba(242, 92, 22, 0.12);
  --team-a: #5b9bff;
  --team-b: #e0a340;
  --good: #3ecf6e;
  --good-soft: rgba(62, 207, 110, 0.12);
  --bad: #ff5555;
  --bad-soft: rgba(255, 85, 85, 0.12);
  --warn: #f5b73b;
  --warn-soft: rgba(245, 183, 59, 0.12);
  --info: #5b9bff;
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --topbar-h: 60px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 400px at 50% -120px, rgba(242, 92, 22, 0.1), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}

a {
  color: inherit;
  text-decoration: none;
}
a.link,
.prose a {
  color: var(--accent);
}
a.link:hover,
.prose a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  font-weight: 700;
}

.display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
}
.text-2 {
  color: var(--text-2);
}
.good {
  color: var(--good);
}
.bad {
  color: var(--bad);
}
.warn {
  color: var(--warn);
}
.small {
  font-size: 13px;
}
.tiny {
  font-size: 12px;
}
.nowrap {
  white-space: nowrap;
}
.hidden {
  display: none !important;
}
.center {
  text-align: center;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.wrap {
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stack.lg {
  gap: 20px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.05s,
    opacity 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover {
  background: var(--surface-3);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled],
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn-outline {
  background: transparent;
}
.btn-danger {
  background: var(--bad-soft);
  border-color: rgba(255, 85, 85, 0.35);
  color: #ff8080;
}
.btn-danger:hover {
  background: rgba(255, 85, 85, 0.2);
}
.btn-good {
  background: var(--good);
  border-color: var(--good);
  color: #062a13;
}
.btn-good:hover {
  filter: brightness(1.08);
  background: var(--good);
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.btn-lg {
  height: 52px;
  padding: 0 26px;
  font-size: 16px;
}
.btn-block {
  width: 100%;
}
.btn .icon {
  width: 18px;
  height: 18px;
}
.btn-sm .icon {
  width: 15px;
  height: 15px;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ----------------------------------------------------------------- inputs */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > label,
.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.hint {
  font-size: 12.5px;
  color: var(--muted);
}
.input,
select.input,
textarea.input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
textarea.input {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder {
  color: #5d636e;
}
.input.sm {
  height: 34px;
  font-size: 14px;
}
.input.score {
  width: 72px;
  height: 52px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  padding: 0 4px;
}
input[type='number']::-webkit-inner-spin-button {
  opacity: 0.3;
}

.form-error {
  display: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bad-soft);
  border: 1px solid rgba(255, 85, 85, 0.3);
  color: #ff9b9b;
  font-size: 14px;
}
.form-error.show {
  display: block;
}
.form-ok {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--good-soft);
  border: 1px solid rgba(62, 207, 110, 0.3);
  color: #8fe6ad;
  font-size: 14px;
}

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}
.card.flush {
  padding: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card.flush .card-head {
  padding: 16px 20px 0;
}
.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  font-weight: 700;
}
.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}
.pill.accent {
  background: var(--accent-soft);
  color: #ff9a66;
}
.pill.good {
  background: var(--good-soft);
  color: #7fe3a2;
}
.pill.bad {
  background: var(--bad-soft);
  color: #ff9090;
}
.pill.warn {
  background: var(--warn-soft);
  color: #f8cd72;
}
.pill.info {
  background: rgba(91, 155, 255, 0.14);
  color: #9cc2ff;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}
.dot.pulse {
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--surface-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading {
  display: flex;
  justify-content: center;
  padding: 80px 0;
}

/* ---------------------------------------------------------------- avatars */

.avatar {
  --size: 36px;
  width: var(--size);
  height: var(--size);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: calc(var(--size) * 0.4);
  color: #fff;
  background: var(--surface-3);
  text-transform: uppercase;
  user-select: none;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #2c3038;
}
.avatar.round {
  border-radius: 50%;
}

/* ---------------------------------------------------------- level badges */

.lvl {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.lvl text {
  font-family: var(--font-display);
  font-weight: 700;
}
.elo-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* ----------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(15, 16, 19, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand svg {
  width: 30px;
  height: 30px;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}
.brand-name span {
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.nav-links .icon {
  width: 17px;
  height: 17px;
}
.nav-search {
  position: relative;
  width: 220px;
}
.nav-search .input {
  height: 36px;
  padding-left: 34px;
  background: var(--surface);
  font-size: 14px;
}
.nav-search .icon {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 60;
}
.search-results a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.search-results a:hover,
.search-results a.sel {
  background: var(--surface-2);
}
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.online {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.online .dot {
  color: var(--good);
}
.queue-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(242, 92, 22, 0.4);
  color: #ffb088;
  font-weight: 600;
  font-size: 13px;
}
.queue-pill .dot {
  color: var(--accent);
}
.queue-pill.live {
  background: var(--good-soft);
  border-color: rgba(62, 207, 110, 0.4);
  color: #8fe6ad;
}
.queue-pill.live .dot {
  color: var(--good);
}
.user-chip {
  position: relative;
}
.user-chip > button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}
.user-chip > button:hover,
.user-chip.open > button {
  background: var(--surface-2);
  border-color: var(--border);
}
.user-chip .who {
  text-align: left;
  line-height: 1.2;
}
.user-chip .who b {
  display: block;
  font-size: 14px;
}
.user-chip .who small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 210px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 60;
}
.user-chip.open .menu {
  display: block;
}
.menu a,
.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: none;
  border: 0;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}
.menu a:hover,
.menu button:hover {
  background: var(--surface-2);
  color: var(--text);
}
.menu hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 6px 0;
}
.menu .icon {
  width: 17px;
  height: 17px;
}

/* ------------------------------------------------------------------- view */

.view {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.page-head p {
  margin: 4px 0 0;
  color: var(--text-2);
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.tabs button,
.tabs a {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tabs button:hover,
.tabs a:hover {
  color: var(--text);
}
.tabs .active {
  background: var(--surface-3);
  color: var(--text);
}
.tabs .count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tabs .active .count {
  color: var(--accent);
}

/* ----------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
}
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr {
  transition: background 0.1s;
}
.table tbody tr.clickable {
  cursor: pointer;
}
.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table th.num {
  text-align: right;
}
.player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.player-cell b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
}
.result-chip.W {
  background: var(--good-soft);
  color: var(--good);
}
.result-chip.L {
  background: var(--bad-soft);
  color: var(--bad);
}
.result-chip.D {
  background: var(--surface-3);
  color: var(--text-2);
}
.result-chip.P {
  background: var(--accent-soft);
  color: var(--accent);
}
.delta {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.delta.up {
  color: var(--good);
}
.delta.down {
  color: var(--bad);
}

/* ----------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--info);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toast-in 0.2s ease-out;
}
.toast.success {
  border-left-color: var(--good);
}
.toast.error {
  border-left-color: var(--bad);
}
.toast.warning {
  border-left-color: var(--warn);
}
.toast .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.toast.success .icon {
  color: var(--good);
}
.toast.error .icon {
  color: var(--bad);
}
.toast.warning .icon {
  color: var(--warn);
}
.toast.info .icon {
  color: var(--info);
}
.toast a {
  color: var(--accent);
  font-weight: 600;
}
.toast.out {
  opacity: 0;
  transform: translateY(6px);
  transition: 0.2s;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ----------------------------------------------------------------- modals */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(5, 6, 8, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in 0.15s;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
.modal {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.modal-body {
  padding: 24px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

/* Ready check */
.ready {
  text-align: center;
}
.ready-top {
  padding: 30px 24px 22px;
  background:
    radial-gradient(420px 160px at 50% 0, rgba(242, 92, 22, 0.28), transparent 70%),
    var(--surface);
}
.ready-title {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ready-sub {
  margin-top: 8px;
  color: var(--text-2);
  font-weight: 500;
}
.ready-bar {
  height: 5px;
  background: var(--surface-3);
  position: relative;
  overflow: hidden;
}
.ready-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  width: 100%;
}
.ready-slots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 24px 6px;
}
.ready-slot {
  position: relative;
  opacity: 0.35;
  transition: opacity 0.2s;
}
.ready-slot.ok {
  opacity: 1;
}
.ready-slot.ok::after {
  content: '';
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23062a13' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/9px no-repeat;
  border: 2px solid var(--surface);
}
.ready-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding-bottom: 6px;
}
.ready-actions {
  padding: 18px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ready-actions .btn-lg {
  height: 58px;
  font-size: 20px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------- home */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0 50px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-2);
  max-width: 540px;
  margin: 20px 0 28px;
}
.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 440px;
  width: 100%;
  justify-self: center;
}
.hero-art .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.hero-art .ring.r2 {
  inset: 12%;
  border-color: rgba(242, 92, 22, 0.25);
}
.hero-art .ring.r3 {
  inset: 26%;
  background: radial-gradient(circle, rgba(242, 92, 22, 0.18), transparent 70%);
  border: 0;
}
.hero-art .big-badge {
  position: absolute;
  inset: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art .big-badge svg {
  width: 100%;
  height: 100%;
}
.hero-art .float {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.hero-art .f1 {
  top: 8%;
  left: 0;
}
.hero-art .f2 {
  top: 44%;
  right: 0;
}
.hero-art .f3 {
  bottom: 8%;
  left: 4%;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 56px;
}
.stat-strip > div {
  padding: 20px 24px;
  border-right: 1px solid var(--border);
}
.stat-strip > div:last-child {
  border-right: 0;
}
.stat-strip b {
  display: block;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.1;
}
.stat-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0 56px;
}
.step {
  position: relative;
  padding: 22px;
}
.step .num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.step h3 {
  margin: 10px 0 8px;
  font-size: 18px;
}
.step p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}
.step .icon {
  width: 28px;
  height: 28px;
  color: var(--text-2);
  position: absolute;
  right: 20px;
  top: 20px;
}

.ladder {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 10px;
  margin: 20px 0 56px;
}
.ladder > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 6px;
  text-align: center;
}
.ladder small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- play */

.play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.queue-card {
  padding: 0;
  overflow: hidden;
}
.queue-banner {
  position: relative;
  padding: 28px 28px 24px;
  background:
    linear-gradient(100deg, rgba(15, 16, 19, 0.96) 30%, rgba(15, 16, 19, 0.55)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 14px),
    linear-gradient(120deg, #2a1407, #16181d 55%, #0f1a2b);
  border-bottom: 1px solid var(--border);
}
.queue-banner h2 {
  font-family: var(--font-display);
  font-size: 40px;
  text-transform: uppercase;
  line-height: 1;
}
.queue-banner p {
  margin: 8px 0 0;
  color: var(--text-2);
}
.queue-banner .mode {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.queue-body {
  padding: 22px 28px 28px;
}
.region-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.region-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}
.region-opt:hover {
  border-color: #4b505a;
}
.region-opt.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: rgba(242, 92, 22, 0.06);
}
.region-opt b {
  font-size: 15px;
}
.region-opt span {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}
.region-opt[disabled] {
  cursor: default;
  opacity: 0.6;
}
.find-btn {
  width: 100%;
  height: 72px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition:
    background 0.15s,
    transform 0.05s;
}
.find-btn:hover {
  background: var(--accent-hover);
}
.find-btn:active {
  transform: translateY(1px);
}
.find-btn[disabled] {
  background: var(--surface-3);
  color: var(--muted);
  cursor: not-allowed;
}
.find-btn.searching {
  background: var(--surface-2);
  border: 1px solid rgba(242, 92, 22, 0.5);
  color: var(--text);
}
.find-btn.searching::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(242, 92, 22, 0.16), transparent);
  animation: sweep 1.8s infinite;
}
.find-btn.searching:hover {
  border-color: var(--bad);
}
.find-btn .timer {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.find-btn .cancel-hint {
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  font-weight: 600;
}
@keyframes sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}
.checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 14px;
}
.check .icon {
  width: 20px;
  height: 20px;
}
.check.ok .icon {
  color: var(--good);
}
.check.todo {
  border-color: rgba(245, 183, 59, 0.35);
}
.check.todo .icon {
  color: var(--warn);
}
.check b {
  display: block;
  font-weight: 600;
}
.check span {
  color: var(--muted);
  font-size: 12.5px;
}
.check a,
.check button.linkish {
  margin-left: auto;
}

.me-card .top {
  display: flex;
  gap: 14px;
  align-items: center;
}
.me-card .name {
  font-size: 20px;
  font-weight: 700;
}
.level-progress {
  margin-top: 18px;
}
.level-progress .bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
  margin: 8px 0 6px;
}
.level-progress .bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
}
.form-row {
  display: flex;
  gap: 5px;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  transition: background 0.1s;
}
.match-row:hover {
  background: rgba(255, 255, 255, 0.02);
}
.match-row .team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}
.match-row .team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-row .team.right {
  justify-content: flex-end;
  text-align: right;
}
.match-row .vs {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 70px;
  text-align: center;
}
.match-row .meta {
  color: var(--muted);
  font-size: 12.5px;
  text-align: right;
  min-width: 90px;
}

/* ------------------------------------------------------------- match room */

.room-head {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--surface);
}
.room-head .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}
.room-head .bg .art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.room-head .bg .glyph {
  display: none;
}
.room-head .bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--surface) 0%, rgba(26, 28, 33, 0.6) 50%, var(--surface) 100%);
}
.room-head .inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
}
.room-team {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.room-team.right {
  align-items: flex-end;
  text-align: right;
}
.room-team .tname {
  font-family: var(--font-display);
  font-size: 30px;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.room-team .tmeta {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
}
.team-key {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.team-key.a {
  background: var(--team-a);
}
.team-key.b {
  background: var(--team-b);
}
.room-score {
  text-align: center;
}
.room-score .score {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.room-score .score .win {
  color: var(--good);
}
.room-score .score .sep {
  color: var(--muted);
  margin: 0 10px;
}
.room-score .status {
  margin-top: 8px;
}
.room-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.room-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.room-meta .icon {
  width: 15px;
  height: 15px;
}

.room-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.roster {
  padding: 0;
  overflow: hidden;
}
.roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.roster-head .tname {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.roster-head .tname span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.roster.a {
  box-shadow: inset 0 3px 0 var(--team-a);
}
.roster.b {
  box-shadow: inset 0 3px 0 var(--team-b);
}
.p-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.p-row:last-child {
  border-bottom: 0;
}
.p-row.me {
  background: rgba(242, 92, 22, 0.06);
}
.p-row .pname {
  flex: 1;
  min-width: 0;
}
.p-row .pname a {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.p-row .pname a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.p-row .pname small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.p-row .crown {
  color: #f5c542;
  width: 15px;
  height: 15px;
}
.p-row .p-elo {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.p-row .p-elo small {
  display: block;
  font-size: 12px;
}

.center-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.turn-bar {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
  margin: 14px 0 18px;
}
.turn-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s linear;
}
.veto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.map-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  text-align: left;
  padding: 0;
  cursor: default;
  isolation: isolate;
}
.map-card .art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -1;
  transition:
    transform 0.3s,
    filter 0.3s;
}
.map-card .art .glyph {
  position: absolute;
  right: -6px;
  bottom: -18px;
  font-family: var(--font-display);
  font-size: 84px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
}
.map-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.75));
  z-index: -1;
}
.map-card .mname {
  position: absolute;
  left: 12px;
  bottom: 10px;
  right: 12px;
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.map-card .ban-label {
  position: absolute;
  top: 8px;
  left: 8px;
}
.map-card.banned .art {
  filter: grayscale(1) brightness(0.45);
}
.map-card.banned .mname {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.map-card.can-ban {
  cursor: pointer;
}
.map-card.can-ban:hover {
  border-color: var(--bad);
}
.map-card.can-ban:hover .art {
  transform: scale(1.05);
}
.map-card.can-ban .ban-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 60, 60, 0.18);
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.12em;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}
.map-card.can-ban:hover .ban-hover {
  opacity: 1;
}
.map-card.picked {
  border-color: var(--good);
  box-shadow: 0 0 0 1px var(--good);
}
.map-hero {
  aspect-ratio: auto;
  height: 190px;
}
.map-hero .mname {
  font-size: 34px;
  left: 20px;
  bottom: 16px;
}

.connect-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
}
.connect-box .btn-lg {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sub-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.sub-card h4 {
  font-size: 15px;
  margin-bottom: 12px;
}
.score-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.score-inputs .side {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  min-width: 0;
}
.score-inputs .colon {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--muted);
}
.stats-table .input {
  width: 58px;
  height: 32px;
  text-align: center;
  padding: 0 4px;
}
.stats-table td,
.stats-table th {
  padding: 6px 8px;
}
details summary {
  cursor: pointer;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.moss-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin-top: 16px;
}
.moss-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 14px;
}
.moss-row .grow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .moss-list {
    grid-template-columns: 1fr;
  }
}

.scoreboard .team-row td {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat {
  display: flex;
  flex-direction: column;
  height: 420px;
  padding: 0;
  overflow: hidden;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msg {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.chat-msg .body {
  min-width: 0;
  overflow-wrap: anywhere;
}
.chat-msg .who {
  font-weight: 700;
  margin-right: 6px;
}
.chat-msg .who.a {
  color: #8dbaff;
}
.chat-msg .who.b {
  color: #efc47a;
}
.chat-msg .who.admin {
  color: var(--accent);
}
.chat-msg time {
  color: var(--muted);
  font-size: 11.5px;
  margin-left: 4px;
}
.chat-msg.system {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  padding-left: 2px;
}
.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}

/* ---------------------------------------------------------------- profile */

.profile-hero {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
  background:
    linear-gradient(90deg, var(--surface) 35%, rgba(26, 28, 33, 0.7)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 16px),
    linear-gradient(120deg, #1d1f25, #291507);
}
.profile-hero .inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  flex-wrap: wrap;
}
.profile-hero .avatar {
  --size: 104px;
  border-radius: 14px;
  border: 2px solid var(--border-strong);
}
.profile-hero h1 {
  font-size: 36px;
  font-weight: 700;
}
.profile-hero .sub {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-2);
  font-size: 14px;
  margin-top: 6px;
}
.profile-hero .sub span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-hero .sub .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.profile-level {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(15, 16, 19, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 280px;
}
.profile-level .elo {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
}
.profile-level .level-progress {
  margin-top: 6px;
}
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-tile .label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.stat-tile .value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 4px;
}
.stat-tile .sub {
  font-size: 12.5px;
  color: var(--muted);
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

/* ELO chart */
.chart {
  position: relative;
  height: 260px;
  touch-action: pan-y;
}
.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}
.chart .grid-line {
  stroke: var(--border);
  stroke-width: 1;
}
.chart .axis-label {
  fill: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.chart .level-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
}
.chart .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart .area {
  fill: var(--accent);
  opacity: 0.1;
}
.chart .crosshair {
  stroke: var(--text-2);
  stroke-width: 1;
  opacity: 0.6;
}
.chart .end-dot,
.chart .hover-dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
}
.chart .end-label {
  fill: var(--text);
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  box-shadow: var(--shadow);
  font-size: 12.5px;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
  z-index: 2;
}
.chart-tip .v {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chart-tip .v i {
  width: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.chart-tip .d {
  color: var(--muted);
}

/* ------------------------------------------------------------ leaderboard */

.lb-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.lb-podium {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}
.lb-podium .place {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  width: 40px;
  color: var(--muted);
}
.lb-podium.p1 .place {
  color: #f5c542;
}
.lb-podium.p2 .place {
  color: #c9d1db;
}
.lb-podium.p3 .place {
  color: #d58a4f;
}
.lb-podium .avatar {
  --size: 52px;
}
.lb-podium b {
  font-size: 17px;
}
.rank {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--muted);
  width: 40px;
}

/* --------------------------------------------------------------- settings */

.settings-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.settings-nav {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
}
.settings-nav a:hover {
  background: var(--surface);
  color: var(--text);
}
.settings-nav .icon {
  width: 18px;
  height: 18px;
}
.phrase {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px dashed rgba(242, 92, 22, 0.55);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 16px;
  color: #ffc3a3;
  word-break: break-word;
}
.phrase span {
  flex: 1;
}
ol.steps-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
ol.steps-list b {
  color: var(--text);
}
.linked {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border);
}

/* ------------------------------------------------------------------- auth */

.auth-wrap {
  min-height: calc(100vh - var(--topbar-h) - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: min(420px, 100%);
  padding: 32px;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 32px;
  text-transform: uppercase;
}
.auth-card .sub {
  color: var(--text-2);
  margin: 6px 0 24px;
}
.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-foot {
  margin-top: 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
}

/* --------------------------------------------------------------- download */

.dl-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 20px 0 40px;
}
.dl-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 60px);
  line-height: 0.95;
  text-transform: uppercase;
}
.dl-hero p {
  color: var(--text-2);
  font-size: 17px;
  margin: 16px 0 24px;
}
.client-mock {
  width: 100%;
  max-width: 420px;
  justify-self: center;
  background: #121317;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.client-mock .bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0c0d10;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.client-mock .bar svg {
  width: 16px;
  height: 16px;
}
.client-mock .body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  padding: 20px;
}
.feature .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 12px;
}
.feature h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.feature p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}
code,
.code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 13px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}
pre.code {
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ admin */

.admin-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .room-grid {
    grid-template-columns: 1fr 1fr;
  }
  .room-grid .center-col {
    grid-column: 1 / -1;
    order: -1;
  }
  .stat-tiles {
    grid-template-columns: repeat(3, 1fr);
  }
  .admin-tiles {
    grid-template-columns: repeat(3, 1fr);
  }
  .nav-search {
    display: none;
  }
}

@media (max-width: 980px) {
  .play-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .hero,
  .dl-hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    max-width: 320px;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .ladder {
    grid-template-columns: repeat(5, 1fr);
  }
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }
  .lb-top {
    grid-template-columns: 1fr;
  }
  .online {
    display: none;
  }
}

@media (max-width: 760px) {
  html,
  body {
    font-size: 14px;
  }
  .topbar-inner {
    padding: 0 16px;
    gap: 12px;
  }
  .brand-name {
    display: none;
  }
  .nav-links a span {
    display: none;
  }
  .nav-links a {
    padding: 0 10px;
  }
  .user-chip .who {
    display: none;
  }
  .queue-pill .qp-text {
    display: none;
  }
  .view {
    padding: 20px 16px 60px;
  }
  .room-grid {
    grid-template-columns: 1fr;
  }
  .room-head .inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px;
  }
  .room-team,
  .room-team.right {
    align-items: center;
    text-align: center;
  }
  .room-score .score {
    font-size: 48px;
  }
  .stat-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-strip {
    grid-template-columns: 1fr 1fr;
  }
  .stat-strip > div:nth-child(2) {
    border-right: 0;
  }
  .stat-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
  .steps,
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .ladder {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .profile-level {
    margin-left: 0;
    min-width: 0;
    width: 100%;
  }
  .admin-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  .match-row {
    grid-template-columns: 1fr auto 1fr;
  }
  .match-row .meta {
    display: none;
  }
  .queue-banner,
  .queue-body {
    padding-left: 18px;
    padding-right: 18px;
  }
  .find-btn {
    font-size: 24px;
  }
  .ready-title {
    font-size: 34px;
  }
  .hero-art .float {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
