/* tournaments.itgolf.io — matches the itgolf.io look (dark, gold wordmark, Lexend,
   bordered stat cards, underlined tabs) with a little more energy for players. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-2: #101010;
  --card: #141414;
  --card-2: #1b1b1b;
  --card-hover: #1f1f1f;
  --line: #262626;
  --line-2: #333333;
  --text: #f5f5f5;
  --text-2: #b4b4b4;
  --muted: #7d7d7d;
  --gold: #facc15;
  --gold-2: #eab308;
  --gold-ink: #111111;
  --gold-soft: rgba(250, 204, 21, 0.12);
  --green: #22c55e;
  --blue: #3b82f6;
  --red: #ef4444;
  --orange: #f59e0b;
  --under: #f87171;          /* under par: golf's red numbers */
  --silver: #cbd5e1;
  --bronze: #d6895a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  /* chart tokens used by charts.js */
  --surface-1: var(--card); --grid: #262626; --axis: #3a3a3a; --series-1: #3b82f6; --series-2: #f59e0b;
  --div-neg: #3b82f6; --div-pos: #ef4444; --critical: #ef4444; --text-primary: var(--text); --text-secondary: var(--text-2); --text-muted: var(--muted);
  --radius: 12px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf9;
  --bg-2: #f2f2f0;
  --card: #ffffff;
  --card-2: #f6f6f4;
  --card-hover: #f1f1ee;
  --line: #e5e5e2;
  --line-2: #d6d6d2;
  --text: #0b0b0b;
  --text-2: #4a4a47;
  --muted: #7a7a76;
  --gold: #eab308;
  --gold-2: #ca8a04;
  --gold-ink: #111111;
  --gold-soft: rgba(234, 179, 8, 0.14);
  --green: #16a34a;
  --blue: #2563eb;
  --red: #dc2626;
  --orange: #d97706;
  --under: #dc2626;
  --silver: #94a3b8;
  --bronze: #b4693d;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --grid: #e5e5e2; --axis: #cfcfca; --series-1: #2563eb; --series-2: #d97706; --div-neg: #2563eb; --div-pos: #dc2626;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: "Lexend", system-ui, sans-serif; font-size: 15px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 34px; font-weight: 700; line-height: 1.15; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); }
