/* Inter carries the UI; Anuphan is the fallback so Thai gang names and Thai
   Roblox display names still render instead of dropping to tofu. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Anuphan:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0a0b;
  --surface: #131316;
  --surface-2: #1b1b20;
  --line: #2a2a31;
  --line-soft: #1f1f25;
  --text: #eeeef2;
  --muted: #8e8e9a;
  --dim: #63636e;
  --gold: #f5a524;
  --gold-soft: #fbbf24;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 14px;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Anuphan, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Warm glow behind the fold so the black doesn't read as flat. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60rem 30rem at 50% -12rem, rgba(245, 165, 36, 0.14), transparent 70%),
    radial-gradient(40rem 24rem at 90% 10%, rgba(245, 165, 36, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

a { color: var(--gold-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- nav */

nav {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
nav .wrap { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}
nav .links { margin-left: auto; display: flex; gap: 20px; font-size: 0.94rem; }
nav .links a { color: var(--muted); white-space: nowrap; }
nav .links a:hover, nav .links a[aria-current='page'] { color: var(--text); text-decoration: none; }

/* Most players sign up on a phone, and a long tournament name would otherwise
   wrap the bar onto two lines. Truncate the name, and let the links swipe
   sideways rather than dropping any of them. */
@media (max-width: 620px) {
  nav .wrap { gap: 10px; height: 56px; }
  .brand { font-size: 0.88rem; letter-spacing: 0.02em; min-width: 0; max-width: 36vw; }
  .brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  nav .links {
    gap: 13px; font-size: 0.84rem;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  }
  nav .links::-webkit-scrollbar { display: none; }
}

/* ---------------------------------------------------------------- hero */

.hero { padding: 68px 0 40px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(245, 165, 36, 0.3);
  background: rgba(245, 165, 36, 0.08);
  padding: 5px 13px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2.3rem, 7vw, 4.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 20px 0 14px;
  background: linear-gradient(180deg, #fff 30%, #b9893a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub { color: var(--muted); font-size: 1.06rem; max-width: 34rem; margin: 0 auto; }

/* ---------------------------------------------------------------- stat strip */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 34px 0 8px;
}
.stat { background: var(--surface); padding: 18px 14px; text-align: center; }
.stat .v {
  font-size: 1.9rem; font-weight: 700; line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--gold-soft);
}
.stat .k { font-size: 0.79rem; color: var(--dim); letter-spacing: 0.05em; margin-top: 2px; }
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat .v { font-size: 1.5rem; }
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
}
section { padding: 30px 0; }
h2 {
  font-size: 1.42rem; font-weight: 700; letter-spacing: -0.01em;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 11px;
}
h2 .num {
  font-size: 0.76rem; font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(245, 165, 36, 0.35);
  border-radius: 7px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  flex: none;
}
.lede { color: var(--muted); margin-bottom: 20px; font-size: 0.97rem; }

/* ---------------------------------------------------------------- form */

.field { margin-bottom: 17px; }
label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
label .req { color: var(--gold); }
.hint { font-size: 0.82rem; color: var(--dim); font-weight: 400; margin-top: 5px; }

