/* ============================================================
   Лига Дока — Tournament site
   Dark fantasy aesthetic — original design
   ============================================================ */

:root {
  /* Surfaces */
  --bg-0: oklch(0.10 0.012 28);          /* obsidian */
  --bg-1: oklch(0.13 0.018 28);          /* card */
  --bg-2: oklch(0.16 0.024 28);          /* elevated */
  --bg-3: oklch(0.20 0.030 28);          /* hover */

  /* Borders */
  --line-1: oklch(0.25 0.030 28);
  --line-2: oklch(0.32 0.050 25);
  --line-gold: oklch(0.55 0.090 80);

  /* Text */
  --ink-0: oklch(0.96 0.012 70);
  --ink-1: oklch(0.82 0.012 70);
  --ink-2: oklch(0.62 0.012 70);
  --ink-3: oklch(0.45 0.012 70);

  /* Brand */
  --blood:   oklch(0.50 0.18 25);
  --blood-d: oklch(0.40 0.16 25);
  --blood-l: oklch(0.62 0.18 25);
  --ember:   oklch(0.68 0.18 45);

  /* Podium */
  --gold:   oklch(0.82 0.14 88);
  --gold-d: oklch(0.62 0.13 80);
  --silver: oklch(0.85 0.020 240);
  --silver-d: oklch(0.62 0.020 240);
  --bronze: oklch(0.62 0.12 55);
  --bronze-d: oklch(0.50 0.10 55);

  /* Secondary */
  --steel:   oklch(0.55 0.060 245);
  --steel-d: oklch(0.30 0.060 245);

  /* Status */
  --ok:   oklch(0.70 0.14 145);
  --warn: oklch(0.78 0.14 75);
  --bad:  oklch(0.62 0.18 25);

  /* Type */
  --f-display: "Cinzel", "Trajan Pro", serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", "SF Mono", monospace;

  /* Shadow */
  --sh-1: 0 1px 0 0 oklch(1 0 0 / 0.04) inset, 0 8px 24px -12px oklch(0 0 0 / 0.6);
  --sh-2: 0 1px 0 0 oklch(1 0 0 / 0.05) inset, 0 24px 60px -20px oklch(0 0 0 / 0.7);

  --r-1: 4px;
  --r-2: 8px;
  --r-3: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, oklch(0.30 0.10 25 / 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 20%, oklch(0.25 0.06 250 / 0.15), transparent 60%),
    var(--bg-0);
  min-height: 100vh;
}

/* Subtle film grain over everything via fixed overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 2px, oklch(1 0 0 / 0.012) 2px 3px);
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   Type
   ============================================================ */

.display {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-0);
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.mono { font-family: var(--f-mono); font-feature-settings: "tnum"; }

.num {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ============================================================
   Layout
   ============================================================ */

.shell {
  position: relative;
  z-index: 2;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  .container { padding: 0 16px; }
}

.section {
  padding: 88px 0;
  position: relative;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-1);
}

.section-head h2 {
  margin: 6px 0 0;
  font-family: var(--f-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-0);
}

.section-head .num-mark {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--blood-l);
}

/* ============================================================
   Header
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.10 0.012 28 / 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-1);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-0);
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-gold);
  color: var(--gold);
  border-radius: 2px;
  background: linear-gradient(180deg, oklch(0.18 0.04 30), oklch(0.10 0.012 28));
}
.nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav a {
  padding: 8px 14px;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  border-radius: var(--r-1);
  transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--ink-0); background: var(--bg-2); }
.header-cta { display: flex; gap: 8px; align-items: center; }
@media (max-width: 920px) {
  .nav { display: none; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  --btn-bg: var(--bg-2);
  --btn-fg: var(--ink-0);
  --btn-bd: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-1);
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .2s ease;
  position: relative;
  isolation: isolate;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: linear-gradient(180deg, var(--blood) 0%, var(--blood-d) 100%);
  --btn-bd: oklch(0.55 0.18 25);
  color: oklch(0.98 0.01 60);
  box-shadow:
    0 0 0 1px oklch(0.6 0.18 25 / 0.25),
    0 12px 28px -10px oklch(0.4 0.18 25 / 0.6),
    0 1px 0 oklch(1 0 0 / 0.08) inset;
}
.btn--primary:hover { box-shadow:
    0 0 0 1px oklch(0.6 0.18 25 / 0.45),
    0 14px 32px -10px oklch(0.4 0.18 25 / 0.8),
    0 1px 0 oklch(1 0 0 / 0.10) inset;
}

.btn--gold {
  --btn-bg: linear-gradient(180deg, oklch(0.30 0.06 80), oklch(0.18 0.04 80));
  --btn-bd: var(--gold-d);
  color: var(--gold);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-bd: var(--line-2);
  color: var(--ink-1);
}
.btn--ghost:hover { background: var(--bg-2); color: var(--ink-0); }

.btn--sm { padding: 7px 12px; font-size: 10px; }

/* ============================================================
   Cards / Panels
   ============================================================ */