.sub { color: var(--text-2); margin: 6px 0 0; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* ---------- top bars ---------- */
/* Header built like itgolf.io: the strip and the bar are pinned together, the bar is full width
   (logo at the far left, links and account at the far right). Page content keeps its own width. */
.topwrap { position: sticky; top: 0; z-index: 50; }
.announce { background: #242424; color: #fff; font-size: 14px; font-weight: 500; display: flex; gap: 12px; align-items: center; justify-content: center; padding: 10px 16px; text-align: center; flex-wrap: wrap; }
:root[data-theme="light"] .announce { background: #111; }
.announce-btn { background: #5865f2; color: #fff; padding: 4px 12px; border-radius: 6px; font-weight: 700; font-size: 12px; }
.announce-btn:hover { background: #4752c4; }
.top { position: relative; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-inner { width: 100%; padding: 0 16px; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; display: inline-flex; align-items: baseline; gap: 0; white-space: nowrap; }
.logo span { color: var(--gold); }
.logo em { font-style: normal; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-ink); background: var(--gold); border-radius: 5px; padding: 2px 6px; margin-left: 8px; position: relative; top: -3px; }
.logo.small { font-size: 18px; }
.mainnav { display: flex; gap: 24px; margin-left: auto; margin-right: 8px; }
.mainnav a { color: var(--text-2); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
:root:not([data-theme="light"]) .mainnav a:not(.on) { color: #a3a3a3; }
.mainnav a:hover, :root:not([data-theme="light"]) .mainnav a:hover { color: var(--text); }
.mainnav a.on { color: var(--text); }
.mainnav a.on::after { content: ""; }
.top-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { background: transparent; border: 1px solid var(--line); border-radius: 10px; height: 36px; width: 36px; display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.menu-btn { display: none; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; color: var(--text); font-size: 14px; }
.acct-btn:hover { border-color: var(--line-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 12px; border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); flex: none; }
.avatar.lg { width: 76px; height: 76px; font-size: 26px; border-width: 2px; }
.acct { position: relative; }
.dropdown { position: absolute; right: 0; top: calc(100% + 10px); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 240px; padding: 6px; z-index: 40; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--text); }
.dropdown a:hover, .dropdown button:hover { background: var(--card-2); }
.dropdown .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; }
.bell.on { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: var(--gold-soft); }
.bell.on svg { fill: currentColor; fill-opacity: .25; }
.bell-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #111; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.dropdown.alerts { width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.dropdown .nt { display: flex; align-items: flex-start; gap: 4px; border-radius: 8px; }
.dropdown .nt.new { background: var(--gold-soft); }
.dropdown .nt a { flex: 1; min-width: 0; }
.dropdown .nt a b, .dropdown .nt a span { display: block; }
.dropdown .nt a span { font-size: 12.5px; margin-top: 2px; }
.dropdown .nt button { width: auto; flex: none; color: var(--text-2); padding: 9px 10px; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

/* ---------- buttons, chips, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); cursor: pointer; white-space: nowrap; transition: transform .08s ease, background .15s; }
.btn:hover { background: var(--card-hover); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.btn.gold:hover { background: var(--gold-2); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; background: var(--card); }
.chip.gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: var(--gold-soft); }
.chip.green { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.chip.red { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.chip.blue { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.chip.orange { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 40%, transparent); }
.chip.live { color: #fff; background: var(--red); border-color: transparent; font-weight: 600; letter-spacing: .04em; }
/* Private (invite-only) leagues: a lock chip and a dashed outline, so they never pass for public events. */
.chip.private { color: var(--text); background: color-mix(in srgb, var(--text) 10%, var(--card)); border-style: dashed; border-color: color-mix(in srgb, var(--text) 45%, transparent); font-weight: 600; }
.chip.private svg { width: 11px; height: 11px; }
.ev-card.private { border-style: dashed; border-color: color-mix(in srgb, var(--text) 32%, var(--line)); }
.ev-card.private .ev-art { filter: saturate(.55); }
.chip.live .dot-live { background: #fff; }
.pill-status { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 8px; background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
input, select, textarea { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; min-height: 160px; width: 100%; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-2); }
.check input { width: auto; }

/* ---------- cards, stats, tabs, tables ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 14px; }
.stat .v { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.v.gold { color: var(--gold); } .v.green { color: var(--green); } .v.blue { color: var(--blue); } .v.red { color: var(--red); } .v.orange { color: var(--orange); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 0 0 20px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 4px; margin-right: 18px; border: 0; background: none; color: var(--text-2); font-weight: 500; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .on { color: var(--text); border-bottom-color: var(--gold); font-weight: 600; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 500; }
.seg button.on { background: var(--card-2); color: var(--text); }
.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tablewrap .scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; color: var(--text-2); font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card-2); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
td.c, th.c { text-align: center; }
tr.click { cursor: pointer; transition: background .12s; }
tr.click:hover td { background: var(--card-hover); }
.under { color: var(--under); font-weight: 600; }
.even { color: var(--text); font-weight: 600; }
.over { color: var(--text-2); font-weight: 600; }
.pos { font-weight: 700; width: 56px; }
.player-cell { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.flag { font-size: 16px; }
.empty { padding: 36px; text-align: center; color: var(--muted); }

/* ---------- page sections ---------- */
.page { padding-top: 34px; padding-bottom: 70px; }
.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; }
.section-head a { color: var(--gold); font-size: 14px; font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 420px at 78% -10%, rgba(250, 204, 21, 0.20), transparent 60%),
              radial-gradient(700px 380px at 0% 110%, rgba(34, 197, 94, 0.14), transparent 60%), var(--bg); }
.hero svg.contours { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; padding: 64px 20px 56px; max-width: 1120px; margin: 0 auto; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--gold); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.hero h1 { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 14px; line-height: 1.02; }
.hero h1 .gold { color: var(--gold); }
.hero p.lead { color: var(--text-2); font-size: 17px; max-width: 520px; margin: 0 0 26px; }
.live-card { background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(6px); }
.live-card .lc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.live-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; align-items: center; }
.ticker { border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; white-space: nowrap; font-size: 13px; color: var(--text-2); }
.ticker-track { display: inline-flex; gap: 36px; padding: 9px 0; animation: tick 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker b { color: var(--text); font-weight: 600; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* event cards */
.ev-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s, box-shadow .15s; cursor: pointer; }
.ev-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); box-shadow: var(--shadow); }
.ev-art { height: 120px; position: relative; }
.ev-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ev-art .badges { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; }
.ev-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ev-body h3 { font-size: 17px; }
.ev-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; }
.countdown small { color: var(--muted); font-weight: 400; }

/* event header */
.ev-hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.ev-hero .art { position: absolute; inset: 0; }
.ev-hero .art svg { width: 100%; height: 100%; }
.ev-hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.15) 0%, rgba(10,10,10,.85) 75%, var(--bg) 100%); }
:root[data-theme="light"] .ev-hero .shade { background: linear-gradient(180deg, rgba(250,250,249,.1) 0%, rgba(250,250,249,.85) 75%, var(--bg) 100%); }
.ev-hero .inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 70px 20px 26px; }
.ev-hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 8px; }
.big-count { display: flex; gap: 10px; }
.big-count div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; text-align: center; min-width: 64px; }
.big-count b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.big-count span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* podium */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin-bottom: 18px; }
.pod { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: center; position: relative; cursor: pointer; }
.pod:hover { border-color: var(--line-2); }
.pod .medal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; margin: 0 auto 8px; color: #111; }
.pod.p1 { padding-top: 24px; border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: linear-gradient(180deg, var(--gold-soft), var(--card) 70%); }
.pod.p1 .medal { background: var(--gold); width: 42px; height: 42px; font-size: 18px; }
.pod.p2 .medal { background: var(--silver); }
.pod.p3 .medal { background: var(--bronze); }
.pod .nm { font-weight: 600; font-size: 15px; }
.pod .sc { font-size: 30px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pod .pts { font-size: 12px; color: var(--muted); }

/* scorecard */
.scard { width: 100%; border-collapse: separate; border-spacing: 0; }
.scard th, .scard td { text-align: center; padding: 8px 4px; font-size: 14px; border-bottom: 1px solid var(--line); }
.scard th:first-child, .scard td:first-child { text-align: left; padding-left: 16px; color: var(--text-2); }
.scard .tot { font-weight: 700; background: var(--card-2); }
.sc { display: inline-grid; place-items: center; width: 28px; height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sc.birdie { border: 1.5px solid var(--under); border-radius: 50%; color: var(--under); }
.sc.eagle { border: 1.5px solid var(--under); border-radius: 50%; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--under); color: var(--under); }
.sc.bogey { border: 1.5px solid var(--text-2); border-radius: 3px; }
.sc.double { border: 1.5px solid var(--text-2); border-radius: 3px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--text-2); }