input[type='text'], input[type='password'], input[type='number'], select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.97rem;
  padding: 11px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.14);
}
input::placeholder { color: #4d4d57; }
select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%238e8e9a' stroke-width='1.8' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
select option { background: var(--surface-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold);
  color: #1a1205;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit; font-weight: 700; font-size: 0.97rem;
  padding: 11px 20px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s;
}
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.full { width: 100%; padding: 13px; font-size: 1.02rem; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover:not(:disabled) { border-color: var(--gold); background: rgba(245, 165, 36, 0.06); }
.btn.danger { background: transparent; border-color: rgba(239, 68, 68, 0.45); color: #fca5a5; }
.btn.danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.12); }
.btn.sm { padding: 6px 11px; font-size: 0.84rem; border-radius: 8px; }

.msg {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.92rem;
  margin-bottom: 16px;
  border: 1px solid;
  display: flex; gap: 9px; align-items: flex-start;
}
.msg.err { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; }
.msg.ok { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.35); color: #86efac; }
.msg.warn { background: rgba(245, 165, 36, 0.1); border-color: rgba(245, 165, 36, 0.35); color: var(--gold-soft); }
.msg[hidden] { display: none; }

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

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
th { color: var(--dim); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.num-cell { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- roster */

.gang-head {
  display: flex; align-items: center; gap: 11px;
  margin: 26px 0 12px;
}
.gang-head .chip {
  font-weight: 700; font-size: 1.05rem;
  padding: 3px 12px; border-radius: 8px;
  border: 1px solid;
}
.gang-head .count { color: var(--dim); font-size: 0.88rem; }
.gang-head .host {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--gold); border: 1px solid rgba(245, 165, 36, 0.35);
  padding: 2px 8px; border-radius: 999px;
}

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pcard {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  padding: 10px 12px;
  min-width: 0;
}
.pcard img {
  width: 40px; height: 40px; border-radius: 9px;
  background: var(--surface-2);
  flex: none;
  object-fit: cover;
}
.pcard .nm { font-weight: 600; font-size: 0.93rem; }
.pcard .dn { font-size: 0.79rem; color: var(--dim); }
.pcard .nm, .pcard .dn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard > div { min-width: 0; }

/* ---------------------------------------------------------------- misc */

.pill {
  display: inline-block;
  font-size: 0.76rem; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.pill.open { color: #86efac; border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.1); }
.pill.closed { color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.1); }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .rules { grid-template-columns: 1fr; } }
.rule-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; }
.rule-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 9px; display: flex; align-items: center; gap: 9px; }
.ico { width: 17px; height: 17px; flex: none; color: var(--gold); }
.rule-card p, .rule-card li { color: var(--muted); font-size: 0.9rem; }
.rule-card ul { padding-left: 18px; }
.rule-card li { margin-bottom: 4px; }
.rule-card li::marker { color: var(--gold); }
.rule-card b { color: var(--text); font-weight: 600; }
.rule-card .now {
  margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line);
  font-size: 0.86rem; color: var(--gold-soft);
}

footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 50px; padding: 26px 0;
  color: var(--dim); font-size: 0.86rem;
  text-align: center;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, #232329 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: sk 1.3s infinite;
  border-radius: 6px;
  color: transparent !important;
}
@keyframes sk { to { background-position: -200% 0; } }

.empty { text-align: center; color: var(--dim); padding: 44px 20px; font-size: 0.94rem; }

/* ---------------------------------------------------------------- tabs */

.tabs {
  display: flex; gap: 4px; margin: 24px 0 20px;
  border-bottom: 1px solid var(--line-soft);
}
.tabs button {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); font: inherit; font-weight: 600; font-size: 0.94rem;
  padding: 9px 14px; cursor: pointer; margin-bottom: -1px;
  white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected='true'] { color: var(--gold); border-bottom-color: var(--gold); }
.tabs .badge {
  font-size: 0.72rem; font-weight: 700; margin-left: 6px;
  background: var(--surface-2); color: var(--muted);
  border-radius: 999px; padding: 1px 7px;
}
.tabs button[aria-selected='true'] .badge { background: rgba(245, 165, 36, 0.18); color: var(--gold-soft); }

/* ---------------------------------------------------------------- stage bar */