.panel {
  background: linear-gradient(180deg, var(--bg-1), oklch(0.11 0.014 28));
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  box-shadow: var(--sh-1);
  position: relative;
}
.panel::before {
  /* gold pinstripe */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, oklch(0.55 0.09 80 / 0.18), transparent 30%) top/100% 1px no-repeat;
}

.panel-pad { padding: 22px; }

.divider-rune {
  display: flex; align-items: center; gap: 12px;
  color: var(--line-2);
}
.divider-rune::before, .divider-rune::after {
  content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

/* Striped placeholder — for screenshots/avatars not yet uploaded */
.slot {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      oklch(0.18 0.02 28) 0 8px,
      oklch(0.14 0.02 28) 8px 16px);
  border: 1px dashed oklch(0.35 0.02 28);
  border-radius: var(--r-2);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px;
  overflow: hidden;
}

/* ============================================================
   Badges
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-1);
  background: var(--bg-2);
  white-space: nowrap;
}
.badge--gold   { color: var(--gold);   border-color: var(--gold-d);   background: oklch(0.20 0.05 80 / 0.4); }
.badge--silver { color: var(--silver); border-color: var(--silver-d); background: oklch(0.20 0.01 240 / 0.4); }
.badge--bronze { color: var(--bronze); border-color: var(--bronze-d); background: oklch(0.20 0.04 55 / 0.4); }
.badge--blood  { color: var(--blood-l);border-color: var(--blood-d);  background: oklch(0.20 0.06 25 / 0.4); }
.badge--steel  { color: var(--steel);  border-color: var(--steel-d);  background: oklch(0.20 0.04 245 / 0.4); }
.badge--ok     { color: var(--ok); border-color: oklch(0.45 0.10 145); background: oklch(0.20 0.05 145 / 0.3); }
.badge--mute   { color: var(--ink-2); }
.badge--warn   { color: var(--warn);   border-color: oklch(0.45 0.10 75); background: oklch(0.20 0.05 75 / 0.3); }

.dot {
  width: 6px; height: 6px; border-radius: 999px; background: currentColor;
  display: inline-block;
}

/* ============================================================
   Tables
   ============================================================ */

.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.tbl thead th {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: left;
  padding: 14px 14px;
  background: oklch(0.12 0.014 28);
  border-bottom: 1px solid var(--line-1);
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
}
.tbl thead th:hover { color: var(--ink-0); }
.tbl thead th.sorted { color: var(--blood-l); }
.tbl tbody td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--line-1);
  vertical-align: middle;
}
.tbl tbody tr {
  transition: background .15s ease;
}
.tbl tbody tr:hover { background: oklch(0.16 0.024 28 / 0.7); }
.tbl tbody tr.row-podium-1 { background: linear-gradient(90deg, oklch(0.20 0.06 80 / 0.20), transparent 60%); }
.tbl tbody tr.row-podium-2 { background: linear-gradient(90deg, oklch(0.20 0.01 240 / 0.20), transparent 60%); }
.tbl tbody tr.row-podium-3 { background: linear-gradient(90deg, oklch(0.20 0.04 55 / 0.20), transparent 60%); }

