/* ==========================================================================
   MOOON Brackets — Luxury Hex Glass Theme
   ========================================================================== */
:root {
  --bg0: #04030a;
  --bg1: #0a0816;
  --bg2: #120f22;
  --text: #f4efe4;
  --muted: #a39d92;
  --dim: #6d6878;
  --gold: #e3c27a;
  --gold-2: #f8e7b9;
  --gold-3: #a8823a;
  --accent: var(--gold);
  --accent-2: var(--gold-2);
  --accent-3: var(--gold-3);
  --accent-rgb: 227, 194, 122;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.075);
  --glass-3: rgba(255, 255, 255, 0.11);
  --line: rgba(var(--accent-rgb), 0.16);
  --line-2: rgba(var(--accent-rgb), 0.32);
  --ok: #4ade80;
  --live: #ff3b5c;
  --danger: #ff5f6d;
  --info: #7cb4ff;
  --radius: 18px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hex: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%);
  --hex-v: polygon(50% 0%, 97% 25%, 97% 75%, 50% 100%, 3% 75%, 3% 25%);
  --chamfer: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  color-scheme: dark;
}
[data-accent='amethyst'] { --accent: #b993ff; --accent-2: #e2d2ff; --accent-3: #6d4bc4; --accent-rgb: 185, 147, 255; }
[data-accent='emerald'] { --accent: #55e0ad; --accent-2: #c5f7e3; --accent-3: #1f8f66; --accent-rgb: 85, 224, 173; }
[data-accent='sapphire'] { --accent: #73a9ff; --accent-2: #cfe0ff; --accent-3: #2f5fb8; --accent-rgb: 115, 169, 255; }
[data-accent='ruby'] { --accent: #ff7393; --accent-2: #ffd0db; --accent-3: #b3264b; --accent-rgb: 255, 115, 147; }
[data-accent='moon'] { --accent: #cdd6f5; --accent-2: #ffffff; --accent-3: #7a83a8; --accent-rgb: 205, 214, 245; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55;
  background: radial-gradient(1200px 800px at 15% -10%, #1a1330 0%, transparent 60%), radial-gradient(1000px 700px at 110% 20%, #13102a 0%, transparent 55%), linear-gradient(180deg, var(--bg1), var(--bg0));
  background-attachment: fixed; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(var(--accent-rgb), 0.35); color: #fff; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), 0.22); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }

/* ---------- ambient background ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient .hexgrid {
  position: absolute; inset: -120px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cg fill='none' stroke='%23e3c27a' stroke-opacity='.09' stroke-width='1'%3E%3Cpath d='M28 0 56 16.2v32.3L28 64.7 0 48.5V16.2z'/%3E%3Cpath d='M28 64.7V97M0 48.5 0 97M56 48.5V97' /%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 97px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 10%, transparent 75%);
  animation: hexdrift 60s linear infinite;
}
@keyframes hexdrift { to { transform: translate3d(56px, 97px, 0); } }
.ambient .orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; animation: orb 26s var(--ease) infinite alternate; }
.ambient .orb.a { width: 520px; height: 520px; left: -140px; top: -120px; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.35), transparent 70%); }
.ambient .orb.b { width: 620px; height: 620px; right: -200px; top: 25%; background: radial-gradient(circle, rgba(120, 80, 255, 0.28), transparent 70%); animation-delay: -8s; }
.ambient .orb.c { width: 480px; height: 480px; left: 30%; bottom: -260px; background: radial-gradient(circle, rgba(60, 140, 255, 0.18), transparent 70%); animation-delay: -15s; }
@keyframes orb { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.1); } 100% { transform: translate(-40px, 80px) scale(0.95); } }
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.ambient .vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.55)); }

/* ---------- layout ---------- */
.container { width: min(1320px, 100% - 32px); margin-inline: auto; }
main { padding-bottom: 80px; min-height: calc(100vh - 160px); }
.page-enter { animation: pageIn 0.7s var(--ease) backwards; }
@keyframes pageIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.stagger > * { animation: rise 0.7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; padding: 14px 0; transition: padding 0.4s var(--ease); }
.topbar.scrolled { padding: 8px 0; }
.topbar .bar {
  display: flex; align-items: center; gap: 18px; padding: 10px 14px 10px 12px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(20, 16, 36, 0.72), rgba(10, 8, 20, 0.6)); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand .logo { width: 44px; height: 44px; position: relative; flex: none; }
.brand .logo svg { width: 100%; height: 100%; filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.45)); }
.brand .logo .ring { transform-origin: 50% 50%; animation: spin 18s linear infinite; }
.brand b { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.22em; font-size: 18px; display: block; line-height: 1; background: linear-gradient(120deg, var(--gold-2), var(--gold) 40%, var(--gold-3) 60%, var(--gold-2)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
.brand small { display: block; font-size: 10px; letter-spacing: 0.42em; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
@keyframes shimmer { to { background-position: -200% center; } }
@keyframes spin { to { transform: rotate(360deg); } }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav a, .nav button.link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 14px; background: none; border: 0; cursor: pointer; transition: 0.25s var(--ease); }
.nav a:hover, .nav button.link:hover, .nav a.active { color: var(--text); background: var(--glass-2); }
.nav a.active { box-shadow: inset 0 -2px 0 var(--accent); }
.nav .user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.nav .user-chip .av { width: 26px; height: 26px; font-size: 11px; }
.btn.menu-btn { display: none; }

/* ---------- icons ---------- */
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i.lg { width: 22px; height: 22px; }
.i.xl { width: 30px; height: 30px; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--glass-2);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 13px; cursor: pointer;
  border: 1px solid var(--line); background: var(--b); color: var(--text); font-weight: 700; font-size: 14px; letter-spacing: 0.01em; overflow: hidden; isolation: isolate;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s, background 0.3s; white-space: nowrap; user-select: none;
}
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.8s var(--ease); z-index: -1; }
.btn:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.45); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent-2), var(--accent) 45%, var(--accent-3)); color: #1a1206; border-color: transparent; box-shadow: 0 8px 30px -8px rgba(var(--accent-rgb), 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn.primary:hover { box-shadow: 0 14px 40px -8px rgba(var(--accent-rgb), 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn.ghost { background: transparent; }
.btn.danger { color: #ffd3d7; border-color: rgba(255, 95, 109, 0.35); background: rgba(255, 95, 109, 0.08); }
.btn.danger:hover { box-shadow: 0 10px 30px -10px rgba(255, 95, 109, 0.6); }
.btn.ok { color: #d4ffe4; border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.1); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.icon { padding: 9px; aspect-ratio: 1; }
.btn.hexbtn { clip-path: var(--hex); border-radius: 0; padding: 14px 30px; border: 0; }

/* ---------- glass ---------- */
.glass {
  position: relative; background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.035));
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.07); border-radius: var(--radius); box-shadow: var(--shadow);
}
.glass.bordered::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(var(--accent-rgb), 0.55), transparent 30%, transparent 70%, rgba(var(--accent-rgb), 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.panel { padding: 22px; }
.corner-orn { position: absolute; width: 26px; height: 26px; pointer-events: none; opacity: 0.8; }
.corner-orn.tl { top: 8px; left: 8px; } .corner-orn.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.corner-orn.bl { bottom: 8px; left: 8px; transform: scaleY(-1); } .corner-orn.br { bottom: 8px; right: 8px; transform: scale(-1); }

/* ---------- ornaments ---------- */
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--accent); margin: 34px 0 26px; }
.ornament::before, .ornament::after { content: ''; height: 1px; flex: 1; max-width: 260px; background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.6)); }
.ornament::after { transform: scaleX(-1); }
.ornament svg { width: 70px; height: 18px; }
.ornament .title { font-family: var(--font-display); letter-spacing: 0.3em; font-size: 13px; text-transform: uppercase; color: var(--accent-2); }

