html[data-theme="dark"],
html:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0f1117;
  --panel: #181b24;
  --panel-2: #20242f;
  --border: #2a2f3a;
  --text: #e7e9ee;
  --muted: #8b93a7;
  --accent: #e3493b;
  --accent-2: #4a90d9;
  --ok: #2ea043;
  --ok-hover: #3fb950;
  --warn: #d29922;
  --danger: #cf3a3a;
  --danger-hover: #e55353;
  --radius: 12px;
  --header-bg: rgba(15, 17, 23, 0.7);
  --gradient-spot: #1b1f2b;
  --hub-bg: #0a0c10;
  --hub-surface: #0d0f14;
  --hub-sidebar: #111318;
  --hub-card: #161920;
  --hub-inset: #0d0f14;
  --hub-msg-text: #d5d9e3;
  --hover-bg: rgba(255, 255, 255, 0.04);
  --hover-bg-strong: rgba(255, 255, 255, 0.08);
  --success-text: #9fe6ad;
  --error-text: #f3a3a3;
  --avatar-from: #2a3140;
  --avatar-to: #1a2030;
  --member-name: #c8ceda;
  --card-shadow: none;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef0f4;
  --panel: #ffffff;
  --panel-2: #f3f4f8;
  --border: #d4d9e3;
  --text: #1a1d26;
  --muted: #5c6578;
  --accent: #c73e32;
  --accent-2: #2563b0;
  --ok: #1a7f37;
  --ok-hover: #116329;
  --warn: #9a6700;
  --danger: #cf222e;
  --danger-hover: #a40e26;
  --header-bg: rgba(255, 255, 255, 0.92);
  --gradient-spot: #dce4f0;
  --hub-bg: #e4e7ee;
  --hub-surface: #ffffff;
  --hub-sidebar: #f5f6f9;
  --hub-card: #ffffff;
  --hub-inset: #eef0f4;
  --hub-msg-text: #2b303b;
  --hover-bg: rgba(0, 0, 0, 0.04);
  --hover-bg-strong: rgba(0, 0, 0, 0.07);
  --success-text: #116329;
  --error-text: #a40e26;
  --avatar-from: #e8ebf2;
  --avatar-to: #d4dae6;
  --member-name: #2b303b;
  --card-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

:root {
  --radius: 12px;
  --header-height: 57px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, var(--gradient-spot), var(--bg));
  color: var(--text);
  min-height: 100vh;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-height);
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  color: var(--text);
  text-decoration: none;
}
.brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  background-color: var(--accent);
  -webkit-mask-image: url("/static/favicon.ico");
  mask-image: url("/static/favicon.ico");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.brand-text { line-height: 1; }
.site-header nav {
  display: flex;
  align-items: center;
  justify-self: end;
  flex-shrink: 0;
}
nav .nav-logout {
  display: flex;
  align-items: center;
}
nav a,
nav a:visited {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 600;
}
nav a:hover { color: var(--text); }
.theme-toggle {
  justify-self: center;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  vertical-align: middle;
  line-height: 0;
}
.theme-toggle-track {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 46px;
  height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}
.theme-toggle:hover .theme-toggle-track {
  border-color: var(--muted);
  background: var(--hover-bg-strong);
}
.theme-toggle-icon {
  font-size: 0.65rem;
  line-height: 1;
  z-index: 1;
  opacity: 0.45;
  transition: opacity 0.15s;
}
.theme-toggle-sun { color: var(--warn); }
.theme-toggle-moon { color: var(--accent-2); }
.theme-toggle[aria-pressed="false"] .theme-toggle-sun { opacity: 1; }
.theme-toggle[aria-pressed="true"] .theme-toggle-moon { opacity: 1; }
.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
  pointer-events: none;
}
.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(22px);
}

.container { max-width: 880px; margin: 0 auto; padding: 28px; }
.container-wide { max-width: 960px; }

.hero h1 { margin: 0 0 6px; font-size: 1.9rem; }
.hero h2 { margin: 0 0 6px; font-size: 1.2rem; }
.muted { color: var(--muted); }

.steam-profile-link,
.steam-profile-link:visited {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}
.steam-profile-link:hover {
  text-decoration: underline;
}
.steam-profile-link-ext {
  font-size: 0.82em;
  opacity: 0.8;
}

