:root {
--ink: #111318; --muted: #6a7080; --line: #e4e7ee; --bg: #eef1f6; --card: #ffffff;
--blue: #2346e6; --blue-2: #1532b8; --navy: #0c1633; --ball: #d9f24f; --coral: #ff5a4e; --sun: #ffc83d;
--win: #e5f8d8; --plate: #ece8ff; --out: #ffe5e2;
--display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
--sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
a { color: var(--blue); }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
/* header (compact) */
.hero { background: linear-gradient(160deg, #2a52ff 0%, #1532b8 55%, #0c1633 100%); color: #fff; padding: calc(20px + env(safe-area-inset-top)) 0 22px; position: relative; overflow: hidden; border-radius: 0 0 28px 28px; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ecff7a, var(--ball) 55%, #b5cc2e); opacity: .9; }
.hero .eyebrow { color: var(--ball); letter-spacing: .12em; text-transform: uppercase; font-size: 11px; font-weight: 700; position: relative; z-index: 1; }
.hero h1 { font: 400 40px/1 var(--display); letter-spacing: .02em; margin: 6px 0 4px; position: relative; z-index: 1; }
.hero .meta { opacity: .85; font-size: 13px; position: relative; z-index: 1; }
.hero .meta a { color: var(--ball) !important; }
.live { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(255,90,78,.3); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .35; } }
/* floating pill tab bar */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(96vw, 460px); background: #111318; border-radius: 99px; display: flex; justify-content: space-between; padding: 6px; z-index: 10; box-shadow: 0 12px 30px rgba(12,22,51,.35); }
.tabbar button { flex: 1; background: none; border: 0; padding: 7px 0 6px; font: 600 10px var(--sans); color: #9aa1b2; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; border-radius: 99px; }
.tabbar button .ic { font-size: 18px; line-height: 1; filter: grayscale(1) brightness(1.6); opacity: .75; }
.tabbar button.on { background: var(--ball); color: var(--ink); }
.tabbar button.on .ic { filter: none; opacity: 1; }
.tabs { display: flex; gap: 6px; margin: 14px 0; overflow-x: auto; background: #111318; padding: 5px; border-radius: 99px; }
.tabs button { flex: 1; border: 0; background: none; padding: 9px 12px; border-radius: 99px; font: 600 13px var(--sans); color: #9aa1b2; cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--ball); color: var(--ink); }
.view { display: none; padding-top: 16px; }
.view.on { display: block; }
h2 { font: 400 34px/1 var(--display); letter-spacing: .02em; margin: 22px 0 8px; }
h3 { font: 800 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 24px 0 10px; }
.card { background: var(--card); border: 0; border-radius: 22px; overflow: hidden; margin-bottom: 12px; box-shadow: 0 4px 18px rgba(12,22,51,.06); }
.card .hd { padding: 14px 16px; background: var(--blue); color: #fff; display: flex; justify-content: space-between; align-items: center; font: 400 24px/1 var(--display); letter-spacing: .03em; }
.card .hd.g2 { background: var(--coral); } .card .hd.g3 { background: #7b5cff; } .card .hd.g4 { background: #111318; }
.card .hd small { font: 600 12px var(--sans); opacity: .9; letter-spacing: 0; background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 99px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .k { color: var(--muted); } .row .v { font-weight: 700; text-align: right; }
.pad { padding: 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.pill.w { background: var(--win); color: #2b6a12; } .pill.p { background: var(--plate); color: #4b34c7; } .pill.o { background: var(--out); color: #c0352a; } .pill.d { background: #eceef3; color: #555c6b; } .pill.g { background: #eef2ff; color: var(--blue-2); }
.legend { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
/* team list */
.team { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); }
.team:first-child { border-top: 0; }
.team .n { width: 28px; height: 28px; border-radius: 50%; background: #111318; color: var(--ball); display: grid; place-items: center; font: 400 16px var(--display); flex: none; }
.team b { display: block; font-weight: 700; } .team span { color: var(--muted); font-size: 13px; }
.team.me, .row.me, tr.me td { background: #f6ffd0 !important; }
/* forms */
label { display: block; font-weight: 700; font-size: 13px; margin: 14px 0 6px; }
input, select, textarea { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 14px; font: 16px var(--sans); background: #f7f8fb; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(35,70,230,.12); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg input { display: none; }
.seg label { margin: 0; text-align: center; padding: 11px 4px; border: 1.5px solid var(--line); border-radius: 14px; background: #f7f8fb; font-weight: 700; cursor: pointer; }
.seg label small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.seg input:checked + label { border-color: #111318; background: #111318; color: var(--ball); }
.seg input:checked + label small { color: #c9ced9; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 16px 0 4px; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.btn { display: inline-block; border: 0; background: #111318; color: #fff; padding: 13px 20px; border-radius: 99px; font: 700 15px var(--sans); cursor: pointer; text-decoration: none; }
.btn.block { width: 100%; margin-top: 18px; }
.btn.gold { background: var(--ball); color: var(--ink); } .btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); } .btn.danger { background: var(--coral); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.big { padding: 17px; font-size: 17px; }
.btn:disabled { opacity: .45; }
.msg { padding: 12px 14px; border-radius: 14px; margin-top: 12px; font-size: 14px; }
.msg.err { background: var(--out); color: #b3261e; } .msg.ok { background: var(--win); color: #2b6a12; }
.success { text-align: center; padding: 26px 16px; }
.success .big { font: 400 40px/1 var(--display); color: var(--blue); letter-spacing: .02em; }
/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 9px 6px; background: #f5f6fa; }
td { padding: 11px 6px; border-top: 1px solid var(--line); }
td.c, th.c { text-align: center; }
th:first-child, td:first-child { padding-left: 16px; } th:last-child, td:last-child { padding-right: 16px; }
tr.q1 td { background: #f3fde9; } tr.q2 td { background: #f5f3ff; } tr.q3 td { background: #fff5f4; }
/* matches: dark score cards */
#scores .card { background: #111318; color: #fff; box-shadow: 0 10px 26px rgba(12,22,51,.18); }
.match { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.match:first-child { border-top: 0; }
.match .top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #9aa1b2; margin-bottom: 8px; }
.match .line { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.match .line .nm { flex: 1; font-weight: 600; } .match .line.win .nm { color: var(--ball); }
.match .sc { width: 52px; text-align: center; font: 400 30px/1 var(--display); }
.match .line.win .sc { color: var(--ball); }
.match input.sc { padding: 6px; font: 400 24px var(--display); background: #22252e; border-color: #2f333e; color: #fff; }
.match.me { background: rgba(217,242,79,.08); }
#scores .pill.d { background: #2a2e38; color: #c9ced9; } #scores .pill.w { background: var(--ball); color: var(--ink); } #scores .pill.g { background: #2a2e38; color: var(--sun); }
#scores .btn.sm { background: var(--ball); color: var(--ink); }
#a-groups .match { border-top: 1px solid var(--line); }
#a-groups .match .top { color: var(--muted); }
/* bracket */
.bracket { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ko { background: #111318; color: #fff; border-radius: 18px; overflow: hidden; }
.ko .t { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #9aa1b2; padding: 9px 12px; display: flex; justify-content: space-between; }
.ko .l { display: flex; justify-content: space-between; gap: 6px; padding: 9px 12px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.ko .l.win { font-weight: 800; color: var(--ball); }
.ko .l .s { font: 400 20px/1 var(--display); }
.ko .l .muted { color: #8b92a3; }
.ko .l input { width: 46px; padding: 4px; font-size: 15px; text-align: center; background: #22252e; border-color: #2f333e; color: #fff; }
.ko .btn.sm { background: var(--ball); color: var(--ink); }
.ko.final { grid-column: 1 / -1; max-width: 320px; justify-self: center; width: 100%; background: linear-gradient(160deg, #2a52ff, #1532b8); }
.ko.final .t { color: var(--ball); }
.champ { text-align: center; margin: 14px 0 4px; font: 400 32px/1 var(--display); color: var(--blue); letter-spacing: .02em; }
.banner { background: #fff7dc; color: #6b4e00; padding: 12px 14px; border-radius: 16px; margin-top: 14px; font-size: 14px; font-weight: 500; }
.install { display: none; align-items: center; gap: 12px; background: #111318; color: #fff; border-radius: 22px; padding: 12px 14px; margin-top: 16px; }
.install .muted { color: #9aa1b2; }
.install img { width: 44px; height: 44px; border-radius: 12px; }
.install .btn { background: var(--ball); color: var(--ink); }
.install.show { display: flex; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.search { margin: 4px 0 12px; border-radius: 99px; background: #fff; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 28px 0 10px; }
.foot a { color: var(--muted); }
/* admin */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; margin: 0 6px 6px 0; cursor: pointer; font-size: 14px; }
.chip.sel { background: #111318; color: #fff; border-color: #111318; }
.lvl { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 99px; }
.lvl.beginner { background: #e6f0ff; color: #1d4fc4; } .lvl.intermediate { background: #fff3cf; color: #8a6200; } .lvl.advanced { background: var(--out); color: #c0352a; }
.chip.sel .lvl { background: var(--ball); color: var(--ink); }
.x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; padding: 0 4px; }
/* ===== big home hero ===== */
.hero.big { padding: calc(24px + env(safe-area-inset-top)) 0 92px; border-radius: 0; background: linear-gradient(165deg, #3159ff 0%, #2346e6 38%, #1532b8 70%, #0c1633 100%); }
.hero.big::after { display: none; }
.hero.big .eyebrow { display: flex; justify-content: space-between; align-items: center; }
.hero .badge { background: rgba(255,255,255,.14); color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; letter-spacing: .08em; }
.count-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; position: relative; z-index: 1; }
.count-row .num { font: 400 116px/.8 var(--display); color: var(--ball); text-shadow: 0 6px 0 rgba(0,0,0,.18); }
.count-row .lbl { font: 400 34px/.92 var(--display); letter-spacing: .02em; padding-bottom: 2px; }
.hero .names { font: 400 52px/.92 var(--display); letter-spacing: .01em; margin: 20px 0 10px; text-transform: uppercase; position: relative; z-index: 1; }
.hero .amp { color: var(--coral); }
.hero .sub { display: inline-block; background: var(--ball); color: var(--ink); font: 800 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; position: relative; z-index: 1; }
.court { position: absolute; right: -30px; top: 48px; width: 200px; transform: rotate(-14deg); pointer-events: none; z-index: 0; filter: drop-shadow(0 18px 24px rgba(0,0,0,.3)); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; position: relative; z-index: 1; }
.chips span { background: rgba(12,22,51,.38); border: 1px solid rgba(255,255,255,.18); border-radius: 99px; padding: 8px 13px; font-size: 13px; font-weight: 600; backdrop-filter: blur(6px); }
.treat { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; background: var(--coral); color: #fff; font-weight: 800; padding: 10px 16px; border-radius: 99px; font-size: 14px; box-shadow: 0 8px 20px rgba(255,90,78,.35); position: relative; z-index: 1; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.stat { background: #111318; border-radius: 22px; padding: 14px 16px; }
.stat .k { font-size: 12px; color: #9aa1b2; font-weight: 600; }
.stat .v { font: 400 44px/1 var(--display); color: #fff; margin-top: 6px; }
.stat .v small { font: 600 13px var(--sans); color: var(--ball); margin-left: 4px; }
.stat.alt { background: rgba(255,255,255,.12); }
.cta { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; margin: 14px 0 0; background: var(--ball); color: var(--ink); font: 800 18px var(--sans); padding: 8px 8px 8px 24px; border-radius: 99px; text-decoration: none; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.cta .go { width: 48px; height: 48px; border-radius: 50%; background: #111318; color: var(--ball); display: grid; place-items: center; font-size: 22px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }
.joined { display: inline-block; margin-top: 16px; padding: 12px 18px; border-radius: 99px; background: rgba(255,255,255,.14); color: var(--ball); font-weight: 800; position: relative; z-index: 1; }
/* sign-up sheet overlapping the hero */
#v-home.on { margin-top: -66px; position: relative; z-index: 2; }
.signup-head { background: #fff; border-radius: 30px 30px 0 0; padding: 22px 18px 4px; }
.signup-head .kicker { color: var(--coral); letter-spacing: .14em; text-transform: uppercase; font-size: 11px; font-weight: 800; }
.signup-head h2 { font-size: 44px; margin: 4px 0 6px; }
.signup-head p { margin: 0 0 4px; color: var(--muted); }
.card.signup { border-radius: 0 0 30px 30px; padding: 4px 18px 22px; box-shadow: 0 18px 40px rgba(12,22,51,.12); }
#myTeam > h3:first-child { background: #fff; margin: 0; padding: 18px 18px 8px; border-radius: 30px 30px 0 0; }
#myTeam > h3:first-child + .card { border-radius: 0 0 22px 22px; }
#myTeam > .card:first-child { border-radius: 30px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } .hero .names { font-size: 46px; } .count-row .num { font-size: 100px; } .court { width: 165px; right: -38px; } }
@media (prefers-reduced-motion: reduce) { .cta .go, .dot { animation: none; } }