.rank-cell {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-2);
  width: 56px;
}
.rank-cell.gold   { color: var(--gold); }
.rank-cell.silver { color: var(--silver); }
.rank-cell.bronze { color: var(--bronze); }

/* ============================================================
   Avatar
   ============================================================ */

.avatar {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, oklch(0.22 0.04 28), oklch(0.14 0.02 28));
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-1);
  flex: none;
}
.avatar.lg { width: 80px; height: 80px; font-size: 26px; border-radius: 8px; }
.avatar.gold   { border-color: var(--gold-d);   box-shadow: 0 0 0 1px oklch(0.55 0.09 80 / 0.4); }
.avatar.silver { border-color: var(--silver-d); }
.avatar.bronze { border-color: var(--bronze-d); }

/* ============================================================
   Forms
   ============================================================ */

.input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--bg-1);
  color: var(--ink-0);
  font-family: var(--f-body);
  font-size: 13px;
  min-width: 0;
}
.input:focus-within { border-color: var(--blood); box-shadow: 0 0 0 3px oklch(0.5 0.18 25 / 0.15); }
.input input {
  background: transparent;
  border: 0;
  outline: 0;
  color: inherit;
  font: inherit;
  flex: 1;
  min-width: 0;
}
.input svg { color: var(--ink-2); flex: none; }

.select {
  appearance: none;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  color: var(--ink-0);
  font: inherit;
  padding: 9px 32px 9px 12px;
  font-size: 13px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
                    linear-gradient(-45deg, transparent 50%, var(--ink-2) 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

/* ============================================================
   Progress bars
   ============================================================ */

.bar {
  height: 6px;
  border-radius: 999px;
  background: oklch(0.18 0.02 28);
  overflow: hidden;
  border: 1px solid var(--line-1);
}
.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blood), var(--ember));
  box-shadow: 0 0 12px oklch(0.6 0.18 25 / 0.4);
}

/* ============================================================
   Modal
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0.05 0.01 28 / 0.78);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
.modal {
  background: linear-gradient(180deg, oklch(0.14 0.02 28), oklch(0.10 0.014 28));
  border: 1px solid var(--line-2);
  border-radius: 16px;
  width: 100%;
  max-width: 1080px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-2),
              0 0 0 1px oklch(0.55 0.09 80 / 0.1),
              0 0 80px oklch(0.4 0.18 25 / 0.15);
  animation: modalIn .25s cubic-bezier(.2,.8,.2,1);
  position: relative;
}
.modal::before {
  /* gold filigree top bar */
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-d), transparent);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-1);
}
.modal-body {
  padding: 24px;
  overflow: auto;
  flex: 1;
}
.modal-close {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--ink-1);
  border-radius: var(--r-1);
}
.modal-close:hover { color: var(--ink-0); background: var(--bg-3); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: riseIn .5s cubic-bezier(.2,.8,.2,1) both; }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding: 96px 0 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-1);
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 360px at 70% 30%, oklch(0.45 0.18 25 / 0.22), transparent 60%),
    radial-gradient(500px 300px at 20% 70%, oklch(0.35 0.10 250 / 0.18), transparent 60%);
}
.hero-bg::after {
  /* hairline grid */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(oklch(1 0 0 / 0.02) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: .6;
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
@media (max-width: 980px) { .hero-inner { grid-template-columns: 1fr; } }

.hero h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 16px 0 18px;
  color: var(--ink-0);
  text-wrap: balance;
}
.hero h1 .accent {
  color: transparent;
  background: linear-gradient(180deg, var(--blood-l), var(--blood-d));
  -webkit-background-clip: text;
  background-clip: text;
}
.hero .subtitle {
  font-size: 17px;
  color: var(--ink-1);
  max-width: 560px;
  margin-bottom: 32px;
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
  margin-bottom: 32px;
  max-width: 640px;
}
.hero-meta-card {
  border: 1px solid var(--line-1);
  border-radius: var(--r-2);
  padding: 12px 14px;
  background: oklch(0.12 0.014 28 / 0.6);
}
.hero-meta-card .lbl { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.hero-meta-card .val { font-family: var(--f-display); font-size: 16px; color: var(--ink-0); margin-top: 4px; }
.hero-meta-card.live { border-color: var(--blood-d); background: linear-gradient(180deg, oklch(0.18 0.06 25 / 0.4), oklch(0.10 0.014 28)); }
.hero-meta-card.live .lbl { color: var(--blood-l); }

.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

/* Live emblem */
.emblem {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin-left: auto;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, oklch(0.30 0.10 25 / 0.7), transparent 55%),
    conic-gradient(from 90deg, oklch(0.20 0.04 28), oklch(0.12 0.014 28), oklch(0.20 0.04 28), oklch(0.12 0.014 28), oklch(0.20 0.04 28));
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 1px oklch(0.55 0.09 80 / 0.15) inset,
    0 0 80px oklch(0.4 0.18 25 / 0.25);
}
.emblem::before, .emblem::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px dashed oklch(0.35 0.04 28);
}
.emblem::after {
  inset: 36px;
  border-style: solid;
  border-color: oklch(0.30 0.04 28);
}
.emblem-core {
  position: relative;
  z-index: 2;
  text-align: center;
  font-family: var(--f-display);
}
.emblem-core .roman {
  font-size: clamp(64px, 10vw, 110px);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, var(--gold), oklch(0.45 0.10 60));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.05em;
}
.emblem-core .label {
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 6px;
}
.emblem-orbit {
  position: absolute;
  inset: 0;
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.emblem-rune {
  position: absolute;
  width: 22px; height: 22px;
  border: 1px solid var(--gold-d);
  background: var(--bg-1);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--f-display);
  font-size: 11px;
  border-radius: 4px;
  transform: translate(-50%, -50%);
}