.nav-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}
.nav-user {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
a.nav-user,
a.nav-user:visited {
  color: var(--text);
  text-decoration: none;
  margin-left: 0;
}
a.nav-user:hover { opacity: 0.85; }
.nav-logout {
  display: flex;
  align-items: center;
  margin: 0;
}
.nav-logout-btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 11px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-logout-btn:hover {
  color: var(--text);
  border-color: var(--muted);
  background: var(--hover-bg-strong);
}
.btn-link {
  background: none;
  border: none;
  color: var(--accent-2);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
}
.btn-link:hover { text-decoration: underline; }

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
.home-panel { margin: 0; display: flex; flex-direction: column; min-height: 280px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-head h2 { margin: 0; font-size: 1.1rem; }
.home-section { margin-top: 28px; }
.home-section > h2 { margin: 0 0 10px; font-size: 1.2rem; }
.panel-locked { margin-top: auto; font-size: 0.9rem; }

.login-panel h2 { margin: 0 0 6px; font-size: 1.2rem; }

.chat-log {
  flex: 1;
  min-height: 160px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.chat-line { padding: 4px 0; line-height: 1.35; }
.chat-author { font-weight: 700; margin-right: 8px; color: var(--accent-2); }
.chat-empty { margin: 0; }
.chat-form {
  display: flex;
  gap: 8px;
}
.chat-form input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
}
.chat-form input:focus { outline: 2px solid var(--accent-2); border-color: transparent; }

.queue-preview {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  flex: 1;
}
.queue-preview li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.queue-preview li:last-child { border-bottom: none; }
.queue-actions { margin-top: auto; }
.form-inline { display: flex; flex-direction: column; gap: 10px; }

.has-tip { position: relative; cursor: help; }
.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 20;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.has-tip:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
button.has-tip { cursor: pointer; }

.compact-match { margin-top: 10px; }
.roster.compact li { padding: 2px 0; font-size: 0.92rem; }
.pool-label { margin: 8px 0 0; font-size: 0.85rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 16px 0;
  width: 100%;
  box-shadow: var(--card-shadow);
}

table.card { border-collapse: collapse; overflow: hidden; padding: 0; }
table.card th, table.card td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
table.card thead th {
  background: var(--panel-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
table.card tbody tr:last-child td { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.form { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.form input {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 1rem;
}
.form input:focus { outline: 2px solid var(--accent-2); border-color: transparent; }

select {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.95rem;
}
.form select { width: 100%; }
.checkbox { flex-direction: row !important; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
.role-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px 14px;
}
.role-picker legend { font-weight: 600; padding: 0 6px; }
.role-picker .radio {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.role-picker .radio input { width: auto; }
.match form select { margin-right: 6px; margin-bottom: 6px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  transition: filter 0.15s ease, background 0.15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: 6px 10px; font-size: 0.8rem; }
.btn.ok {
  background: var(--ok);
  color: #fff;
}
.btn.ok:hover {
  filter: none;
  background: var(--ok-hover);
}
.btn.captain {
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--border));
}
.btn.captain:hover {
  filter: none;
  background: color-mix(in srgb, var(--warn) 26%, transparent);
  border-color: var(--warn);
  color: var(--text);
}
.btn.warn { background: var(--warn); color: #1b1300; }
.btn.danger {
  background: var(--danger);
  color: #fff;
}
.btn.danger:hover {
  filter: none;
  background: var(--danger-hover);
}
.btn-login {
  background: var(--accent-2);
  color: #fff;
}
.btn-login:hover {
  filter: none;
  background: color-mix(in srgb, var(--accent-2) 86%, #fff);
  color: #fff;
}
.btn-discord {
  background: #5865f2;
  color: #fff;
}
.btn-discord:hover {
  filter: none;
  background: color-mix(in srgb, #5865f2 86%, #fff);
  color: #fff;
}
.auth-divider {
  text-align: center;
  margin: 12px 0;
  font-size: 0.9rem;
}

.inline { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  display: inline-block;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 6px;
}

.notice { font-weight: 600; }
.notice.success { border-color: var(--ok); color: var(--success-text); }
.notice.error { border-color: var(--danger); color: var(--error-text); }

.empty { text-align: center; color: var(--muted); }

.sep { border: none; border-top: 1px solid var(--border); margin: 32px 0 8px; }

.match-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.badge.win { background: rgba(46, 160, 67, 0.15); border-color: var(--ok); color: var(--success-text); }

.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.team h3 { margin: 0 0 6px; font-size: 1rem; }
.team.radiant h3 { color: #6fcf97; }
.team.dire h3 { color: #eb6f6f; }
.roster { list-style: none; margin: 0; padding: 0; }
.roster li { padding: 3px 0; border-bottom: 1px solid var(--border); }
.roster li:last-child { border-bottom: none; }
.roster a { margin-left: 6px; font-size: 0.8rem; }

@media (max-width: 600px) {
  .teams { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: 1fr; }
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  font-size: 0.9rem;
}

/* --- League hub (FACEIT-style home) --- */
body.hub-page {
  background: var(--hub-bg);
  overflow: hidden;
}

body.hub-page .site-header {
  position: relative;
}

.hub-shell {
  max-width: none;
  margin: 0;
  padding: 0;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

.hub {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 260px;
  height: 100%;
  background: var(--hub-surface);
}

.hub-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  overflow-y: auto;
  background: var(--hub-sidebar);
  border-right: 1px solid var(--border);
}

.hub-right {
  border-right: none;
  border-left: 1px solid var(--border);
  padding-top: 20px;
}

.hub-club {
  padding: 4px 8px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.hub-back { margin: 0 0 10px; font-size: 0.82rem; }
.hub-back a,
.hub-back a:visited {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.hub-back a:hover {
  color: var(--text);
  text-decoration: underline;
  opacity: 0.85;
}
.hub-club-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.hub-club-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  width: 100%;
  word-break: break-word;
}
.hub-club-status {
  margin-left: 0;
  flex-shrink: 0;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: none;
}
.hub-club-actions {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hub-club-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
}
.hub-club-actions form {
  margin: 0;
}
.hub-league-switch {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hub-league-switch select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  font-size: 0.85rem;
}
.hub-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 28px;
}
.hub-empty .card { max-width: 420px; text-align: center; }

.hub-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 4px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.hub-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.hub-nav-icon {
  width: 1rem;
  text-align: center;
  font-size: 0.72rem;
  opacity: 0.55;
}
.hub-nav-link:hover { color: var(--text); background: var(--hover-bg); }
.hub-nav-link.active {
  color: var(--text);
  background: var(--hover-bg-strong);
  border-left-color: var(--accent);
}
.hub-nav-link.active .hub-nav-icon { opacity: 1; color: var(--accent); }

.hub-section { padding: 8px 4px; }
.hub-section-title {
  margin: 0 0 6px;
  padding: 0 8px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.hub-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.hub-channel-row {
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 6px;
}
.hub-channel-row.active {
  background: var(--hover-bg-strong);
}
.hub-channel-row.active .hub-channel {
  color: var(--text);
}
.hub-channel-row:hover .hub-channel {
  color: var(--text);
  background: var(--hover-bg);
}
.hub-channel-row.active:hover .hub-channel {
  background: transparent;
}
.hub-channel:hover { color: var(--text); background: var(--hover-bg); }
.hub-channel.active {
  color: var(--text);
  background: var(--hover-bg-strong);
}
.hub-channel-row .hub-channel.active {
  background: transparent;
}
.hub-channel-delete {
  margin: 0;
  padding: 0 6px 0 0;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.hub-channel-row:hover .hub-channel-delete,
.hub-channel-row:focus-within .hub-channel-delete {
  opacity: 1;
}
.hub-channel-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.hub-channel-delete-btn:hover {
  background: rgba(207, 58, 58, 0.15);
  color: var(--danger);
}
.hub-channel-icon {
  opacity: 0.55;
  font-weight: 700;
}
.hub-channel-add {
  display: flex;
  gap: 6px;
  margin: 6px 4px 0;
  padding: 0 4px;
}
.hub-channel-add input {
  flex: 1;
  min-width: 0;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  font-size: 0.82rem;
}
.hub-channel-add input:focus {
  outline: 2px solid var(--accent-2);
  border-color: transparent;
}
.hub-inline-error {
  margin: 6px 8px 0;
  font-size: 0.75rem;
  color: var(--error-text);
  line-height: 1.35;
}
.hub-club-actions .hub-inline-error {
  margin: 4px 0 0;
}
.hub-queue-card .hub-inline-error {
  margin: 8px 0 0;
}
.hub-center-notice {
  margin: 0;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.hub-center-notice.error {
  color: var(--error-text);
  background: color-mix(in srgb, var(--danger) 10%, var(--hub-surface));
}
.hub-chat-compose + .hub-inline-error,
.hub-chat-locked + .hub-inline-error {
  padding: 0 20px 12px;
  margin: 0;
  border-top: 1px solid var(--border);
  background: var(--hub-sidebar);
}

.hub-center-queue-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: stretch;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--hub-surface), color-mix(in srgb, var(--hub-surface) 92%, var(--hub-bg)));
  overflow: visible;
  position: relative;
  z-index: 40;
}

/* Modern matchmaking queue bar */
.hub-queue-modern {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin: 0;
  padding: 12px 16px;
  width: 100%;
  background: var(--hub-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hub-queue-modern.queue-active {
  border-color: color-mix(in srgb, var(--ok) 35%, var(--border));
  box-shadow: 0 4px 28px rgba(46, 160, 67, 0.1);
}
.hub-queue-modern.in-queue {
  border-color: color-mix(in srgb, var(--ok) 50%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 8%, var(--hub-card)), var(--hub-card));
}
.hub-queue-modern-body {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 200px;
}
.hub-queue-ring-wrap { flex-shrink: 0; }
.hub-queue-ring {
  --queue-pct: 0%;
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(
    var(--ok) calc(var(--queue-pct) * 1%),
    var(--hub-inset) 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.35s ease;
}
.hub-queue-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--hub-card);
}
.hub-queue-ring-count {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hub-queue-modern-info { flex: 1; min-width: 120px; }
.hub-queue-row-modern { margin-bottom: 6px; }
.hub-queue-modern-title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hub-queue-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  opacity: 0.5;
}
.hub-queue-pulse.live {
  background: var(--ok);
  opacity: 1;
  box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.5);
  animation: queue-pulse 2s ease infinite;
}
@keyframes queue-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(46, 160, 67, 0); }
}
.hub-queue-tip-trigger {
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: auto;
  cursor: default;
}
.hub-queue-progress-modern {
  height: 5px;
  margin-bottom: 0;
  border-radius: 999px;
  overflow: hidden;
}
.hub-queue-progress-modern .hub-queue-progress-fill {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ok), #3fb950);
  box-shadow: 0 0 10px rgba(46, 160, 67, 0.35);
  transition: width 0.35s ease;
}
.hub-queue-modern-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.hub-queue-status-chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--hub-inset);
  border: 1px solid var(--border);
}
.hub-queue-status-chip.closed { opacity: 0.75; }
.queue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: inherit;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.queue-btn-icon {
  font-size: 0.65rem;
  line-height: 1;
}
.queue-btn-join {
  background: linear-gradient(135deg, #2ea043 0%, #238636 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(46, 160, 67, 0.35);
}
.queue-btn-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(46, 160, 67, 0.45);
}
.queue-btn-join:active { transform: translateY(0); }
.queue-btn-leave {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid color-mix(in srgb, var(--danger) 45%, var(--border));
}
.queue-btn-leave:hover {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border-color: var(--danger);
}
.queue-btn-login {
  background: linear-gradient(135deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 80%, #1a4a8a));
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 144, 217, 0.3);
}
.queue-btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(74, 144, 217, 0.4);
}
.queue-btn-in-match {
  background: linear-gradient(135deg, var(--warn), color-mix(in srgb, var(--warn) 75%, #8a5a00));
  color: #fff;
  box-shadow: 0 4px 14px rgba(210, 153, 34, 0.28);
  text-decoration: none;
}
.queue-btn-in-match:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(210, 153, 34, 0.38);
}
.hub-queue-modern .hub-inline-error {
  flex: 1 1 100%;
  margin: 0;
  text-align: left;
}

.hub-queue-card-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0;
  padding: 8px 12px;
  width: 100%;
  max-width: 480px;
}
.hub-queue-compact-main {
  flex: 1;
  min-width: 140px;
}
.hub-queue-card-compact .hub-queue-row {
  margin-bottom: 6px;
}
.hub-queue-card-compact .hub-queue-progress {
  margin-bottom: 0;
}
.hub-queue-compact-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 108px;
}
.hub-queue-card-compact .hub-queue-toggle {
  flex-direction: row;
  width: 100%;
}
.hub-queue-card-compact .hub-queue-form .btn {
  white-space: nowrap;
}
.hub-queue-hint-compact {
  flex: 1 1 100%;
  margin: 0;
  text-align: right;
  font-size: 0.7rem;
}
.hub-queue-card-compact .hub-inline-error {
  flex: 1 1 100%;
  margin: 0;
  text-align: right;
}
.hub-queue-card-compact .hub-queue-login {
  margin: 0;
  font-size: 0.78rem;
  white-space: nowrap;
}
.hub-center-head-channel {
  padding-top: 12px;
  padding-bottom: 12px;
}

.hub-queue-card {
  margin: 0 4px;
  padding: 10px;
  background: var(--hub-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.hub-queue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}
.hub-queue-progress {
  height: 4px;
  margin-bottom: 12px;
  background: var(--hub-inset);
  border-radius: 999px;
  overflow: hidden;
}
.hub-queue-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ok), color-mix(in srgb, var(--ok) 70%, var(--warn)));
  border-radius: 999px;
  transition: width 0.25s ease;
  min-width: 0;
}
.hub-queue-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.hub-queue-dot.live { background: var(--ok); box-shadow: 0 0 8px rgba(46,160,67,0.5); }
.hub-queue-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-queue-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--hub-inset);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  flex-shrink: 0;
}
.hub-queue-tip {
  position: relative;
  flex-shrink: 0;
  cursor: help;
}
.hub-queue-tip-text {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  transform: none;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: var(--card-shadow);
  transition: opacity 0.15s, visibility 0.15s;
}
.hub-queue-tip-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-queue-tip:hover .hub-queue-tip-text,
.hub-queue-tip:focus-within .hub-queue-tip-text {
  visibility: visible;
  opacity: 1;
}
.hub-queue-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hub-queue-toggle > [hidden] {
  display: none !important;
}
.hub-queue-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hub-queue-form { margin: 0; width: 100%; }
.hub-queue-hint {
  margin: 2px 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}