.section-title { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; font-size: 22px; margin: 0; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.35em; text-transform: uppercase; color: var(--accent); }
.gold-text { background: linear-gradient(120deg, var(--accent-2) 0%, var(--accent) 30%, var(--accent-3) 50%, var(--accent) 70%, var(--accent-2) 100%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 8s linear infinite; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 70px 0 30px; text-align: center; }
.hero .halo { position: absolute; left: 50%; top: 30px; width: 620px; height: 620px; transform: translateX(-50%); pointer-events: none; opacity: 0.55; z-index: -1; }
.hero .halo svg { width: 100%; height: 100%; }
.hero .halo .r1 { animation: spin 80s linear infinite; transform-origin: center; }
.hero .halo .r2 { animation: spin 50s linear infinite reverse; transform-origin: center; }
.hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 6.4vw, 84px); line-height: 1.02; letter-spacing: 0.04em; margin: 18px 0 16px; }
.hero p.lead { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 17px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 54px; }
.stat { position: relative; padding: 22px 18px 20px; text-align: center; overflow: hidden; transform-style: preserve-3d; }
.stat .hexicon { width: 54px; height: 60px; margin: 0 auto 10px; display: grid; place-items: center; clip-path: var(--hex-v); background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.35), rgba(var(--accent-rgb), 0.06)); color: var(--accent-2); }
.stat .num { font-family: var(--font-display); font-size: 34px; font-weight: 800; line-height: 1; }
.stat .lbl { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.stat.live .hexicon { background: linear-gradient(160deg, rgba(255, 59, 92, 0.45), rgba(255, 59, 92, 0.06)); color: #ffd1da; }

/* ---------- toolbar / filters ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.chips { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.05); position: relative; }
.chips button { position: relative; z-index: 1; border: 0; background: none; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; transition: color 0.3s; display: inline-flex; gap: 7px; align-items: center; }
.chips button.on { color: #1a1206; }
.chips .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 10px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 4px 18px -4px rgba(var(--accent-rgb), 0.7); transition: left 0.45s var(--ease), width 0.45s var(--ease); }
.chips button .count { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.chips button.on .count { background: rgba(0, 0, 0, 0.15); }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search input[type='search'] { padding-left: 40px; }

/* ---------- inputs ---------- */
.input, input[type='text'], input[type='password'], input[type='number'], input[type='url'], input[type='datetime-local'], input[type='search'], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--text); outline: none; transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
input:focus, select:focus, textarea:focus { border-color: rgba(var(--accent-rgb), 0.55); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12); background: rgba(0, 0, 0, 0.45); }
textarea { resize: vertical; min-height: 90px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e3c27a' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select option { background: #15111f; }
input[type='datetime-local']::-webkit-calendar-picker-indicator { filter: invert(0.8) sepia(1) saturate(3) hue-rotate(5deg); cursor: pointer; }
label.field { display: block; }
label.field > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
label.field > small { display: block; color: var(--dim); font-size: 12px; margin-top: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.05); transition: border-color 0.3s; }
.switch:hover { border-color: var(--line); }
.switch input { display: none; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); position: relative; transition: 0.35s var(--ease); flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #cfc9bd; transition: 0.35s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.switch input:checked + .track { background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.45); }
.switch input:checked + .track::after { left: 21px; background: #fff; }
.switch .txt b { display: block; font-size: 14px; }
.switch .txt small { color: var(--dim); font-size: 12px; }

/* ---------- avatars ---------- */
.av { --h: 40; width: 40px; height: 44px; display: grid; place-items: center; flex: none; clip-path: var(--hex-v); font-weight: 800; font-size: 14px; color: #fff; letter-spacing: 0.02em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); background: linear-gradient(150deg, hsl(var(--h) 70% 62%), hsl(calc(var(--h) + 40) 65% 32%)); position: relative; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 76px; height: 84px; font-size: 26px; }
.av.xl { width: 110px; height: 122px; font-size: 38px; }
.av.sm { width: 28px; height: 31px; font-size: 11px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); color: var(--muted); white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.setup { color: #b7d3ff; border-color: rgba(124, 180, 255, 0.3); background: rgba(124, 180, 255, 0.08); }
.badge.running { color: #ffb8c6; border-color: rgba(255, 59, 92, 0.35); background: rgba(255, 59, 92, 0.1); }
.badge.running .dot, .badge.live .dot { animation: pulse 1.6s infinite; }
.badge.completed { color: var(--accent-2); border-color: var(--line-2); background: rgba(var(--accent-rgb), 0.1); }
.badge.live { color: #fff; background: linear-gradient(135deg, #ff3b5c, #c4123a); border-color: transparent; box-shadow: 0 0 18px rgba(255, 59, 92, 0.6); }
.badge.fmt { color: var(--accent-2); border-color: var(--line); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- tournament cards ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; margin-top: 24px; }
.tcard { display: block; color: var(--text); padding: 22px; cursor: pointer; transform-style: preserve-3d; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); overflow: hidden; }
.tcard:hover { box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(var(--accent-rgb), 0.25), 0 0 50px -20px rgba(var(--accent-rgb), 0.5); }
.tcard .shine { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.16), transparent 40%); opacity: 0; transition: opacity 0.4s; border-radius: inherit; }
.tcard:hover .shine { opacity: 1; }
.tcard .bghex { position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; opacity: 0.08; transition: transform 1s var(--ease), opacity 0.5s; color: var(--accent); }
.tcard:hover .bghex { transform: rotate(30deg) scale(1.1); opacity: 0.16; }
.tcard .head { display: flex; gap: 14px; align-items: center; transform: translateZ(30px); }
.tcard .emblem { width: 58px; height: 64px; clip-path: var(--hex-v); display: grid; place-items: center; flex: none; font-family: var(--font-display); font-weight: 800; font-size: 20px; color: #1a1206; background: linear-gradient(150deg, var(--accent-2), var(--accent) 50%, var(--accent-3)); box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.4); }
.tcard h3 { font-family: var(--font-display); font-size: 19px; margin: 0; letter-spacing: 0.03em; line-height: 1.2; }
.tcard .game { color: var(--muted); font-size: 13px; margin-top: 3px; }
.tcard .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 14px; transform: translateZ(20px); }
.tcard .foot { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; transform: translateZ(15px); }
.tcard .foot span { display: inline-flex; align-items: center; gap: 6px; }
.tcard .champ { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.16), transparent); color: var(--accent-2); font-weight: 700; font-size: 14px; }
.progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; position: relative; margin-top: 14px; }
.progress > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2)); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.8); transition: width 1.2s var(--ease); }
.progress > i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent); animation: sweep 2.4s infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty .bighex { width: 120px; height: 132px; margin: 0 auto 18px; clip-path: var(--hex-v); display: grid; place-items: center; background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.02)); color: var(--accent); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- tournament page ---------- */
.thero { position: relative; margin-top: 26px; padding: 30px; overflow: hidden; }
.thero .bgart { position: absolute; inset: 0; pointer-events: none; opacity: 0.5; }
.thero .top { display: flex; gap: 26px; align-items: center; position: relative; flex-wrap: wrap; }
.thero .emblem { width: 110px; height: 122px; clip-path: var(--hex-v); display: grid; place-items: center; flex: none; font-family: var(--font-display); font-weight: 800; font-size: 38px; color: #1a1206; background: linear-gradient(150deg, var(--accent-2), var(--accent) 50%, var(--accent-3)); position: relative; animation: emblemGlow 4s ease-in-out infinite; }
@keyframes emblemGlow { 50% { filter: drop-shadow(0 0 22px rgba(var(--accent-rgb), 0.9)) brightness(1.08); } }
.thero h1 { font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 44px); margin: 6px 0 10px; line-height: 1.08; letter-spacing: 0.03em; }
.thero .chips-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.thero .info { flex: 1; min-width: 260px; }
.thero .side { display: flex; align-items: center; gap: 22px; }
.ring { width: 108px; height: 108px; position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .val b { font-family: var(--font-display); font-size: 26px; display: block; line-height: 1; }
.ring .val small { font-size: 10px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.countdown { display: flex; gap: 8px; }
.countdown div { min-width: 58px; padding: 10px 8px; border-radius: 12px; text-align: center; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.countdown b { font-family: var(--font-display); font-size: 22px; display: block; line-height: 1; }
.countdown small { font-size: 10px; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; }
.thero .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; position: relative; }
.viewers { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); }
.viewers .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s infinite; color: var(--ok); }