/* ============================================================
   Stats grid
   ============================================================ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 980px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }

.stat {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  background: linear-gradient(180deg, var(--bg-1), oklch(0.10 0.014 28));
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, oklch(0.55 0.09 80 / 0.4), transparent);
}
.stat .lbl {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
}
.stat .val {
  font-family: var(--f-display);
  font-size: 36px;
  font-weight: 700;
  margin-top: 10px;
  color: var(--ink-0);
  letter-spacing: 0.01em;
}
.stat .sub {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 6px;
}
.stat--accent .val {
  background: linear-gradient(180deg, var(--gold), var(--gold-d));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat--blood .val {
  background: linear-gradient(180deg, var(--blood-l), var(--blood-d));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   Activities grid
   ============================================================ */

.cat {
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  background: linear-gradient(180deg, var(--bg-1), oklch(0.10 0.014 28));
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cat-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-1);
}
.cat-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--line-gold);
  background: linear-gradient(180deg, oklch(0.22 0.06 28), oklch(0.12 0.02 28));
  border-radius: var(--r-2);
  display: grid; place-items: center;
  color: var(--gold);
  flex: none;
}
.cat-title {
  font-family: var(--f-display);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--ink-0);
}
.cat-meta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.act-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-1);
  font-size: 13px;
}
.act-row:last-child { border-bottom: 0; }
.act-row .name { color: var(--ink-0); font-weight: 500; display: flex; align-items: center; gap: 10px; }
.act-row .meta-num {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.act-row button {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-1);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-family: var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.act-row button:hover { color: var(--blood-l); border-color: var(--blood); }

/* ============================================================
   Rules / Prize / Sponsors / Contacts
   ============================================================ */

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 880px) { .rule-grid { grid-template-columns: 1fr; } }

.rule-card {
  position: relative;
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  background: linear-gradient(180deg, var(--bg-1), oklch(0.10 0.014 28));
  padding: 22px 24px;
  overflow: hidden;
}
.rule-card.tier-a { border-color: oklch(0.40 0.08 80); background: linear-gradient(180deg, oklch(0.18 0.05 80 / 0.18), oklch(0.10 0.014 28)); }
.rule-card.tier-b { border-color: var(--steel-d); background: linear-gradient(180deg, oklch(0.18 0.05 245 / 0.16), oklch(0.10 0.014 28)); }