.hub-queue-login {
  margin: 0;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.35;
}
.hub .btn-login {
  background: color-mix(in srgb, var(--accent-2) 14%, var(--hub-card));
  color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent-2) 48%, var(--border));
}
.hub .btn-login:hover {
  background: color-mix(in srgb, var(--accent-2) 24%, var(--hub-card));
  border-color: var(--accent-2);
  color: var(--text);
}
.hub-chat-locked .btn-login {
  flex: 1;
  max-width: 280px;
  margin: 0 auto;
}

.hub-live-preview { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.hub-live-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  margin: 2px 0;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
.hub-live-item:hover { background: var(--hover-bg); }

.hub-center {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--hub-surface);
}

.hub-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hub-center-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.hub-center-head-actions {
  flex-shrink: 0;
  margin-left: auto;
}
.hub-center-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hub-info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  cursor: help;
  position: relative;
  flex-shrink: 0;
  outline: none;
}
.hub-info-tip:hover,
.hub-info-tip:focus-visible {
  color: var(--text);
  border-color: var(--muted);
}
.hub-info-tip-text {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: max-content;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 500;
  font-style: normal;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.45;
  box-shadow: var(--card-shadow);
  transition: opacity 0.15s, visibility 0.15s;
}
.hub-info-tip:hover .hub-info-tip-text,
.hub-info-tip:focus-visible .hub-info-tip-text {
  visibility: visible;
  opacity: 1;
}
.rating-tip-pos {
  color: var(--ok);
  font-weight: 700;
}
.rating-tip-neg {
  color: var(--danger);
  font-weight: 700;
}
.hub-center-icon {
  color: var(--muted);
  font-weight: 800;
  font-size: 1.1rem;
}