.stagebar {
  display: flex; align-items: center; gap: 0;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 18px;
}
.stagebar .step {
  flex: 1; padding: 12px 10px; text-align: center;
  font-size: 0.83rem; font-weight: 600; color: var(--dim);
  border-right: 1px solid var(--line-soft);
  position: relative; white-space: nowrap;
}
.stagebar .step:last-child { border-right: none; }
.stagebar .step.done { color: var(--muted); }
.stagebar .step.done::before { content: '✓ '; color: var(--green); }
.stagebar .step.now { color: #1a1205; background: var(--gold); }

/* ---------------------------------------------------------------- rounds + matches */

.round-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 24px 0 12px;
}
.round-head h3 { font-size: 1.12rem; font-weight: 700; }
.round-head .prog {
  font-size: 0.84rem; color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.round-head .prog b { color: var(--gold-soft); }

.matches { display: grid; gap: 9px; }

.match {
  display: grid;
  grid-template-columns: 34px 1fr 82px 1fr;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
.match.pending { border-color: rgba(245, 165, 36, 0.3); }
.match .tno {
  display: grid; place-items: center;
  font-size: 0.78rem; font-weight: 700; color: var(--dim);
  background: var(--surface-2);
  font-variant-numeric: tabular-nums;
}
.match .side {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; min-width: 0;
  background: none; border: none; color: var(--text);
  font: inherit; text-align: left; width: 100%;
}
.match .side.p2 { flex-direction: row-reverse; text-align: right; }
.match .side img {
  width: 34px; height: 34px; border-radius: 8px; flex: none;
  background: var(--surface-2); object-fit: cover;
}
.match .side .nm { font-weight: 600; font-size: 0.92rem; }
.match .side .gg { font-size: 0.76rem; }
.match .side .nm, .match .side .gg {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match .side > div { min-width: 0; flex: 1; }
.match .mid {
  display: grid; place-items: center; gap: 3px;
  background: var(--surface-2);
  font-size: 0.72rem; font-weight: 700; color: var(--dim);
  letter-spacing: 0.06em;
  padding: 4px;
}
button.side { cursor: pointer; transition: background 0.12s; }
button.side:hover { background: rgba(245, 165, 36, 0.08); }
.match .side.win { background: rgba(34, 197, 94, 0.11); }
.match .side.win .nm { color: #86efac; }
button.side.win:hover { background: rgba(34, 197, 94, 0.16); }
.match .side.lose { opacity: 0.45; }
.match.drawn .side { background: rgba(245, 165, 36, 0.09); }
.match .drawbtn {
  background: none; border: 1px solid var(--line); color: var(--dim);
  border-radius: 6px; font: inherit; font-size: 0.68rem; font-weight: 700;
  padding: 2px 7px; cursor: pointer; letter-spacing: 0.04em;
}
.match .drawbtn:hover { border-color: var(--gold); color: var(--gold-soft); }
.match .drawbtn.on { background: var(--gold); color: #1a1205; border-color: var(--gold); }
.match.bye .mid { color: var(--gold); }

@media (max-width: 620px) {
  .match { grid-template-columns: 26px 1fr 62px 1fr; }
  .match .side { padding: 9px 8px; gap: 7px; }
  .match .side img { width: 28px; height: 28px; }
  .match .side .nm { font-size: 0.84rem; }
  .match .side .gg { font-size: 0.7rem; }
}

/* ---------------------------------------------------------------- bracket

   Columns are equal-height flex tracks and every cell is flex:1, so a cell in
   round N+1 lands exactly on the midpoint of its two feeder cells in round N.
   That alignment is what lets the connectors be pure CSS: a 15px stub out of
   each node, a 15px stub into the next, and one vertical bar spanning from a
   top-of-pair cell's centre to its partner's — height:100% of a cell is, by
   construction, the exact distance between two adjacent cell centres.          */

.brk { display: flex; gap: 30px; overflow-x: auto; padding: 2px 2px 12px; }
.brk-col { display: flex; flex-direction: column; flex: 1; min-width: 208px; }
.brk-col h4 {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); text-align: center;
  padding-bottom: 8px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}
.brk-body { flex: 1; display: flex; flex-direction: column; }
.brk-cell { flex: 1; display: flex; align-items: center; position: relative; padding: 5px 0; }

.brk-col:not(:last-child) .brk-cell::after {
  content: ''; position: absolute; left: 100%; top: 50%;
  width: 15px; height: 2px; background: var(--line);
}
.brk-col:not(:first-child) .brk-cell::before {
  content: ''; position: absolute; right: 100%; top: 50%;
  width: 15px; height: 2px; background: var(--line);
}
.brk-link {
  position: absolute; left: calc(100% + 15px); top: 50%;
  height: 100%; width: 2px; background: var(--line);
}

.brk-node {
  flex: 1; min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
}
.brk-node.live { border-color: rgba(245, 165, 36, 0.4); }
.brk-node.champ { border-color: var(--gold); box-shadow: 0 0 24px rgba(245, 165, 36, 0.2); }

.brk-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; min-width: 0;
  border-left: 3px solid transparent;
}
.brk-row + .brk-row { border-top: 1px solid var(--line-soft); }
.brk-row .seed {
  font-size: 0.66rem; font-weight: 700; color: var(--dim);
  min-width: 13px; text-align: center; font-variant-numeric: tabular-nums;
}
.brk-row img {
  width: 22px; height: 22px; border-radius: 5px; flex: none;
  background: var(--surface-2); object-fit: cover;
}
.brk-row .nm {
  flex: 1; min-width: 0; font-size: 0.85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brk-row .res { font-size: 0.7rem; font-weight: 700; color: var(--dim); letter-spacing: 0.06em; }
.brk-row.win { border-left-color: var(--gold); background: rgba(245, 165, 36, 0.07); }
.brk-row.win .nm { font-weight: 700; }
.brk-row.win .res { color: var(--gold-soft); }
.brk-row.lose { opacity: 0.4; }
.brk-row.tbd .nm { color: var(--dim); font-style: italic; }

@media (max-width: 620px) {
  .brk { gap: 22px; }
  .brk-col { min-width: 168px; }
  .brk-col:not(:last-child) .brk-cell::after,
  .brk-col:not(:first-child) .brk-cell::before { width: 11px; }
  .brk-link { left: calc(100% + 11px); }
  .brk-row img { display: none; }
}

/* ---------------------------------------------------------------- name guide

   Mock-ups of the Discord and Roblox profile panes. Drawn in markup rather than
   shipped as screenshots so they stay crisp, theme correctly, and never go stale
   when either app restyles a colour.                                            */

.guide { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 780px) { .guide { grid-template-columns: 1fr; } }

.guide-card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px;
}
.guide-card > h3 {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 12px;
}
.guide-card .steps { margin-top: 14px; font-size: 0.86rem; color: var(--muted); }
.guide-card .steps b { color: var(--text); font-weight: 600; }
.guide-card .steps li { margin-bottom: 3px; }
.guide-card .steps ol { padding-left: 17px; }
.guide-card .steps li::marker { color: var(--gold); font-weight: 700; }

.shot { border-radius: 10px; overflow: hidden; border: 1px solid #000; }
.shot.discord { background: #232428; }
.shot.roblox { background: #232527; }

.shot-banner { height: 46px; background: linear-gradient(110deg, #f0a2b8, #f7c59f 55%, #a8c7e8); }
.shot-body { padding: 0 14px 14px; position: relative; }
.shot-av {
  width: 52px; height: 52px; border-radius: 50%;
  background: #4e5058; border: 5px solid #232428;
  margin-top: -26px; position: relative;
}
.shot-av::after {
  content: ''; position: absolute; inset: 9px 9px auto 9px; height: 12px;
  border-radius: 6px 6px 2px 2px; background: #6b6e78;
}
.shot.roblox .shot-row { display: flex; align-items: center; gap: 13px; padding: 14px; }
.shot.roblox .shot-av { margin-top: 0; border-color: #232527; width: 54px; height: 54px; flex: none; }

.nm-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.nm-display { font-size: 1.02rem; font-weight: 700; color: #f2f3f5; }
.nm-user {
  font-size: 0.92rem; font-weight: 600; color: #b5bac1;
  border: 2px solid var(--gold); border-radius: 7px;
  padding: 2px 9px;
  background: rgba(245, 165, 36, 0.12);
}
.nm-tag {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 2px 7px; border-radius: 5px; white-space: nowrap;
}
.nm-tag.bad { color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.12); }
.nm-tag.good { color: #1a1205; background: var(--gold); }
.shot-fill { height: 9px; border-radius: 4px; background: #35373c; margin-top: 12px; }
.shot-fill.short { width: 45%; }

/* ---------------------------------------------------------------- podium */

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; margin-bottom: 14px; }
@media (max-width: 640px) { .podium { grid-template-columns: 1fr; align-items: stretch; } }
.pod {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px 14px; text-align: center;
  position: relative;
}
.pod.p1 { border-color: var(--gold); background: linear-gradient(180deg, rgba(245,165,36,.12), var(--surface) 70%); padding-top: 26px; }
.pod.p2 { border-color: #4a5568; }
.pod.p3 { border-color: #6b4a2f; }
.pod .medal {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  padding: 2px 11px; border-radius: 999px; white-space: nowrap;
}
.pod.p1 .medal { background: var(--gold); color: #1a1205; }
.pod.p2 .medal { background: #cbd5e1; color: #10131a; }
.pod.p3 .medal { background: #d19a66; color: #1a1205; }
.pod img {
  width: 60px; height: 60px; border-radius: 14px; object-fit: cover;
  background: var(--surface-2); margin-bottom: 9px;
}
.pod.p1 img { width: 74px; height: 74px; border: 2px solid var(--gold); }
.pod .who { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .gg { font-size: 0.78rem; margin-bottom: 9px; }
.pod .kv { display: flex; justify-content: center; gap: 14px; font-size: 0.78rem; color: var(--dim); }
.pod .kv b { display: block; font-size: 1.05rem; color: var(--gold-soft); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- gang boards */

.gboards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 13px; }
.gboard { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.gboard .hd {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
}
.gboard .hd .nm { font-weight: 700; font-size: 0.98rem; flex: 1; min-width: 0; }
.gboard .hd .n { font-size: 0.76rem; color: var(--dim); }
.gboard ol { list-style: none; padding: 6px 0; margin: 0; }
.gboard li { display: flex; align-items: center; gap: 9px; padding: 6px 14px; font-size: 0.87rem; }
.gboard li .pos { width: 15px; font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; }
.gboard li:first-child .pos { color: var(--gold); }
.gboard li img { width: 26px; height: 26px; border-radius: 6px; background: var(--surface-2); object-fit: cover; flex: none; }
.gboard li .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gboard li .pt { font-weight: 700; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.gboard .none { padding: 16px 14px; color: var(--dim); font-size: 0.84rem; text-align: center; }

/* ---------------------------------------------------------------- search */

.searchbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.searchbar input[type='search'] {
  flex: 1; min-width: 180px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; font-size: 0.94rem; padding: 9px 12px;
}
.searchbar input[type='search']:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,165,36,.14); }
.searchbar select { width: auto; min-width: 130px; }
.searchbar .count { align-self: center; font-size: 0.82rem; color: var(--dim); }
tr.hide { display: none; }

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

.prof { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 780px) { .prof { grid-template-columns: 1fr; } }
.prof-hd { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.prof-hd img { width: 76px; height: 76px; border-radius: 16px; background: var(--surface-2); object-fit: cover; border: 2px solid var(--line); }
.prof-hd .who { font-size: 1.5rem; font-weight: 700; }
.prof-hd .tag { color: var(--muted); font-size: 0.9rem; }
.linked {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px;
}
.linked img { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); object-fit: cover; }
.linked .nm { font-weight: 600; font-size: 0.92rem; }
.linked .un { font-size: 0.78rem; color: var(--dim); }
.lock { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; color: var(--gold); border: 1px solid rgba(245,165,36,.35); padding: 2px 8px; border-radius: 999px; }
.step-n {
  display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none;
  border-radius: 50%; background: var(--gold); color: #1a1205;
  font-size: 0.76rem; font-weight: 700; margin-right: 9px;
}
.step-n.done { background: var(--green); color: #06210f; }
.step-n.todo { background: var(--surface-2); color: var(--dim); }

/* ---------------------------------------------------------------- career stats */

.exp-row { cursor: pointer; }
.exp-row:hover { background: rgba(255, 255, 255, 0.03); }
.exp-row.open { background: rgba(245, 165, 36, 0.07); }
.exp-row .caret {
  display: inline-block; width: 0; height: 0;
  border-left: 4px solid var(--dim); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  margin-right: 5px; transition: transform 0.15s;
}
.exp-row.open .caret { transform: rotate(90deg) translateX(-1px); border-left-color: var(--gold); }

.exp-detail > td { padding: 0 !important; background: var(--bg); border-bottom: 1px solid var(--line); }
.exp-inner { padding: 15px 18px; }
.exp-inner h5 {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 10px;
}
.mini-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.mini-table th {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--dim); text-align: left; padding: 5px 9px; font-weight: 600;
  border-bottom: 1px solid var(--line-soft);
}
.mini-table td { padding: 6px 9px; border-bottom: 1px solid var(--line-soft); }
.mini-table tr:last-child td { border-bottom: none; }
.mini-table a { color: inherit; }
.mini-table a:hover { color: var(--gold-soft); }

.tit { font-weight: 700; font-variant-numeric: tabular-nums; }
.tit.has { color: var(--gold); }
.tit.none { color: #3a3a42; }
.wr { font-variant-numeric: tabular-nums; }
.fin { font-variant-numeric: tabular-nums; color: var(--muted); }
.fin.gold { color: var(--gold-soft); font-weight: 700; }
.gtag {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  padding: 1px 7px; border-radius: 5px; margin-right: 3px;
  border: 1px solid var(--line); color: var(--muted);
}
.place {
  display: inline-block; min-width: 20px; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.place.p1 { color: var(--gold); }
.place.p2 { color: #cbd5e1; }
.place.p3 { color: #d19a66; }

/* ---------------------------------------------------------------- history */

.hist { display: grid; gap: 11px; }
.hist-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 15px 17px;
  color: inherit; text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.hist-card:hover { border-color: var(--gold); background: rgba(245, 165, 36, 0.04); text-decoration: none; }
.hist-card .champ-av {
  width: 52px; height: 52px; border-radius: 11px; flex: none;
  background: var(--surface-2); object-fit: cover;
  border: 2px solid var(--gold);
}
.hist-card .meta { flex: 1; min-width: 0; }
.hist-card .tname { font-weight: 700; font-size: 1.04rem; }
.hist-card .when { font-size: 0.79rem; color: var(--dim); }
.hist-card .who { font-size: 0.87rem; color: var(--muted); margin-top: 3px; }
.hist-card .who b { color: var(--gold-soft); font-weight: 600; }
.hist-card .nums {
  text-align: right; flex: none;
  font-size: 0.78rem; color: var(--dim); line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .hist-card { flex-wrap: wrap; }
  .hist-card .nums { text-align: left; width: 100%; border-top: 1px solid var(--line-soft); padding-top: 9px; }
}

.champion {
  text-align: center; padding: 26px;
  border: 1px solid var(--gold); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(245, 165, 36, 0.12), transparent);
  margin-bottom: 18px;
}
.champion .lbl { font-size: 0.76rem; letter-spacing: 0.18em; color: var(--gold); font-weight: 700; }
.champion .nm { font-size: 1.9rem; font-weight: 800; margin: 4px 0 2px; }
.champion .gg { color: var(--muted); font-size: 0.9rem; }

/* ---------------------------------------------------------------- standings table */

.stand-row td { vertical-align: middle; }
.stand-row .rk { font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; width: 38px; }
.stand-row.cut .rk { color: var(--gold); }
.stand-row.cut { background: rgba(245, 165, 36, 0.045); }
.cutline td { padding: 0; border: none; }
.cutline .bar {
  border-top: 1px dashed var(--gold); position: relative;
  font-size: 0.68rem; color: var(--gold); letter-spacing: 0.1em; font-weight: 700;
  text-align: center; padding: 3px 0;
}
.pl { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pl img { width: 30px; height: 30px; border-radius: 7px; background: var(--surface-2); flex: none; object-fit: cover; }
.pl .nm { font-weight: 600; }
.pl .un { font-size: 0.76rem; color: var(--dim); }
.pl .nm, .pl .un { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rec .w { color: #86efac; }
.rec .l { color: #fca5a5; }
.rec .d { color: var(--muted); }
.pts { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold-soft); }

.live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; color: var(--dim); letter-spacing: 0.04em;
}
.live .blip {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .live .blip { animation: none; } }
.spin {
  width: 15px; height: 15px; flex: none;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #1a1205;
  border-radius: 50%;
  animation: sp 0.6s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .skeleton, .spin { animation: none; }
}