.rule-card .label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.rule-card .heading {
  font-family: var(--f-display);
  font-size: 22px;
  margin: 6px 0 6px;
  color: var(--ink-0);
}
.rule-card .price {
  font-family: var(--f-display);
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 12px;
}
.rule-card ul {
  list-style: none; padding: 0; margin: 12px 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.rule-card li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px;
  color: var(--ink-1);
}
.rule-card li::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--blood);
  flex: none;
  margin-top: 8px;
  transform: rotate(45deg);
}
.rule-card.tier-a li::before { background: var(--gold); }
.rule-card.tier-b li::before { background: var(--steel); }

.allow-deny {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 24px;
}
@media (max-width: 720px) { .allow-deny { grid-template-columns: 1fr; } }
.ad-card {
  border: 1px solid var(--line-1);
  border-radius: var(--r-2);
  padding: 18px 20px;
  background: var(--bg-1);
}
.ad-card.deny { border-color: oklch(0.35 0.10 25); }
.ad-card.allow { border-color: oklch(0.35 0.08 145); }
.ad-card h4 {
  margin: 0 0 12px;
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ad-card.deny h4 { color: var(--blood-l); }
.ad-card.allow h4 { color: var(--ok); }
.ad-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ad-card li { font-size: 13px; color: var(--ink-1); display: flex; gap: 8px; align-items: flex-start; }
.ad-card.deny li::before { content: "✕"; color: var(--blood-l); font-family: var(--f-mono); }
.ad-card.allow li::before { content: "✓"; color: var(--ok); font-family: var(--f-mono); }

/* Prize fund split */
.prize-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
}
@media (max-width: 920px) { .prize-grid { grid-template-columns: 1fr; } }

.fund-card {
  border: 1px solid var(--line-2);
  border-radius: var(--r-3);
  padding: 28px;
  background:
    radial-gradient(400px 260px at 20% 0%, oklch(0.30 0.10 25 / 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-1), oklch(0.10 0.014 28));
  position: relative;
  overflow: hidden;
}
.fund-amt {
  font-family: var(--f-display);
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, var(--gold), var(--bronze));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.fund-bar {
  height: 10px;
  border-radius: 999px;
  background: oklch(0.16 0.02 28);
  border: 1px solid var(--line-1);
  overflow: hidden;
  display: flex;
}
.fund-bar > span {
  display: block; height: 100%;
}
.fund-bar .gold   { background: linear-gradient(90deg, var(--gold), var(--gold-d)); }
.fund-bar .silver { background: linear-gradient(90deg, var(--silver), var(--silver-d)); }
.fund-bar .bronze { background: linear-gradient(90deg, var(--bronze), var(--bronze-d)); }

.tier-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-1);
  font-size: 13px;
}
.tier-row:last-child { border: 0; }
.tier-medal {
  width: 28px; height: 28px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 700; font-size: 12px;
  flex: none;
}
.tier-medal.gold   { background: linear-gradient(180deg, var(--gold), var(--gold-d)); color: oklch(0.18 0.04 80); box-shadow: 0 0 0 1px oklch(0.55 0.09 80 / 0.3); }
.tier-medal.silver { background: linear-gradient(180deg, var(--silver), var(--silver-d)); color: oklch(0.18 0.01 240); }
.tier-medal.bronze { background: linear-gradient(180deg, var(--bronze), var(--bronze-d)); color: oklch(0.18 0.04 55); }

.prize-card {
  border: 1px solid var(--line-1);
  border-radius: var(--r-2);
  padding: 16px;
  background: var(--bg-1);
}
.prize-card .head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.prize-card.bonus { border-style: dashed; border-color: var(--line-2); }
.prize-card .price-tag {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--gold);
}

