/* DuelDesk - Pro UI baseline (dark theme) */

:root {
  --bg: #070b14;
  --surface: rgba(15, 23, 42, 0.72);
  --surface-2: rgba(15, 23, 42, 0.52);
  --text: #e5e7eb;
  --muted: rgba(229, 231, 235, 0.74);
  --muted-2: rgba(229, 231, 235, 0.56);
  --border: rgba(255, 255, 255, 0.10);

  --brand: #60a5fa;
  --brand-ink: #cfe4ff;
  --brand-2: #22d3ee;

  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.40);

  --radius: 18px;
  --radius-sm: 12px;

  --container: 1120px;

  --font-body: "Oxanium", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Silkscreen", ui-sans-serif, system-ui, sans-serif;

  /* Space reserved for the fixed footer. */
  --footer-space: 74px;
}

* { box-sizing: border-box; }

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

:focus-visible {
  outline: 3px solid rgba(96, 165, 250, 0.35);
  outline-offset: 2px;
  border-radius: 10px;
}

::selection {
  background: rgba(34, 211, 238, 0.22);
}

/* Background */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 30% -10%, rgba(96, 165, 250, 0.12), rgba(7, 11, 20, 0)),
    radial-gradient(1000px 650px at 100% 110%, rgba(34, 211, 238, 0.10), rgba(7, 11, 20, 0));
}

.orb {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 999px;
  filter: blur(44px);
  opacity: 0.32;
  transform: translateZ(0);
}

.orb-a {
  top: -240px;
  left: -220px;
  background: radial-gradient(circle at 30% 30%, rgba(96, 165, 250, 0.65), rgba(96, 165, 250, 0));
}

.orb-b {
  bottom: -260px;
  right: -220px;
  background: radial-gradient(circle at 35% 35%, rgba(34, 211, 238, 0.60), rgba(34, 211, 238, 0));
}

.grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 20%, rgba(0,0,0,0.75), rgba(0,0,0,0));
  opacity: 0.45;
}

/* Layout */

.container {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 20px calc(56px + var(--footer-space));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 20, 0.88);
}

.topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.72), rgba(255,255,255,0) 55%),
    linear-gradient(135deg, rgba(96, 165, 250, 0.95), rgba(34, 211, 238, 0.95));
  box-shadow: 0 18px 46px rgba(96, 165, 250, 0.22);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.58);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav__link:hover {
  background: rgba(96, 165, 250, 0.10);
  color: var(--brand-ink);
}

.nav__link[aria-current="page"] {
  background: rgba(96, 165, 250, 0.14);
  color: var(--brand-ink);
}

.topbar__cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 20, 0.86);
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer__muted {
  color: var(--muted-2);
  font-size: 13px;
}

/* Components */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.60);
  box-shadow: var(--shadow-sm);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-sm);
}

.btn:disabled:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.btn--primary {
  border-color: rgba(96, 165, 250, 0.30);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.92), rgba(34, 211, 238, 0.92));
  color: rgba(7, 11, 20, 0.96);
  box-shadow: 0 26px 70px rgba(96, 165, 250, 0.22);
}

.btn--primary:hover {
  box-shadow: 0 32px 84px rgba(96, 165, 250, 0.26);
}

.btn--ghost {
  background: rgba(15, 23, 42, 0.46);
}

.btn--danger {
  border-color: rgba(251, 113, 133, 0.26);
  background: rgba(251, 113, 133, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.btn--danger:hover {
  box-shadow: 0 32px 84px rgba(251, 113, 133, 0.12);
}

.btn--compact {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.btn.is-copied {
  border-color: rgba(52, 211, 153, 0.26);
  background: rgba(52, 211, 153, 0.10);
}

.link {
  color: var(--brand);
  font-weight: 700;
}

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

.userchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: var(--shadow-sm);
}

.userchip__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.95);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

.userchip__avatar {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 11, 20, 0.40);
  object-fit: cover;
}