.hub-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hub-chat-empty {
  margin: auto;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hub-msg {
  display: flex;
  gap: 12px;
  align-items: center;
}
.hub-msg-body { min-width: 0; flex: 1; }
.hub-msg-head {
  margin-bottom: 0px;
  font-size: 1rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.hub-msg-time {
  font-size: 0.72rem;
  font-weight: 500;
}
.hub-center-head .hub-head-meta {
  margin-left: auto;
  font-size: 0.85rem;
}
.hub-table-player {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hub-table .member-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}
.hub-msg-body p {
  margin: 0;
  color: var(--hub-msg-text);
  line-height: 22px;
  word-break: break-word;
  font-size: 1rem;
}

.hub-chat-compose {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--hub-sidebar);
  flex-shrink: 0;
}
.hub-chat-compose input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 0.95rem;
}
.hub-chat-compose input:focus {
  outline: none;
  border-color: var(--accent-2);
}
.hub-chat-locked {
  font-size: 0.9rem;
  justify-content: center;
}

.hub-scroll-panel {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
}
.hub-table th,
.hub-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.hub-table thead th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hub-standings-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.hub-standings-table thead th.num {
  text-align: right;
}
.standings-rank {
  width: 2.5rem;
  font-variant-numeric: tabular-nums;
}
.standings-player {
  min-width: 10rem;
}
.standings-player-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.standings-player-name {
  font-weight: 600;
}
.standings-player-mmr {
  display: block;
  font-size: 0.78rem;
  margin-top: 2px;
}
.standings-rating {
  font-weight: 700;
  color: var(--accent);
}
.standings-record {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--hub-card);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.standings-winrate {
  font-weight: 600;
}
.hub-standings-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.hub-match-card {
  background: var(--hub-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.hub-members-title {
  margin: 0 0 10px;
  padding: 0 8px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.hub-member-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0 4px;
}
.hub-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}
.hub-member-role {
  margin-left: auto;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.hub-member-action {
  margin-left: auto;
  flex-shrink: 0;
}
.hub-member.captain .member-avatar {
  box-shadow: 0 0 0 2px rgba(255, 196, 86, 0.35);
}
.hub-member:hover { background: var(--hover-bg); }
.hub-member.is-you .hub-member-name { color: var(--accent-2); }
.hub-member-empty {
  padding: 6px 8px;
  font-size: 0.85rem;
  list-style: none;
}

.member-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--avatar-from), var(--avatar-to));
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
  object-fit: cover;
}
.member-avatar.img {
  padding: 0;
  background: var(--avatar-to);
}
.hub-member.online .member-avatar {
  border-color: rgba(46, 160, 67, 0.45);
}
.hub-member-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--member-name);
}
.hub-member.offline .hub-member-name { color: var(--muted); }