/* Sponsors */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .sponsor-grid { grid-template-columns: 1fr; } }
.sponsor-card {
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  padding: 28px;
  background: linear-gradient(180deg, var(--bg-1), oklch(0.10 0.014 28));
  display: flex; flex-direction: column; gap: 14px;
}
.sponsor-logo {
  height: 64px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-display); font-size: 24px; letter-spacing: 0.04em; color: var(--ink-0);
}
.sponsor-logo .mark {
  width: 40px; height: 40px; border: 1px solid var(--line-gold); display: grid; place-items: center;
  border-radius: 4px; color: var(--gold);
  background: linear-gradient(180deg, oklch(0.22 0.06 28), oklch(0.12 0.02 28));
}
.promo {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-2);
  font-family: var(--f-mono);
  background: oklch(0.12 0.014 28);
}
.promo .code {
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 700;
}
.promo .pct {
  margin-left: auto;
  color: var(--ok);
  font-size: 13px;
}

/* Contacts */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 980px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  border: 1px solid var(--line-1);
  border-radius: var(--r-2);
  padding: 18px;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-card .ch {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.contact-card .handle { font-family: var(--f-display); font-size: 18px; color: var(--ink-0); }

/* Footer */
.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--line-1);
  margin-top: 40px;
  color: var(--ink-3);
  font-size: 12px;
}
.footer .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   Modal — participant profile
   ============================================================ */

.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}
@media (max-width: 880px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-side {
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  background: var(--bg-1);
  padding: 22px;
}
.profile-stat-row {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--line-1);
  font-size: 13px;
}
.profile-stat-row:last-child { border: 0; }
.profile-stat-row .k { color: var(--ink-2); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.profile-stat-row .v { color: var(--ink-0); font-family: var(--f-display); font-size: 14px; }

.cat-bars {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  background: var(--bg-1);
}
.cat-bar-row { display: grid; grid-template-columns: 130px 1fr 50px; align-items: center; gap: 12px; font-size: 12px; }
.cat-bar-row .k { font-family: var(--f-mono); color: var(--ink-2); letter-spacing: 0.05em; }
.cat-bar-row .v { font-family: var(--f-mono); color: var(--ink-0); text-align: right; font-variant-numeric: tabular-nums; }

.history {
  border: 1px solid var(--line-1);
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--bg-1);
  margin-top: 16px;
}
.history-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-1);
  align-items: center;
  font-size: 13px;
}
.history-row:last-child { border: 0; }
.history-row .when { font-family: var(--f-mono); color: var(--ink-2); font-size: 11px; }
.history-row .what { color: var(--ink-0); }
.history-row .pts {
  font-family: var(--f-display);
  font-weight: 700;
  color: var(--gold);
  font-size: 15px;
}

/* Helpers */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--ink-2); }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 18px; }
.flex-1 { flex: 1; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.center { align-items: center; }
.gold-text { color: var(--gold); }
.blood-text { color: var(--blood-l); }
.ink-2 { color: var(--ink-2); }

/* Responsive table → cards */
@media (max-width: 720px) {
  .tbl-wrap { overflow-x: auto; }
}

/* Filter bar */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 18px;
}
.filter-bar .input { min-width: 240px; flex: 1; max-width: 360px; }

/* Empty state */
.empty {
  padding: 40px;
  text-align: center;
  color: var(--ink-2);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* "First" bonus glow on +0.1 chip */
.chip-bonus {
  display: inline-flex;
  padding: 2px 6px;
  font-family: var(--f-mono);
  font-size: 10px;
  background: oklch(0.20 0.06 25 / 0.5);
  border: 1px solid var(--blood-d);
  border-radius: 4px;
  color: var(--blood-l);
  letter-spacing: 0.06em;
}
.chip-first {
  display: inline-flex;
  padding: 2px 6px;
  font-family: var(--f-mono);
  font-size: 10px;
  background: oklch(0.22 0.06 80 / 0.5);
  border: 1px solid var(--gold-d);
  border-radius: 4px;
  color: var(--gold);
  letter-spacing: 0.06em;
}

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 999px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--blood-d); }

/* Skeleton for empty avatars */
.av-skel {
  font-family: var(--f-display);
  background: linear-gradient(135deg, oklch(0.30 0.06 25), oklch(0.18 0.04 28));
  color: var(--ink-0);
}