/* manage */
.manage-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 8px 0 22px; flex-wrap: wrap; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.note { font-size: 13px; color: var(--muted); }
.banner { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.gold { border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: var(--gold-soft); }
.banner.red { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.feed div { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed div:last-child { border-bottom: 0; }
.feed .t { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 10px; font-size: 13px; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; position: relative; }
.step::before { counter-increment: step; content: counter(step); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); font-weight: 800; margin-bottom: 12px; }
.step p { color: var(--text-2); font-size: 14px; margin: 6px 0 0; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-family: Lexend, sans-serif; }
.chart .dlabel { fill: var(--text-2); font-size: 11px; font-family: Lexend, sans-serif; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
#tip { position: fixed; pointer-events: none; z-index: 80; background: var(--card); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; font-size: 12px; box-shadow: var(--shadow); display: none; max-width: 260px; }

/* modal + toasts */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 90; display: grid; place-items: center; padding: 16px; animation: fade .12s ease; }
.modal { background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; width: min(520px, 100%); max-height: 86vh; overflow: auto; padding: 22px; box-shadow: var(--shadow); }
.modal h2 { margin-bottom: 6px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.pick { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pick button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.pick button:hover { border-color: var(--gold); }
.pick .role { margin-left: auto; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 95; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--card); border: 1px solid var(--line-2); border-left: 3px solid var(--green); border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow); font-size: 14px; animation: fade .15s ease; max-width: 360px; }
.toast.err { border-left-color: var(--red); }

.foot { border-top: 1px solid var(--line); padding: 30px 0 40px; margin-top: 30px; }
.foot-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; color: var(--text-2); font-size: 14px; }
.foot-links a:hover { color: var(--text); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 44px; }
  .hero h1 { font-size: 42px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .podium { grid-template-columns: 1fr; }
  .pod.p1 { order: -1; }
  .mainnav { display: none; position: absolute; top: 64px; gap: 0; margin: 0; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px 16px; }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 10px 0; }
  .menu-btn { display: grid; }
  .top-right { margin-left: auto; }
  .acct-btn .nm { display: none; }
  .ev-hero h1 { font-size: 30px; }
  .kv { grid-template-columns: 1fr; }
  th, td { padding: 10px 10px; }
}

/* small-screen fixes: let grid columns shrink, scale the hero type */
.grid2 > *, .grid3 > *, .hero-inner > *, .stats > * { min-width: 0; }
.hero h1 { font-size: clamp(34px, 8.5vw, 56px); }
.ev-hero h1 { font-size: clamp(28px, 6.5vw, 40px); }
@media (max-width: 520px) {
  .logo em { display: none; }
  .top-inner { gap: 12px; padding: 0 14px; }
  .wrap { padding: 0 16px; }
  .hero-inner { padding: 36px 16px 40px; }
  .stats { grid-template-columns: 1fr 1fr !important; }
  .big-count div { min-width: 0; }
  .manage-head .row { width: 100%; }
}

/* backdrops, leagues, event editor */
.art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-art { overflow: hidden; }
.ev-hero .art { overflow: hidden; }
.bd-preview { position: relative; height: 150px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-top: 12px; }
.bd-preview svg { width: 100%; height: 100%; }
.backdrop-edit + .panel { margin-top: 16px; }
.pars { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; }
.pars label { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.pars input { width: 46px; padding: 6px 4px; text-align: center; }
.par-tot { margin-left: 10px; font-weight: 600; color: var(--text-2); padding-bottom: 8px; }
.setgroup { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.setgroup h4 { margin: 0 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.setgroup select, .setgroup input { width: 100%; }
.setgroup .check input { width: auto; }
.panel + .panel, form .panel + .panel { margin-top: 16px; }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
.grid2 > .panel + .panel, .grid3 > .panel + .panel { margin-top: 0; }