.btn-block { width: 100%; text-align: center; }

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  max-width: 460px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--accent-2);
}

body.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.auth-page .site-footer {
  margin-top: auto;
}
.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  width: 100%;
  padding: 32px 28px 48px;
}
.auth-layout {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.auth-hero {
  text-align: center;
  margin-bottom: 4px;
}
.auth-hero h1 {
  margin-bottom: 8px;
}
.auth-layout .auth-tabs {
  max-width: none;
}
.auth-layout .card {
  margin-left: 0;
  margin-right: 0;
}
.auth-layout .card.form {
  margin-bottom: 0;
}
.auth-layout .form {
  max-width: none;
}

.section-title {
  margin: 24px 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
}
.section-title .badge { vertical-align: middle; }

.league-create-form { max-width: 480px; }
.league-create-form .section-title { margin-top: 0; }

.league-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.league-card {
  display: block;
  text-decoration: none;
  color: inherit;
  margin: 0;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.league-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.league-card-past { opacity: 0.85; }
.league-card-mine { border-color: rgba(46, 160, 67, 0.35); }
.league-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.league-card-title {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}
.league-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.league-card-badges .badge,
.hub-club-status {
  margin-left: 0;
}
.league-card-date { margin: 6px 0 0; font-size: 0.82rem; }
.league-card-meta { margin: 4px 0 0; font-size: 0.82rem; }
.league-card-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(74, 144, 217, 0.15);
  color: var(--accent-2);
  margin-right: 4px;
}
.league-admin-actions { margin-bottom: 12px; }
.hub-manage .card { margin-bottom: 14px; }
.hub-manage-danger { border-color: rgba(220, 80, 80, 0.35); }
.league-card-past { display: flex; flex-direction: column; gap: 8px; }
.league-card-link { color: inherit; text-decoration: none; }
.league-card-link:hover { color: var(--accent-2); }
.hub-membership { margin-top: 10px; }
.league-membership-form { margin-top: 8px; }
.league-membership-hint { margin: 8px 0 0; font-size: 0.85rem; }

.profile-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}
.profile-preview {
  text-align: center;
  padding: 24px 16px;
}
.profile-avatar-wrap { margin-bottom: 12px; }
.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--avatar-from), var(--avatar-to));
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
}
.profile-preview-name { margin: 0 0 4px; }
.profile-preview-meta { margin: 8px 0 0; font-size: 0.85rem; }
.profile-form .section-title { margin-top: 20px; }
.profile-form .section-title:first-child { margin-top: 0; }
.form-hint { margin: 4px 0 12px; font-size: 0.85rem; }
.auth-discord-hint { text-align: center; margin-top: 8px; }
.profile-setup { margin-bottom: 16px; }
.profile-setup-steps {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 8px;
}
.profile-setup-steps li.done { color: var(--ok, #3d9970); font-weight: 600; }
.profile-main { min-width: 0; }
.profile-form-card { padding: 24px; }
.profile-form-card .profile-form,
.profile-form-card .profile-delete { padding: 0; border: none; background: none; box-shadow: none; }
.profile-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}
.profile-delete .section-title { color: var(--danger, #c0392b); margin-top: 0; }

@media (max-width: 720px) {
  .hub-center-queue-bar {
    justify-content: stretch;
    padding: 8px 12px;
  }
  .hub-queue-card-compact {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  body.hub-page { overflow: auto; }
  .hub-shell { height: auto; min-height: calc(100vh - var(--header-height)); overflow: visible; }
  .hub {
    grid-template-columns: 1fr;
    height: auto;
  }
  .hub-sidebar { border-right: none; border-bottom: 1px solid var(--border); max-height: none; }
  .hub-right { border-left: none; border-top: 1px solid var(--border); }
  .hub-center { min-height: 420px; }
  .hub-chat-body { min-height: 280px; max-height: 420px; }
}

.match-room-page .container {
  max-width: 1100px;
}

.match-room-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.match-contact-admin,
.match-cancel-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.match-cancel-form {
  margin: 0;
}

.match-room-back {
  display: inline-block;
  margin-bottom: 8px;
  text-decoration: none;
}

.match-room-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.match-room-main,
.match-room-chat {
  min-height: 360px;
}

.match-pick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.match-pick-grid form {
  margin: 0;
}

.match-room-teams {
  margin-top: 20px;
}

.match-room-chat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.match-room-chat-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.match-chat-body {
  min-height: 260px;
  max-height: 420px;
}

.match-contact-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.match-contact-admin input {
  min-width: 220px;
}

.hub-match-link-wrap {
  margin: 10px 0 0;
}

.hub-match-link {
  font-weight: 600;
  text-decoration: none;
}

.hub-match-link:hover {
  text-decoration: underline;
}

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

.hub-accept-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.hub-accept-modal[hidden] {
  display: none;
}
.hub-accept-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.hub-accept-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.hub-accept-card h2 {
  margin-top: 0;
}
.hub-accept-count {
  font-size: 1.25rem;
  margin: 16px 0;
}
.hub-accept-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}
.hub-accept-actions .btn {
  min-width: 120px;
}

.label-optional {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: lowercase;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: rgba(74, 144, 217, 0.08);
}

.dotabuff-link,
.steam-profile-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}
.dotabuff-link:hover,
.steam-profile-link:hover { text-decoration: underline; }
.external-link-icon { opacity: 0.65; font-size: 0.82em; }

.stats-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(74, 144, 217, 0.12), rgba(227, 73, 59, 0.06));
  border-color: rgba(74, 144, 217, 0.25);
}
.stats-banner-copy strong { display: block; margin-bottom: 2px; }
.stats-banner-hint { margin: 0; font-size: 0.85rem; }
.stats-source-note {
  margin: 0 0 12px;
  font-size: 0.8rem;
}
.stats-source-note code {
  font-size: 0.78rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.stats-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
.stats-loading[hidden] { display: none; }
.stats-loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: stats-spin 0.7s linear infinite;
}
@keyframes stats-spin { to { transform: rotate(360deg); } }

.hub-stats-table td { vertical-align: middle; }
.stats-rank {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(210, 153, 34, 0.15);
  color: var(--warn);
}
.stats-heroes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.stats-hero-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.78rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.stats-none { font-style: italic; text-transform: lowercase; }