.userchip__name {
  font-weight: 800;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand-ink);
  background: rgba(96, 165, 250, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.pill--soft {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
  color: rgba(229, 231, 235, 0.86);
}

.card {
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card--nested {
  background: rgba(7, 11, 20, 0.28);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
}

.card--link {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card--link:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.26);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.card__header {
  padding: 18px 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.card__title {
  margin: 0;
  font-size: 18px;
}

.card__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card__body {
  padding: 18px;
}

.card__footer {
  padding: 16px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.section { margin-top: 22px; }

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

.section__title {
  margin: 0;
  font-size: 18px;
}

.section__meta {
  color: var(--muted-2);
  font-size: 13px;
}

.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 18px;
}

.pagehead__title {
  margin: 0;
  font-size: 30px;
}

.pagehead__lead {
  margin: 6px 0 0;
  color: var(--muted);
}

.pagehead__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.paneltabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  flex-wrap: wrap;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.52);
  box-shadow: var(--shadow-sm);
}

.paneltabs__tab {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: rgba(229, 231, 235, 0.78);
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.paneltabs__tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(229, 231, 235, 0.92);
}

.paneltabs__tab.is-active {
  background:
    radial-gradient(70px 40px at 30% 20%, rgba(255,255,255,0.14), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(96, 165, 250, 0.30), rgba(34, 211, 238, 0.22));
  color: rgba(229, 231, 235, 0.98);
  box-shadow: 0 18px 46px rgba(96, 165, 250, 0.14);
}

.tpanel { margin-top: 18px; }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: stretch;
}

.hero__copy {
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__title {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.hero__lead {
  margin: 12px 0 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 15px;
}

.hero__actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero__panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.stat {
  padding: 16px 16px 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat__label {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat__value {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

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

.cards--stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gamegrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gamecard__media {
  padding: 14px 14px 0;
}

.gamecard__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 11, 20, 0.40);
  box-shadow: var(--shadow-sm);
}

.gamecard__name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.statline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.statline__label {
  color: var(--muted-2);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.statline__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
}

.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.meta__dot {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.20);
  border-radius: 999px;
}

.gameicon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 11, 20, 0.40);
  object-fit: cover;
  vertical-align: middle;
  margin-right: 8px;
}

.muted { color: var(--muted-2); }

.empty {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.40);
}

.empty--compact {
  padding: 16px;
}

.empty__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.empty__hint {
  margin-top: 6px;
  color: var(--muted);
}

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow-sm);
  margin: 10px 0 16px;
  transition: opacity 200ms ease, transform 200ms ease;
}

.alert.is-dismissed {
  opacity: 0;
  transform: translateY(-4px);
}