.tabs { display: flex; gap: 4px; margin: 24px 0 20px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.05); position: relative; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 11px; background: none; color: var(--muted); font-weight: 700; cursor: pointer; white-space: nowrap; transition: color 0.3s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); }
.tabs .pill { position: absolute; z-index: 0; top: 5px; bottom: 5px; border-radius: 11px; background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.25), rgba(var(--accent-rgb), 0.08)); border: 1px solid var(--line-2); box-shadow: 0 0 24px -6px rgba(var(--accent-rgb), 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08); transition: left 0.5s var(--ease), width 0.5s var(--ease); }
.tab-body { animation: pageIn 0.5s var(--ease) backwards; }

/* ---------- bracket ---------- */
.bracket-wrap { position: relative; overflow: hidden; height: min(78vh, 900px); min-height: 460px; border-radius: var(--radius); cursor: grab; touch-action: none; }
.bracket-wrap.dragging { cursor: grabbing; }
.bracket-wrap:fullscreen { height: 100vh; border-radius: 0; background: radial-gradient(1200px 800px at 15% -10%, #1a1330 0%, transparent 60%), var(--bg0); }
.bracket-wrap .bg { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(var(--accent-rgb), 0.14) 1px, transparent 1px); background-size: 26px 26px; opacity: 0.6; }
.bracket-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.bracket-tools { position: absolute; z-index: 5; top: 14px; left: 14px; right: 14px; display: flex; gap: 8px; align-items: center; pointer-events: none; flex-wrap: wrap; }
.bracket-tools > * { pointer-events: auto; }
.bracket-tools .group { display: flex; gap: 2px; padding: 4px; border-radius: 13px; background: rgba(10, 8, 20, 0.75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); }
.bracket-tools .group button { border: 0; background: none; padding: 7px 9px; border-radius: 9px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; }
.bracket-tools .group button:hover, .bracket-tools .group button.on { background: var(--glass-2); color: var(--text); }
.bracket-tools .zoomval { min-width: 48px; text-align: center; font-size: 12px; font-weight: 800; color: var(--accent-2); align-self: center; }
.bracket-tools .search { max-width: 240px; }
.bracket-tools .search input { padding-top: 8px; padding-bottom: 8px; background: rgba(10, 8, 20, 0.75); backdrop-filter: blur(14px); border-color: var(--line); }
.minihint { position: absolute; z-index: 5; right: 14px; bottom: 12px; font-size: 11px; color: var(--dim); pointer-events: none; }

.b-section-title { position: absolute; display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 15px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent-2); white-space: nowrap; }
.b-section-title::after { content: ''; height: 1px; width: 160px; background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.7), transparent); }
.b-section-title .hx { width: 12px; height: 13px; clip-path: var(--hex-v); background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.b-round { position: absolute; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.b-round small { display: block; font-size: 10px; letter-spacing: 0.08em; color: var(--dim); font-weight: 600; text-transform: none; margin-top: 2px; }
svg.b-lines { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
svg.b-lines path { fill: none; stroke: rgba(var(--accent-rgb), 0.18); stroke-width: 1.6; transition: stroke 0.4s, opacity 0.4s; }
svg.b-lines path.done { stroke: rgba(var(--accent-rgb), 0.75); filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.8)); stroke-dasharray: 6 6; animation: flow 1.4s linear infinite; }
svg.b-lines path.hl { stroke: #fff; filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 1)); stroke-dasharray: none; stroke-width: 2.4; }
svg.b-lines.dimmed path:not(.hl) { opacity: 0.25; }
svg.b-lines path.draw { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s var(--ease) forwards; }
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.match {
  position: absolute; width: var(--mw, 236px); cursor: pointer; user-select: none;
  background: linear-gradient(160deg, rgba(30, 25, 50, 0.92), rgba(14, 11, 26, 0.94)); clip-path: var(--chamfer);
  transition: transform 0.35s var(--ease), filter 0.35s, opacity 0.35s; animation: matchIn 0.6s var(--ease) both; animation-delay: calc(var(--d, 0) * 25ms);
}
.match::before { content: ''; position: absolute; inset: 0; clip-path: var(--chamfer); pointer-events: none; padding: 1px; background: linear-gradient(140deg, rgba(var(--accent-rgb), 0.5), rgba(255, 255, 255, 0.06) 35%, rgba(255, 255, 255, 0.04) 65%, rgba(var(--accent-rgb), 0.35)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@keyframes matchIn { from { opacity: 0; transform: translateX(-14px) scale(0.96); } to { opacity: 1; transform: none; } }
.match:hover { transform: translateY(-2px) scale(1.035); filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 16px rgba(var(--accent-rgb), 0.35)); z-index: 3; }
.match .mid { position: absolute; left: -1px; top: 50%; transform: translate(-100%, -50%); font-size: 10px; font-weight: 800; color: var(--dim); padding-right: 6px; }
.match .slot { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 0 0 10px; position: relative; }
.match .slot + .slot { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.match .seed { width: 20px; height: 22px; display: grid; place-items: center; clip-path: var(--hex-v); background: rgba(255, 255, 255, 0.07); font-size: 10px; font-weight: 800; color: var(--muted); flex: none; }
.match .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 13px; }
.match .name.tbd { color: var(--dim); font-weight: 500; font-style: italic; font-size: 12px; }
.match .score { width: 36px; height: 100%; display: grid; place-items: center; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, 0.3); color: var(--muted); }
.match .slot.win .name { color: var(--accent-2); }
.match .slot.win .seed { background: linear-gradient(150deg, var(--accent-2), var(--accent-3)); color: #1a1206; }
.match .slot.win .score { background: linear-gradient(150deg, rgba(var(--accent-rgb), 0.55), rgba(var(--accent-rgb), 0.22)); color: #fff; }
.match .slot.win::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.match .slot.lose .name, .match .slot.lose .score { opacity: 0.45; }
.match.completed .slot.lose .name { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.2); }
.match.pending { opacity: 0.72; }
.match.open::before { background: linear-gradient(140deg, rgba(var(--accent-rgb), 0.85), rgba(var(--accent-rgb), 0.1) 40%, rgba(var(--accent-rgb), 0.1) 60%, rgba(var(--accent-rgb), 0.7)); }
.match.live { animation: matchIn 0.6s var(--ease) both, livePulse 2s ease-in-out infinite; }
.match.live::before { background: linear-gradient(140deg, #ff3b5c, rgba(255, 59, 92, 0.25) 40%, rgba(255, 59, 92, 0.25) 60%, #ff3b5c); }
.match .livetag { position: absolute; right: 42px; top: -1px; font-size: 9px; font-weight: 900; letter-spacing: 0.15em; padding: 1px 6px 2px; border-radius: 0 0 6px 6px; background: #ff3b5c; color: #fff; }
@keyframes livePulse { 50% { filter: drop-shadow(0 0 14px rgba(255, 59, 92, 0.6)); } }
.settled .match { animation: none; }
.settled .match.live { animation: livePulse 2s ease-in-out infinite; }
.settled .match.flash { animation: flash 1.6s var(--ease); }
.match.ghost { opacity: 0.18; pointer-events: none; }
.match.dim { opacity: 0.18; filter: grayscale(0.6); }
.match.hl { filter: drop-shadow(0 0 16px rgba(var(--accent-rgb), 0.7)); z-index: 3; }
.match.hl .slot.me { background: rgba(var(--accent-rgb), 0.16); }
.match.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 100% { filter: none; } 30% { filter: drop-shadow(0 0 24px rgba(var(--accent-rgb), 1)) brightness(1.4); } }
.match .meta-line { position: absolute; left: 10px; right: 0; top: 100%; margin-top: 3px; font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match.final-match { --mw: 260px; }
.match.final-match::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%); background-size: 250% 100%; animation: shimmer 4s linear infinite; }
.champion-plate { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; animation: matchIn 1s var(--ease) both; }
.champion-plate .crown { color: var(--accent); filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.9)); animation: float 3s ease-in-out infinite; }
.champion-plate b { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.08em; }
.champion-plate small { font-size: 10px; letter-spacing: 0.35em; color: var(--accent); text-transform: uppercase; }

/* round robin grid */
.rounds-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 260px; gap: 22px; overflow-x: auto; padding: 6px 4px 18px; }
.rounds-grid .col h4 { margin: 0 0 12px; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); text-align: center; }
.rounds-grid .match { position: relative; margin: 0 0 14px 14px; --mw: 236px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--dim); font-weight: 800; padding: 6px 12px; }
table.t td { padding: 12px; background: rgba(255, 255, 255, 0.025); border-top: 1px solid rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
table.t td:first-child { border-left: 1px solid rgba(255, 255, 255, 0.04); border-radius: 12px 0 0 12px; }
table.t td:last-child { border-right: 1px solid rgba(255, 255, 255, 0.04); border-radius: 0 12px 12px 0; }
table.t tr { animation: rise 0.6s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
table.t tr:hover td { background: rgba(var(--accent-rgb), 0.06); }
table.t .num { text-align: center; font-variant-numeric: tabular-nums; }
table.t .pts { font-weight: 900; color: var(--accent-2); font-size: 16px; }
.rank { width: 34px; height: 37px; display: grid; place-items: center; clip-path: var(--hex-v); font-weight: 900; font-size: 13px; background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.rank.r1 { background: linear-gradient(150deg, #fff4c9, #e3c27a 50%, #9c7429); color: #1a1206; box-shadow: 0 0 20px rgba(227, 194, 122, 0.6); }
.rank.r2 { background: linear-gradient(150deg, #ffffff, #c9ced8 50%, #7d8494); color: #111; }
.rank.r3 { background: linear-gradient(150deg, #ffd9b8, #cd8a4f 50%, #7d4a22); color: #1a0d03; }
.pcell { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.form { display: flex; gap: 3px; }
.form i { width: 18px; height: 20px; clip-path: var(--hex-v); display: grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 900; }
.form i.W { background: rgba(74, 222, 128, 0.25); color: #9ff5bf; }
.form i.L { background: rgba(255, 95, 109, 0.22); color: #ffb3ba; }
.form i.D { background: rgba(255, 255, 255, 0.1); color: var(--muted); }

/* ---------- podium ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 18px; align-items: end; max-width: 820px; margin: 10px auto 34px; perspective: 1200px; }
.podium .place { text-align: center; animation: podiumIn 1s var(--ease) both; }
.podium .place:nth-child(1) { animation-delay: 0.3s; } .podium .place:nth-child(2) { animation-delay: 0.05s; } .podium .place:nth-child(3) { animation-delay: 0.5s; }
@keyframes podiumIn { from { opacity: 0; transform: translateY(60px) rotateX(30deg); } to { opacity: 1; transform: none; } }
.podium .who { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 14px; }
.podium .who b { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.04em; }
.podium .pillar { position: relative; clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 46px; color: rgba(0, 0, 0, 0.45); transform-style: preserve-3d; }
.podium .p1 .pillar { height: 190px; background: linear-gradient(180deg, #fff1c2, #e3c27a 30%, #8c6823); box-shadow: 0 0 60px rgba(227, 194, 122, 0.5); }
.podium .p2 .pillar { height: 140px; background: linear-gradient(180deg, #ffffff, #c4cad6 30%, #6c7384); }
.podium .p3 .pillar { height: 110px; background: linear-gradient(180deg, #ffe1c4, #c9844a 30%, #6e3f1a); }
.podium .pillar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%); background-size: 250% 100%; animation: shimmer 3.5s linear infinite; }
.podium .crown { color: var(--gold); filter: drop-shadow(0 0 14px rgba(227, 194, 122, 0.9)); animation: float 3s ease-in-out infinite; }

/* ---------- lists ---------- */
.plist { display: grid; gap: 8px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease); animation: rise 0.5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 25ms); }
.prow:hover { background: rgba(var(--accent-rgb), 0.06); border-color: var(--line); }
.prow.dragging { opacity: 0.4; }
.prow.over { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.prow .grip { cursor: grab; color: var(--dim); display: grid; place-items: center; }
.prow .seedno { width: 30px; text-align: center; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.prow .pname { flex: 1; min-width: 0; }
.prow .pname b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .pname small { color: var(--dim); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.pcard { padding: 18px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform 0.4s var(--ease); animation: rise 0.6s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
.pcard:hover { transform: translateY(-4px); }
.pcard b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard small { color: var(--dim); font-size: 12px; }
.checkin { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); color: var(--dim); transition: 0.25s; }
.checkin.on { color: #b5f5cf; border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.12); }

.mlist { display: grid; gap: 10px; }
.mrow { display: grid; grid-template-columns: 56px 1fr auto 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; transition: 0.3s var(--ease); animation: rise 0.5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 25ms); }
.mrow:hover { border-color: var(--line-2); background: rgba(var(--accent-rgb), 0.05); transform: translateX(4px); }
.mrow .id { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 15px; }
.mrow .id small { display: block; font-family: var(--font); font-size: 10px; color: var(--dim); letter-spacing: 0.08em; font-weight: 700; }
.mrow .side { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; }
.mrow .side.r { justify-content: flex-end; text-align: right; }
.mrow .side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .side.win { color: var(--accent-2); }
.mrow .side.lose { opacity: 0.5; }
.mrow .sc { font-family: var(--font-display); font-weight: 800; font-size: 20px; min-width: 76px; text-align: center; padding: 4px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); letter-spacing: 0.06em; }
.mrow .st { display: flex; gap: 8px; align-items: center; justify-content: flex-end; min-width: 120px; }
.round-head { display: flex; align-items: center; gap: 12px; margin: 22px 0 10px; font-family: var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; font-size: 13px; color: var(--accent-2); }
.round-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, var(--accent), transparent); }
.tl-item { position: relative; padding: 0 0 18px; animation: rise 0.5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
.tl-item .hx { position: absolute; left: -34px; top: 0; width: 27px; height: 30px; clip-path: var(--hex-v); display: grid; place-items: center; background: linear-gradient(150deg, rgba(var(--accent-rgb), 0.4), rgba(var(--accent-rgb), 0.1)); color: var(--accent-2); }
.tl-item .hx .i { width: 13px; height: 13px; }
.tl-item p { margin: 0; font-weight: 600; }
.tl-item small { color: var(--dim); font-size: 12px; }

.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
.prose { white-space: pre-wrap; color: #ddd6c8; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--dim); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.kv dd { margin: 0; font-weight: 600; }
.copybox { display: flex; gap: 8px; }
.copybox input { font-size: 13px; color: var(--muted); }

/* format picker */
.fmt-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fmt-pick label { position: relative; cursor: pointer; padding: 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.07); transition: 0.3s var(--ease); display: flex; gap: 12px; }
.fmt-pick label:hover { border-color: var(--line-2); }
.fmt-pick input { display: none; }
.fmt-pick label:has(input:checked) { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.08); box-shadow: 0 0 0 1px var(--accent) inset, 0 0 30px -10px rgba(var(--accent-rgb), 0.6); }
.fmt-pick .fi { width: 40px; height: 44px; clip-path: var(--hex-v); flex: none; display: grid; place-items: center; background: rgba(var(--accent-rgb), 0.15); color: var(--accent-2); }
.fmt-pick b { display: block; font-size: 14px; }
.fmt-pick small { color: var(--dim); font-size: 12px; line-height: 1.4; display: block; margin-top: 2px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches label { cursor: pointer; }
.swatches input { display: none; }
.swatches span { display: block; width: 38px; height: 42px; clip-path: var(--hex-v); transition: transform 0.3s var(--ease); position: relative; }
.swatches input:checked + span { transform: scale(1.18); filter: drop-shadow(0 0 10px currentColor); }
.swatches input:checked + span::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #111; font-weight: 900; }

/* ---------- modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(3, 2, 8, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadeIn 0.3s var(--ease); }
.modal-root.closing { animation: fadeOut 0.25s var(--ease) forwards; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 28px; animation: modalIn 0.5s var(--ease); background: linear-gradient(160deg, rgba(34, 28, 56, 0.92), rgba(12, 10, 22, 0.95)); }
.modal.wide { width: min(860px, 100%); }
.modal-root.closing .modal { animation: modalOut 0.25s var(--ease) forwards; }
.modal h2 { font-family: var(--font-display); margin: 0 0 4px; font-size: 24px; letter-spacing: 0.04em; }
.modal .close { position: absolute; right: 16px; top: 16px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(0.94) rotateX(8deg); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(20px) scale(0.96); } }

.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin: 24px 0 8px; }
.versus .pl { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px 12px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.06); background: rgba(0, 0, 0, 0.2); cursor: pointer; transition: 0.35s var(--ease); position: relative; }
.versus .pl:hover { border-color: var(--line-2); }
.versus .pl.sel { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.1); box-shadow: 0 0 40px -10px rgba(var(--accent-rgb), 0.7); }
.versus .pl.sel::after { content: 'SIEGER'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 900; letter-spacing: 0.2em; padding: 3px 10px; border-radius: 999px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #1a1206; }
.versus .pl b { font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.versus .vs { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--accent); text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.8); position: relative; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 34px; height: 38px; clip-path: var(--hex-v); border: 0; background: rgba(var(--accent-rgb), 0.18); color: var(--accent-2); cursor: pointer; font-size: 18px; font-weight: 800; transition: 0.2s; }
.stepper button:hover { background: rgba(var(--accent-rgb), 0.4); }
.stepper input { width: 64px; text-align: center; font-family: var(--font-display); font-size: 24px; font-weight: 800; padding: 6px; }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: grid; gap: 10px; }
.toast { display: flex; gap: 12px; align-items: center; min-width: 260px; max-width: 380px; padding: 13px 16px; border-radius: 14px; background: linear-gradient(160deg, rgba(34, 28, 56, 0.95), rgba(14, 11, 26, 0.95)); border: 1px solid var(--line); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.8); animation: toastIn 0.5s var(--ease); font-weight: 600; font-size: 14px; backdrop-filter: blur(14px); }
.toast.out { animation: toastOut 0.35s var(--ease) forwards; }
.toast .ti { width: 30px; height: 33px; clip-path: var(--hex-v); flex: none; display: grid; place-items: center; background: rgba(var(--accent-rgb), 0.2); color: var(--accent-2); }
.toast.error .ti { background: rgba(255, 95, 109, 0.22); color: #ffc0c6; }
.toast.ok .ti { background: rgba(74, 222, 128, 0.2); color: #b5f5cf; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(0.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ---------- login ---------- */
.auth-wrap { min-height: calc(100vh - 200px); display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: min(420px, 100%); padding: 38px 32px; text-align: center; position: relative; overflow: hidden; }
.auth-card .emblem { width: 96px; height: 96px; margin: 0 auto 14px; }
.auth-card form { text-align: left; margin-top: 24px; }

footer.foot { text-align: center; color: var(--dim); font-size: 12px; padding: 30px 0 40px; letter-spacing: 0.08em; }
footer.foot .ornament { margin: 0 0 14px; }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; }

/* ---------- embed mode ---------- */
body.embed { background: transparent; }
body.embed .ambient, body.embed .topbar, body.embed footer.foot { display: none; }
body.embed main { padding: 0; }
body.embed .bracket-wrap { height: 100vh; border-radius: 0; border: 0; box-shadow: none; background: transparent; backdrop-filter: none; }
body.embed .bracket-wrap .bg { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .btn.menu-btn { display: inline-flex; margin-left: auto; }
  .nav { position: absolute; top: calc(100% + 6px); left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px; border-radius: 18px; background: rgba(12, 10, 22, 0.96); border: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .topbar .bar { position: relative; }
  .grid2, .grid3, .fmt-pick { grid-template-columns: 1fr; }
  .thero { padding: 22px; }
  .thero .emblem { width: 80px; height: 88px; font-size: 28px; }
  .mrow { grid-template-columns: 1fr auto 1fr; }
  .mrow .id, .mrow .st { display: none; }
  .tgrid { grid-template-columns: 1fr; }
  .podium .pillar { font-size: 30px; }
  .podium .p1 .pillar { height: 140px; } .podium .p2 .pillar { height: 100px; } .podium .p3 .pillar { height: 80px; }
  .hero { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