.alert__icon {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.alert--success {
  border-color: rgba(52, 211, 153, 0.26);
  background: var(--success-bg);
}

.alert--success .alert__icon { background: var(--success); }

.alert--error {
  border-color: rgba(251, 113, 133, 0.26);
  background: var(--danger-bg);
}

.alert--error .alert__icon { background: var(--danger); }

.alert__text {
  font-weight: 700;
}

.codeblock {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.codeblock code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  color: rgba(229, 231, 235, 0.92);
}

.tablewrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.52);
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.table.table--compact th,
.table.table--compact td {
  padding: 10px 12px;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.table thead th {
  position: sticky;
  top: 0;
  background: rgba(7, 11, 20, 0.92);
  color: rgba(229, 231, 235, 0.72);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}

.table tbody tr:hover td {
  background: rgba(96, 165, 250, 0.06);
}

.table__strong {
  font-weight: 800;
}

.table__right {
  text-align: right;
}

.row--me td {
  background: rgba(52, 211, 153, 0.06);
}

.form { margin-top: 10px; }

.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form__hint {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 600;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field--full { grid-column: 1 / -1; }

.field__label {
  font-size: 13px;
  font-weight: 800;
  color: rgba(229, 231, 235, 0.90);
}

.input,
.select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 11, 20, 0.35);
  color: rgba(229, 231, 235, 0.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  font-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.input--compact {
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  width: 96px;
}

.input--xs {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  width: 70px;
}

.input--date {
  width: 200px;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

.select { appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, rgba(229,231,235,0.55) 50%),
  linear-gradient(135deg, rgba(229,231,235,0.55) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.select--compact {
  padding: 9px 34px 9px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.input:focus,
.select:focus {
  border-color: rgba(96, 165, 250, 0.40);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
  outline: none;
}

.input--error {
  border-color: rgba(251, 113, 133, 0.40);
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}

.field__error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.inline { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.pickban-grid .btn {
  justify-content: flex-start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.dl {
  margin: 0;
}

.dl__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dl__row:last-child { border-bottom: 0; }

.dl dt {
  color: var(--muted-2);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dl dd {
  margin: 0;
  font-weight: 700;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.checklist li {
  position: relative;
  padding-left: 26px;
  color: rgba(229, 231, 235, 0.88);
  font-weight: 700;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.70), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, rgba(96, 165, 250, 0.92), rgba(34, 211, 238, 0.92));
  box-shadow: 0 18px 46px rgba(96, 165, 250, 0.18);
}

/* Bracket (tree view) */

.bracketview {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(15, 23, 42, 0.52);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.bracketview__scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.bracketview__scroll.is-panning {
  cursor: grabbing;
}

.bracketview__matrix {
  --bracket-col: 260px;
  --bracket-gap: 18px;
  --bracket-row: 58px;
  --bracket-row-gap: 16px;

  position: relative;
  display: flex;
  align-items: stretch;
  gap: 22px;
  padding: 16px;
  min-width: max-content;
  contain: layout paint;
  will-change: transform;
}

.bracketview__main {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bracketsection__head {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(229, 231, 235, 0.70);
  margin-bottom: 10px;
}

.bracketrail {
  width: calc(var(--rail-cols) * var(--bracket-col) + (var(--rail-cols) - 1) * var(--bracket-gap));
  display: flex;
  justify-content: flex-start;
}

.bracketrail--end {
  justify-content: flex-end;
}

.bracketgrid {
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--bracket-col));
  grid-template-rows: repeat(var(--rows), var(--bracket-row));
  column-gap: var(--bracket-gap);
  row-gap: var(--bracket-row-gap);
  width: max-content;
  contain: layout paint;
}

.matchcard {
  appearance: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  width: 100%;
  align-self: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 11, 20, 0.40);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.matchcard--clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.matchcard--clickable:active {
  transform: translateY(0);
}

.bracketlines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.bracketlines .line {
  fill: none;
  stroke: rgba(229, 231, 235, 0.12);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bracketlines .line--win {
  stroke: rgba(96, 165, 250, 0.24);
}

.bracketlines .line--los {
  stroke: rgba(229, 231, 235, 0.12);
}

.bracketlines .line--drop {
  stroke: rgba(251, 191, 36, 0.92);
  stroke-width: 2;
  stroke-dasharray: 6 8;
  opacity: 0;
}

.bracketview[data-show-drop-lines="1"] .bracketlines .line--drop {
  opacity: 0.08;
}

.bracketlines .line.is-active {
  opacity: 1;
  stroke-width: 3;
}

.matchcard.is-target {
  border-color: rgba(251, 191, 36, 0.28);
  box-shadow: 0 28px 90px rgba(251, 191, 36, 0.10);
}

.matchcard.is-confirmed {
  border-color: rgba(96, 165, 250, 0.22);
}

.matchcard.is-reported {
  border-color: rgba(251, 191, 36, 0.18);
}

.matchcard.is-reported .matchcard__score {
  color: rgba(251, 191, 36, 0.80);
}

.matchcard.is-disputed {
  border-color: rgba(251, 113, 133, 0.22);
  box-shadow: 0 24px 80px rgba(251, 113, 133, 0.08);
}

.matchcard.is-disputed .matchcard__score {
  color: rgba(251, 113, 133, 0.90);
}

.matchcard__slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 64px 12px 14px;
  min-height: 36px;
}

.matchcard__slot + .matchcard__slot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.matchcard__name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
  color: rgba(229, 231, 235, 0.92);
}

.matchcard__slot.is-empty .matchcard__name {
  color: rgba(229, 231, 235, 0.55);
  font-weight: 800;
}

.matchcard__score {
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  color: rgba(229, 231, 235, 0.72);
  font-weight: 900;
  min-width: 20px;
  text-align: right;
}

.matchcard__slot.is-winner {
  background: rgba(52, 211, 153, 0.10);
}

.matchcard__slot.is-winner .matchcard__score {
  color: rgba(52, 211, 153, 0.95);
}

.matchcard__tag {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 11, 20, 0.78);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 11px;
  color: rgba(229, 231, 235, 0.50);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.matchcard__alert {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.34);
  color: rgba(251, 191, 36, 0.95);
  box-shadow: 0 18px 60px rgba(251, 191, 36, 0.10);
  pointer-events: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.bracketfinal {
  flex: 0 0 auto;
  width: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bracketfinal .matchcard {
  margin-top: 10px;
}

.bracketfinal__cols {
  --final-cols: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--bracket-gap);
  width: calc(var(--final-cols) * var(--bracket-col) + (var(--final-cols) - 1) * var(--bracket-gap));
}

.bracketfinal__col {
  width: var(--bracket-col);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bracketfinal__note {
  margin-top: 10px;
  max-width: var(--bracket-col);
}

/* Round robin */

.rrmatrix {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 16px;
  min-width: max-content;
}

.rrstandings {
  flex: 0 0 360px;
  width: 360px;
}

.rrrounds {
  display: flex;
  align-items: flex-start;
  gap: var(--bracket-gap);
}

.rrround {
  width: var(--bracket-col);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rrround__head {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(229, 231, 235, 0.70);
}

.rrround__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Modal */

.modal {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  max-width: min(740px, calc(100vw - 24px));
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.modal__inner {
  width: 100%;
}

.modal__inner.card {
  background: #070b14;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 46px 160px rgba(0, 0, 0, 0.72);
}

.modal__header {
  padding: 16px 18px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.modal__title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 18px;
}

.modal__subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.modal__body {
  padding: 18px;
}

.modal__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.modal__side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal__side--right {
  align-items: flex-end;
  text-align: right;
}

.modal__label {
  color: rgba(229, 231, 235, 0.68);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.modal__name {
  font-weight: 900;
  font-size: 18px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.modal__score {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 11, 20, 0.30);
  font-weight: 900;
  font-size: 16px;
}

.modal__small {
  margin-top: 12px;
  color: rgba(229, 231, 235, 0.70);
  font-weight: 700;
}

/* Responsive */

@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gamegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .topbar__inner { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .nav { width: 100%; justify-content: center; }
  .topbar__cta { width: 100%; justify-content: center; }
  .cards { grid-template-columns: 1fr; }
  .cards--stats { grid-template-columns: 1fr; }
  .gamegrid { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .pagehead { flex-direction: column; align-items: stretch; }
  .pagehead__actions { justify-content: flex-start; }

  .bracketview__matrix {
    --bracket-col: 236px;
    --bracket-gap: 14px;
    --bracket-row: 54px;
    --bracket-row-gap: 12px;
    padding: 14px;
  }

  .modal__row {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .modal__side--right {
    align-items: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .card--link,
  .alert { transition: none; }
}

/* Print (export PDF) */

@page {
  size: landscape;
  margin: 12mm;
}

@media print {
  .bg,
  .topbar,
  .footer,
  .pagehead,
  [data-tournament-tabs] { display: none !important; }

  [data-tpanel] { display: none !important; }
  [data-tpanel="bracket"],
  [data-tpanel="bracket"][hidden] { display: block !important; }

  .tpanel,
  .bracketview { box-shadow: none !important; border: 0 !important; background: transparent !important; }

  .bracketview__scroll { overflow: visible !important; }
  .bracketview__matrix { transform: none !important; }
  .bracketlines .line--drop { opacity: 0.08 !important; }

  a { color: inherit; text-decoration: none; }
}
