/* NU Esports — broadcast stage: hard edges, hairlines, framed viewports. One sheet for the public site and the back office. */

:root {
  /* NU Esports club palette, shared with the club shop: black ground, NU pink. */
  --bg: #050506;
  --bg-2: #0a0a0c;
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .075);
  --panel-3: rgba(255, 255, 255, .11);
  --solid: #111114;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .17);
  --text: #f4f4f6;
  --muted: #b1b1bb;
  --dim: #8b8b96;
  --brand: #d81b60;
  --brand-hi: #e91e63;
  --brand-hot: #ff007f;
  --brand-text: #f472b6;
  --brand-soft: rgba(233, 30, 99, .16);
  --live: #ff4d4d;
  --open: #f5b700;
  --win: #34d399;
  --danger: #f87171;
  --radius: 0;
  --radius-sm: 0;
  --shadow: 0 14px 34px -14px rgba(0, 0, 0, .9), 0 2px 8px rgba(0, 0, 0, .5);
  --glow: none;
  --wrap: 1200px;
  --font: 'Noto Sans Thai', system-ui, sans-serif;
  --display: 'Chakra Petch', 'Noto Sans Thai', system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; color: var(--text);
  background: var(--bg);
  font: 400 16px/1.65 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; text-wrap: balance; font-family: var(--display); }
p { margin: 0; }
::selection { background: rgba(233, 30, 99, .5); color: #fff; }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; border-radius: 0; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 0; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 24px; height: 24px; }
.ic.fill { fill: currentColor; stroke: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(0, 0, 0, .72); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.logo-mark { width: 44px; height: 44px; border-radius: 0; background: #fff; padding: 2px; box-shadow: var(--glow); flex: none; transition: transform .3s var(--ease); }
.logo:hover .logo-mark { transform: scale(1.05) rotate(-2deg); }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.logo span small { display: block; font-size: 12px; font-weight: 500; color: var(--dim); letter-spacing: 0; margin-top: -2px; }
.logo b { color: var(--brand-text); font-weight: 700; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 12px; border-radius: 0; color: var(--muted); font-weight: 500; font-size: 15px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel-2); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); width: 42px; height: 42px; border-radius: 0; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- buttons, pills, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 0; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, transform .15s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--brand-hi); }
.btn-ghost { background: var(--panel-2); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--panel-3); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--text); background: var(--panel-2); }
.btn-danger { background: transparent; border-color: rgba(248, 113, 113, .4); color: var(--danger); }
.btn-danger:hover { background: rgba(248, 113, 113, .1); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 0; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-block { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 0; font-size: 12.5px; font-weight: 600; background: var(--panel-3); color: var(--muted); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.live { background: #fff; color: #050506; }
.pill.live::before { background: #e11d2e; }
.pill.live::before { animation: blink 1.4s infinite; }
.pill.open { background: var(--brand); color: #fff; }
.pill.done { background: #050506; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.muted::before { opacity: .7; }
.pill.plain::before { display: none; }
@keyframes blink { 50% { opacity: .25; } }

.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.chip i { width: 9px; height: 9px; border-radius: 0; background: var(--game, var(--brand)); flex: none; }

/* ---------- sections ---------- */
main { min-height: 60vh; }
.section { padding-top: 44px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.section-head h2 .ic { color: var(--brand-text); }
.more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--brand-text); }
.more:hover { color: #f9a8d4; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- hero carousel ---------- */
.hero { padding-top: 24px; }
.slides { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 0; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; position: relative; min-height: 400px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.slide-art { position: absolute; inset: 0; z-index: -1; }
.slide-art img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .7) 45%, rgba(0, 0, 0, .1) 100%), linear-gradient(0deg, rgba(0, 0, 0, .8), transparent 50%); }
.slide-body { padding: 40px 44px; max-width: 640px; display: grid; gap: 14px; }
.slide-body h1 { font-size: clamp(28px, 4.2vw, 46px); letter-spacing: -.02em; line-height: 1.2; }
.slide-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: #d3d7e2; font-size: 15px; }
.slide-meta span { display: inline-flex; align-items: center; gap: 7px; }
.slide-meta .ic { color: var(--brand-text); }
.slide-tags { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.slide-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.dots button { width: 8px; height: 8px; border-radius: 0; border: 0; background: var(--line-2); padding: 0; cursor: pointer; transition: width .35s var(--ease), background .35s; }
.dots button.on { width: 26px; background: var(--brand); }

/* Fallback art when an organizer has not uploaded a banner: the game's own colour field. */
.art { position: absolute; inset: 0; background: color-mix(in srgb, var(--game) 16%, #050506); overflow: hidden; }
.art::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 48px); }
.art span { position: absolute; right: -2%; bottom: -14%; font: 700 clamp(120px, 22vw, 300px)/1 var(--display); letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--game) 75%, #fff 10%); opacity: .7; white-space: nowrap; }

/* ---------- game tiles ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.game-tile { position: relative; height: 112px; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 16px; isolation: isolate; border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.game-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--game) 60%, var(--line)); }
.game-tile .art span { font-size: 92px; bottom: -22%; right: -6%; }
.game-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.game-tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .1) 70%); }
.game-tile .art { z-index: -2; }
.game-tile b { font-size: 17px; }
.game-tile small { color: #c9cdd8; font-size: 13px; }

/* ---------- match rows (live / results) ---------- */
.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.match-list { display: grid; gap: 10px; }
.mrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s; }
.mrow:hover { border-color: var(--line-2); }
.mrow-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); margin-bottom: 2px; }
.side { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.side.r { flex-direction: row-reverse; text-align: right; }
.side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side.lost { color: var(--dim); font-weight: 500; }
.vs { font-weight: 700; font-size: 20px; min-width: 66px; text-align: center; letter-spacing: .02em; }
.vs small { display: block; font-size: 12px; font-weight: 600; color: var(--dim); }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: hsl(var(--h, 260) 45% 32%); border: 1px solid hsl(var(--h, 260) 50% 45% / .5); }
.avatar.sm { width: 26px; height: 26px; border-radius: 0; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; border-radius: 0; font-size: 17px; }

/* ---------- news list ---------- */
.news { display: grid; }
.news a { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.news a:first-child { border-top: 0; }
.news a:hover h3 { color: var(--brand-text); }
.news h3 { font-size: 16px; font-weight: 600; transition: color .2s; }
.news p { grid-column: 1 / -1; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news time { color: var(--dim); font-size: 13px; white-space: nowrap; }
.pin { color: var(--open); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- tournament cards ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.tcard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 0; overflow: hidden; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.tcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.tcard-art { position: relative; aspect-ratio: 16 / 7; overflow: hidden; }
.tcard-art img { width: 100%; height: 100%; object-fit: cover; }
.tcard-art .art span { font-size: 120px; bottom: -26%; }
.tcard-art .pill { position: absolute; left: 12px; top: 12px; backdrop-filter: blur(6px); background: rgba(0, 0, 0, .72); }
.tcard-body { padding: 16px 18px 18px; display: grid; gap: 12px; flex: 1; }
.tcard h3 { font-size: 18px; line-height: 1.35; }
.facts { display: grid; gap: 7px; margin: 0; font-size: 14px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.facts dd.hi { color: #ffd04d; }
.meter { height: 5px; border-radius: 0; background: var(--panel-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.tcard-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; font-size: 13px; color: var(--dim); margin-top: auto; }

/* ---------- article and video rails ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.rail > * { scroll-snap-align: start; }
.acard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 0; overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.acard:hover { border-color: var(--line-2); transform: translateY(-3px); }
.acard-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-2); }
.acard-art img { width: 100%; height: 100%; object-fit: cover; }
.acard-art .art span { font-size: 110px; }
.acard-body { padding: 14px 16px 16px; display: grid; gap: 8px; flex: 1; }
.acard h3 { font-size: 16px; line-height: 1.45; }
.acard p { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acard-foot { display: flex; justify-content: space-between; color: var(--dim); font-size: 13px; margin-top: auto; }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play span { width: 56px; height: 56px; border-radius: 50%; background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px); display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .2); transition: transform .3s var(--ease), background .3s; }
.acard:hover .play span { transform: scale(1.08); background: var(--brand); }
.platform { position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 600; background: rgba(0, 0, 0, .75); padding: 2px 9px; border-radius: 0; }

/* ---------- empty states ---------- */
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 20px; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty .ic { width: 30px; height: 30px; color: var(--dim); }
.empty b { color: var(--text); font-size: 16px; }

/* ---------- filters ---------- */
.page-head { padding: 36px 0 22px; display: grid; gap: 6px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.015em; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.field-icon { position: relative; flex: 1 1 260px; }
.field-icon .ic { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--dim); }
.field-icon input { padding-left: 40px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 0; padding: 3px; overflow-x: auto; max-width: 100%; }
.seg a { padding: 6px 14px; border-radius: 0; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg a.on { background: var(--panel-3); color: var(--text); }
.seg a:hover:not(.on) { color: var(--text); }

/* ---------- forms ---------- */
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line-2); border-radius: 0; transition: border-color .2s, box-shadow .2s; }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.select option { background: var(--solid); }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b1b1bb' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.input::placeholder, .textarea::placeholder { color: #7a8397; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--brand-hi); outline-offset: 2px; border-color: var(--brand-hi); }
.input.err, .select.err, .textarea.err { border-color: var(--danger); }
input[type=file].input { padding: 9px 12px; height: auto; }
input[type=date].input, input[type=datetime-local].input { color-scheme: dark; }
.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.label small { font-weight: 400; color: var(--dim); }
.hint { font-size: 13px; color: var(--dim); margin-top: 6px; }
.error { font-size: 13.5px; color: var(--danger); margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--brand); flex: none; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 0; font-size: 15px; border: 1px solid; }
.alert.ok { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .35); color: #a7f3d0; }
.alert.bad { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .35); color: #fecaca; }
.alert.info { background: var(--brand-soft); border-color: rgba(233, 30, 99, .4); color: #fbcfe8; }

/* ---------- tournament page ---------- */
.t-hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.t-hero .slide-art { z-index: -2; }
.t-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .82) 45%, rgba(0, 0, 0, .45) 100%); }
.t-hero .wrap { padding-top: 64px; padding-bottom: 0; }
.t-title { display: grid; gap: 12px; max-width: 820px; }
.t-title h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.02em; }
.t-tags { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.t-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.tabs { display: flex; gap: 2px; margin-top: 30px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 14px 16px; font-weight: 600; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); }
.tabs a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 0; background: var(--brand); }
.tabs .count { font-size: 12px; background: var(--panel-3); padding: 0 7px; border-radius: 0; color: var(--muted); }
.t-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding-top: 28px; align-items: start; }
.t-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.sheet { padding: 18px 20px; display: grid; gap: 14px; }
.sheet h2 { font-size: 16px; }
.sheet .facts { font-size: 14.5px; gap: 10px; }
.prize { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.prize .ic { width: 34px; height: 34px; color: #ffd04d; stroke-width: 1.5; }
.prize b { display: block; font-size: 20px; color: #ffd04d; line-height: 1.3; }
.prize small { color: var(--muted); font-size: 13px; }
.champion { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #0c0c0f; border-color: rgba(245, 183, 0, .45); }
.champion .ic { width: 30px; height: 30px; color: #ffd04d; }
.champion small { color: #ffd04d; font-weight: 600; font-size: 13px; }
.champion b { display: block; font-size: 20px; }
.block { padding: 22px 24px; }
.block + .block { margin-top: 16px; }
.block h2 { font-size: 18px; margin-bottom: 12px; }
.prose { color: #d3d7e2; font-size: 16px; line-height: 1.8; max-width: 72ch; }
.prose > * + * { margin-top: .9em; }
.prose h2, .prose h3 { color: var(--text); margin-top: 1.5em; font-size: 19px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose img { border-radius: 0; }

/* ---------- bracket ---------- */
/* Seed, name, score rows; a plain match number on the line that feeds each match. */
.bk-scroll { --bk-card: 212px; --bk-gap: 54px; --bk-lead: 28px; --bk-line: #c9c9d1; overflow-x: auto; padding-bottom: 12px; }
.bk-heads, .bk { display: flex; gap: var(--bk-gap); min-width: max-content; padding-left: var(--bk-lead); }
.bk-heads { margin-bottom: 8px; padding-top: 0; background: #141418; border: 1px solid var(--line); }
.bk-head { flex: 1 1 var(--bk-card); max-width: 300px; min-width: var(--bk-card); padding: 8px 0; text-align: center; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.bk-round { flex: 1 1 var(--bk-card); max-width: 300px; min-width: var(--bk-card); display: flex; flex-direction: column; }
.bk-slot { flex: 1; display: flex; align-items: center; position: relative; padding: 12px 0; }
.bk-round:not(:last-child) .bk-slot:not(.bye)::after { content: ''; position: absolute; left: 100%; width: calc(var(--bk-gap) / 2 - 8px); top: 50%; border-top: 2px solid var(--bk-line); margin-top: -1px; }
.bk-round:not(:last-child) .bk-slot:not(.bye)::before { content: ''; position: absolute; left: calc(100% + var(--bk-gap) / 2 - 8px); border-right: 2px solid var(--bk-line); }
.bk-round:not(:last-child) .bk-slot:not(.bye):nth-child(odd)::before { top: calc(50% - 1px); bottom: 0; }
.bk-round:not(:last-child) .bk-slot:not(.bye):nth-child(even)::before { top: 0; bottom: calc(50% - 1px); }
.bk-round + .bk-round .bk-match:not(.no-feed)::before { content: ''; position: absolute; right: calc(100% + 24px); width: calc(var(--bk-gap) / 2 - 16px); top: 50%; border-top: 2px solid var(--bk-line); margin-top: -1px; }
.bk-match { position: relative; width: 100%; display: grid; gap: 1px; background: #000; outline: 1px solid var(--line); }
.bk-match.live { outline: 2px solid var(--live); }
.bk-no { position: absolute; right: calc(100% + 2px); top: 50%; translate: 0 -50%; z-index: 1; min-width: 20px; padding: 0 3px; text-align: center; font: 600 12.5px/1.4 var(--display); color: var(--muted); background: var(--bg); }
.bk-note { position: absolute; left: 0; top: calc(100% + 3px); font-size: 11.5px; line-height: 1.3; color: var(--dim); white-space: nowrap; }
.bk-note.live-tag { color: #ff8a8a; font-weight: 700; font-family: var(--display); letter-spacing: .04em; }
.bk-team { display: grid; grid-template-columns: 26px minmax(0, 1fr) 30px; height: 30px; background: #18181c; font-size: 14px; font-weight: 600; transition: background .2s, color .2s; }
.bk-team .seed { display: grid; place-items: center; background: #0f0f12; color: var(--muted); font: 600 12px/1 var(--display); }
.bk-team .name { align-self: center; padding: 0 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-team .sc { display: grid; place-items: center; background: #26262c; color: var(--muted); font-weight: 700; font-size: 14px; }
.bk-team.win .name { color: #fff; }
.bk-team.win .sc { background: var(--brand); color: #fff; }
.bk-team.lose .name { color: var(--muted); font-weight: 500; }
.bk-team.tbd .name { color: var(--dim); font-weight: 400; font-size: 13px; }
.bk-team.hl { background: var(--brand-soft); }
.bk-team.hl .name { color: #fff; }
.bk-team:focus-visible { outline-offset: -2px; }
.bk-champ { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: #ffd04d; font-weight: 700; }

/* ---------- standings table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--panel); }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 11px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.table .r { text-align: right; }
.table .c { text-align: center; }
.table .total { font-weight: 700; font-size: 16px; color: var(--text); }
.rank { width: 30px; height: 30px; border-radius: 0; display: grid; place-items: center; font-weight: 700; background: var(--panel-3); color: var(--muted); font-size: 14px; }
.rank.r1 { background: rgba(245, 183, 0, .2); color: #ffd04d; }
.rank.r2 { background: rgba(203, 213, 225, .16); color: #e2e8f0; }
.rank.r3 { background: rgba(217, 119, 6, .2); color: #f5a65b; }
.team-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 160px; }

/* ---------- teams page ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.team-card { padding: 16px 18px; display: grid; gap: 12px; }
.team-card header { display: flex; align-items: center; gap: 12px; }
.team-card h3 { font-size: 16.5px; }
.team-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.team-card li { display: flex; justify-content: space-between; gap: 10px; }
.team-card li span:last-child { color: var(--muted); }
.team-card li.sub { color: var(--dim); }

/* ---------- registration ---------- */
.reg { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; padding-bottom: 40px; }
.reg-form { padding: 26px 28px; display: grid; gap: 26px; }
.reg-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; }
.reg-form legend { font-size: 17px; font-weight: 700; margin-bottom: 4px; display: flex; gap: 10px; align-items: center; padding: 0; }
.step-no { width: 26px; height: 26px; border-radius: 0; background: var(--brand-soft); color: var(--brand-text); display: inline-grid; place-items: center; font-size: 14px; }
.players { display: grid; gap: 10px; }
.player-row { display: grid; grid-template-columns: 72px 56px 1fr 1fr; gap: 10px; align-items: center; }
.player-row.with-id { grid-template-columns: 72px 56px 1fr 1fr 130px; }
.player-row .tag { font-size: 13px; color: var(--muted); font-weight: 600; }
.player-row.sub .tag { color: var(--dim); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done-card { max-width: 640px; margin: 40px auto; padding: 34px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.done-card .tick { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(52, 211, 153, .14); color: var(--win); }
.done-card .tick .ic { width: 32px; height: 32px; stroke-width: 2.2; }
.done-card h1 { font-size: 26px; }

/* ---------- post page ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 36px 20px 20px; }
.article-cover { border-radius: 0; overflow: hidden; margin: 22px 0 26px; aspect-ratio: 16 / 8; position: relative; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article h1 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: -.015em; }
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--dim); font-size: 14px; margin-top: 10px; }
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--dim); font-size: 14px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }

/* ---------- pagination ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center; border-radius: 0; background: var(--panel); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.pager .on { background: var(--brand); border-color: var(--brand); }
.pager .off { opacity: .4; }

/* ---------- footer ---------- */
.footer { margin-top: 72px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .6); }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 32px; color: var(--dim); font-size: 14px; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer nav a:hover { color: var(--text); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s var(--ease) both; }
  .rise:nth-child(2) { animation-delay: .06s; }
  .rise:nth-child(3) { animation-delay: .12s; }
  .rise:nth-child(4) { animation-delay: .18s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
  .slide.on .slide-body > * { animation: rise .8s var(--ease) both; }
  .slide.on .slide-body > :nth-child(2) { animation-delay: .05s; }
  .slide.on .slide-body > :nth-child(3) { animation-delay: .1s; }
  .slide.on .slide-body > :nth-child(4) { animation-delay: .15s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .t-layout, .reg { grid-template-columns: 1fr; }
  .t-side { position: static; }
  .t-layout.side-first .t-side { order: -1; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; }
  .topbar .cta { display: none; }
  .nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 2px; padding: 12px 16px 18px; background: var(--solid); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s; }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .nav .btn { margin-top: 8px; }
}
@media (min-width: 1081px) { .nav .btn { display: none; } .topbar .cta + .cta { margin-left: -16px; } }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding-top: 34px; }
  .slide { min-height: 440px; }
  .slide::after { background: linear-gradient(0deg, rgba(0, 0, 0, .96) 30%, rgba(0, 0, 0, .4) 75%, rgba(0, 0, 0, .15)); }
  .slide-body { padding: 24px 20px; }
  .slides { border-radius: 0; }
  .tgrid { grid-template-columns: 1fr; }
  .games { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-tile { height: 96px; }
  .form-grid { grid-template-columns: 1fr; }
  .player-row, .player-row.with-id { grid-template-columns: 56px 1fr 1fr; }
  .player-row.with-id > :last-child { grid-column: 2 / -1; }
  .player-row .tag { grid-column: 1 / -1; margin-bottom: -4px; }
  .reg-form { padding: 20px 18px; }
  .block { padding: 18px; }
  .mrow { padding: 12px; gap: 8px; }
  .vs { min-width: 52px; font-size: 18px; }
  .side { gap: 8px; font-size: 14.5px; }
  .avatar { width: 30px; height: 30px; }
  .bk-scroll { --bk-card: 190px; --bk-gap: 46px; --bk-lead: 24px; }
  .t-hero .wrap { padding-top: 40px; }
  .rail { grid-auto-columns: 82%; }
  .table .hide-sm { display: none; }
}

/* ==================== back office ==================== */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.a-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: rgba(0, 0, 0, .6); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; }
.a-side .logo { padding: 0 8px; font-size: 17px; }
.a-nav { display: grid; gap: 2px; }
.a-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 0; color: var(--muted); font-weight: 500; font-size: 15px; }
.a-nav a:hover { background: var(--panel); color: var(--text); }
.a-nav a.on { background: var(--panel-2); color: var(--text); }
.a-nav a.on .ic { color: var(--brand-text); }
.a-nav .badge { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--open); color: #1a1300; border-radius: 0; padding: 0 8px; }
.a-side .foot { margin-top: auto; display: grid; gap: 4px; }
.a-main { padding: 26px 32px 60px; min-width: 0; }
.a-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.a-top h1 { font-size: 24px; }
.a-top .crumbs { margin-bottom: 4px; }
.a-mobile { display: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { padding: 16px 18px; display: grid; gap: 2px; }
.stat small { color: var(--muted); font-size: 13.5px; }
.stat b { font-size: 26px; }
.stat a { font-size: 13px; color: var(--brand-text); font-weight: 600; margin-top: 4px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; }
.card-body { padding: 18px; }
.a-form { display: grid; gap: 20px; max-width: 920px; }
.a-form .card-body { display: grid; gap: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 0; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--panel-3); }
.icon-btn.danger:hover { color: var(--danger); }
.score-form { display: flex; align-items: center; gap: 8px; }
.score-form .input { width: 64px; height: 36px; text-align: center; padding: 0 6px; font-weight: 700; }
.score-actions { display: contents; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(0deg, var(--bg) 70%, transparent); display: flex; gap: 10px; }
details.more-opts { border: 1px solid var(--line); border-radius: 0; }
details.more-opts summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--muted); list-style: none; display: flex; gap: 8px; align-items: center; }
details.more-opts summary::-webkit-details-marker { display: none; }
details.more-opts[open] summary { border-bottom: 1px solid var(--line); color: var(--text); }
details.more-opts[open] summary .ic { rotate: 180deg; }
details.more-opts > div { padding: 16px; display: grid; gap: 16px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 400px; padding: 30px; display: grid; gap: 18px; }
.br-table .input { height: 36px; text-align: center; }
.thumb { width: 64px; height: 36px; border-radius: 0; object-fit: cover; background: var(--panel-3); }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .a-side { display: none; position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; box-shadow: var(--shadow); background: var(--solid); }
  .a-side.open { display: flex; }
  .a-mobile { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--solid); position: sticky; top: 0; z-index: 30; }
  .a-main { padding: 20px 16px 60px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== club ==================== */
.foot-grid { display: grid !important; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; padding-top: 40px !important; padding-bottom: 28px !important; }
.foot-grid nav { display: grid; gap: 9px; align-content: start; font-size: 14.5px; }
.foot-grid nav b { color: var(--text); font-size: 14px; margin-bottom: 4px; }
.foot-grid nav a:hover { color: var(--text); }
.foot-brand { display: grid; gap: 14px; align-content: start; }
.foot-brand p { font-size: 14px; line-height: 1.7; }
.foot-legal { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 26px; font-size: 13px; color: var(--dim); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { font-size: 13px; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 0; border: 1px solid var(--line-2); }
.socials a:hover { color: #fff; border-color: var(--brand-hi); background: var(--brand-soft); }

.club-hero { position: relative; padding: 56px 0 8px; }
.club-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.club-id { display: grid; gap: 20px; justify-items: start; }
.club-crest { width: 128px; height: 128px; border-radius: 0; background: #fff; padding: 6px; box-shadow: 0 24px 60px -20px rgba(233, 30, 99, .75), 0 0 0 1px rgba(255, 255, 255, .2); rotate: -3deg; }
.club-crest img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.club-id h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; }
.club-id h1 em { font-style: normal; color: var(--brand-hi); }
.club-id p { font-size: 18px; color: #d5d5dc; max-width: 46ch; line-height: 1.7; }
.club-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.club-place { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; }
.club-place .ic { color: var(--brand-text); }
.feature-card { position: relative; border-radius: 0; overflow: hidden; border: 1px solid var(--line-2); min-height: 380px; display: flex; align-items: flex-end; isolation: isolate; box-shadow: var(--shadow); }
.feature-card .slide-art { position: absolute; inset: 0; z-index: -2; }
.feature-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .95) 25%, rgba(0, 0, 0, .35) 70%, rgba(0, 0, 0, .1)); }
.feature-card .body { padding: 24px; display: grid; gap: 12px; width: 100%; }
.feature-card h2 { font-size: clamp(22px, 2.4vw, 28px); }
.feature-card .slide-meta { font-size: 14px; }

.band { margin-top: 56px; border-radius: 0; padding: 34px 36px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; background: radial-gradient(120% 140% at 0% 0%, rgba(233, 30, 99, .35), transparent 60%), radial-gradient(90% 120% at 100% 100%, rgba(255, 0, 127, .22), transparent 60%), rgba(255, 255, 255, .04); border: 1px solid rgba(233, 30, 99, .35); }
.band h2 { font-size: clamp(22px, 3vw, 30px); }
.band p { color: #e2d3da; margin-top: 6px; }
.band .actions { justify-content: flex-end; }

.squad { margin-bottom: 34px; }
.squad-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.squad-head h2 { font-size: 20px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.person { background: var(--panel); border: 1px solid var(--line); border-radius: 0; overflow: hidden; transition: transform .3s var(--ease), border-color .3s; }
.person:hover { transform: translateY(-3px); border-color: rgba(233, 30, 99, .45); }
.person-photo { aspect-ratio: 4 / 5; background: hsl(var(--h) 28% 13%); display: grid; place-items: center; position: relative; overflow: hidden; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo span { font: 700 64px/1 var(--display); color: transparent; -webkit-text-stroke: 1.5px hsl(var(--h) 55% 62%); letter-spacing: -.02em; }
.person-body { padding: 12px 14px 14px; display: grid; gap: 2px; }
.person-body b { font-size: 16px; }
.person-body small { color: var(--brand-text); font-weight: 600; font-size: 13px; }
.person-body span { color: var(--dim); font-size: 13px; }

.medals { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.medal-count { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 0; background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.medal-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #1a1200; flex: none; }
.medal-dot.gold { background: #f2b705; }
.medal-dot.silver { background: #c9ced6; }
.medal-dot.bronze { background: #d0803a; }
.medal-dot.other { background: var(--panel-3); color: var(--brand-text); }
.awards { display: grid; gap: 10px; }
.award { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 0; }
.award h3 { font-size: 16px; }
.award p { color: var(--muted); font-size: 14px; }
.award time { color: var(--dim); font-size: 13.5px; white-space: nowrap; }
.award .medal-dot { width: 40px; height: 40px; font-size: 15px; }
.year-head { font-size: 15px; color: var(--muted); font-weight: 700; margin: 26px 0 10px; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.room { padding: 22px; display: grid; gap: 14px; }
.room h2 { font-size: 18px; display: flex; gap: 10px; align-items: center; }
.room h2 .ic { color: var(--brand-text); }
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 0; overflow: hidden; border: 1px solid var(--line); }
.counts div { background: var(--solid); padding: 14px 16px; display: grid; }
.counts b { font-size: 24px; }
.counts span { color: var(--muted); font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 0; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--muted); transition: all .2s; }
.chips span i { width: 8px; height: 8px; border-radius: 0; background: var(--game); }
.chips input:checked + span { color: #fff; border-color: var(--brand-hi); background: var(--brand-soft); }
.chips input:focus-visible + span { outline: 2px solid var(--brand-text); outline-offset: 2px; }

.a-nav .group { font-size: 12px; font-weight: 700; color: var(--dim); padding: 14px 12px 4px; }
.a-nav .ext { margin-left: auto; color: var(--dim); }

@media (max-width: 1000px) {
  .club-hero .wrap, .about-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .band { grid-template-columns: 1fr; }
  .band .actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .club-hero { padding-top: 32px; }
  .club-crest { width: 96px; height: 96px; border-radius: 0; }
  .club-id p { font-size: 16px; }
  .feature-card { min-height: 320px; }
  .people { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .award { grid-template-columns: auto 1fr; }
  .award time { grid-column: 2; }
  .band { padding: 24px 20px; }
  .counts b { font-size: 20px; }
}

/* ==================== shop ==================== */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg); }
.marquee-track { display: flex; width: max-content; gap: 44px; padding: 9px 0; white-space: nowrap; font-size: 14px; font-weight: 500; color: #fbcfe8; animation: marquee 40s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 10px; }
.marquee-track span::before { content: ""; width: 6px; height: 6px; border-radius: 0; background: var(--brand-text); rotate: 45deg; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.shop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 20px; }
.shop-intro { display: grid; gap: 18px; }
.shop-intro h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
.shop-intro h1 em { font-style: normal; color: var(--brand-hi); }
.shop-intro > p { color: #cfcfd6; font-size: 17px; max-width: 46ch; }
.shop-photo { border-radius: 0; overflow: hidden; border: 1px solid var(--line-2); }
.shop-photo img { width: 100%; }
.promo { padding: 16px 18px; border-radius: 0; border: 1px solid rgba(245, 183, 0, .35); background: rgba(245, 183, 0, .06); display: grid; gap: 6px; }
.promo b { color: #ffd04d; display: flex; align-items: center; gap: 8px; }
.promo p { font-size: 14.5px; color: #e4e4ea; }
.promo p strong { color: var(--brand-text); }
.promo small { color: var(--dim); font-size: 13px; }
.price-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-pair > div { padding: 16px 18px; display: grid; gap: 2px; }
.price-pair small { color: var(--muted); font-size: 13.5px; }
.price-pair b { font-size: 28px; color: var(--brand-text); }
.price-pair span { color: var(--dim); font-size: 13px; }
.order-card { padding: 26px; position: sticky; top: 90px; display: grid; gap: 20px; }
.order-card h2 { font-size: 20px; }
.order-card.closed form { opacity: .55; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size-btn { min-width: 52px; height: 44px; padding: 0 10px; border-radius: 0; border: 1px solid var(--line-2); background: var(--panel); font-weight: 700; font-size: 14px; cursor: pointer; transition: all .2s; }
.size-btn:hover { background: var(--panel-3); }
.size-btn[aria-pressed="true"] { border-color: var(--brand-hi); background: var(--brand-soft); color: #fbcfe8; }
.qty-list { display: grid; gap: 8px; margin-top: 12px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 14px; border-radius: 0; background: var(--panel); border: 1px solid var(--line); }
.qty-row b { color: var(--brand-text); font-size: 15px; min-width: 44px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 36px; height: 36px; border-radius: 0; border: 0; background: var(--panel-3); font-size: 18px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: rgba(255, 255, 255, .18); }
.stepper input { width: 56px; height: 36px; text-align: center; border-radius: 0; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .45); font-weight: 700; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { cursor: pointer; position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 14px 10px; min-height: 108px; align-content: center; border-radius: 0; border: 1px solid var(--line-2); background: var(--panel); transition: all .2s; }
.choice span b { font-size: 16px; }
.choice span em { font-style: normal; font-weight: 700; color: var(--brand-text); }
.choice span em.free { color: var(--win); }
.choice span small { font-size: 12.5px; color: var(--dim); }
.choice input:checked + span { border-color: var(--brand-hi); background: var(--brand-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.totals { padding: 16px; border-radius: 0; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); display: grid; gap: 8px; font-size: 14.5px; }
.totals div { display: flex; justify-content: space-between; gap: 10px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals .strike { text-decoration: line-through; color: var(--dim); }
.totals .save { color: var(--win); }
.totals .note { color: #ffd04d; font-size: 13px; }
.totals .grand { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; align-items: baseline; }
.totals .grand dd { font-size: 26px; font-weight: 800; color: var(--brand-text); }
[hidden] { display: none !important; }

.notice { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 0; background: var(--brand-soft); border: 1px solid rgba(233, 30, 99, .35); font-size: 14.5px; }
.notice b { color: #fbcfe8; display: flex; gap: 8px; align-items: center; }
.notice p { color: #e9dbe1; }
.countdown { text-align: center; padding: 8px 16px; border-radius: 0; background: rgba(0, 0, 0, .4); border: 1px solid rgba(233, 30, 99, .4); min-width: 150px; }
.countdown small { display: block; font-size: 12px; color: var(--muted); }
.countdown b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.countdown.closed b { color: #ffd04d; font-size: 16px; }

.pay { max-width: 640px; margin: 0 auto; display: grid; gap: 18px; padding-bottom: 20px; }
.pay-head { text-align: center; display: grid; gap: 6px; padding-top: 30px; }
.pay-head h1 { font-size: 30px; }
.order-no { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--brand-text); letter-spacing: .03em; }
.screenshot-tip { text-align: center; font-size: 14px; color: #ffd04d; padding: 10px 14px; border-radius: 0; border: 1px dashed rgba(245, 183, 0, .45); }
.qr-box { display: grid; justify-items: center; gap: 12px; padding: 22px; text-align: center; }
.qr-frame { background: #fff; color: #1a1a1a; border-radius: 0; padding: 10px; display: grid; grid-template-columns: auto auto auto; grid-template-rows: auto auto auto; align-items: center; justify-items: center; box-shadow: var(--shadow); max-width: 100%; }
.qr-frame .wm { font-size: 9px; line-height: 1.2; color: #c2185b; font-weight: 600; grid-column: 2; }
.qr-frame .wm.side { grid-column: auto; grid-row: 2; writing-mode: vertical-rl; }
.qr-frame .wm.side.l { rotate: 180deg; }
.qr-frame img { width: 248px; height: 248px; grid-column: 2; grid-row: 2; }
.pp-id { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pp-id b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.drop { display: grid; justify-items: center; gap: 8px; padding: 26px 16px; border: 1.5px dashed var(--line-2); border-radius: 0; cursor: pointer; text-align: center; color: var(--muted); transition: border-color .2s, background .2s; }
.drop:hover { border-color: var(--brand-hi); background: var(--brand-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop img { max-height: 320px; border-radius: 0; }
.items-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.items-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.items-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.items-table tfoot td { border-bottom: 0; color: var(--muted); }
.items-table tfoot tr:last-child td { color: var(--text); font-weight: 700; font-size: 16px; border-top: 1px solid var(--line-2); }
.items-table .r { text-align: right; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; font-size: 14.5px; }
.sum-grid div small { display: block; color: var(--dim); font-size: 12.5px; }
.sum-grid .full { grid-column: 1 / -1; }
.sum-grid .total b { font-size: 24px; color: var(--brand-text); }
.track-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0; padding: 0; isolation: isolate; }
.track-steps li { list-style: none; display: grid; justify-items: center; gap: 8px; text-align: center; position: relative; font-size: 13px; color: var(--dim); }
.track-steps li::before { content: ""; position: absolute; top: 18px; left: 50%; right: -50%; height: 2px; background: var(--line-2); z-index: -1; }
.track-steps li:last-child::before { display: none; }
.track-steps li.done::before { background: var(--brand-hi); }
.track-steps .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--line-2); background: var(--solid); }
.track-steps li.done .dot, .track-steps li.now .dot { background: var(--brand); border-color: var(--brand-hi); color: #fff; }
.track-steps li.now { color: var(--text); font-weight: 600; }
.track-steps ol { margin: 0; padding: 0; display: contents; }
.contact-box { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 18px; }
.contact-box p { color: var(--muted); font-size: 14px; }

dialog.sheet-modal { border: 1px solid var(--line-2); border-radius: 0; padding: 0; background: var(--solid); color: var(--text); max-width: min(520px, calc(100vw - 32px)); width: 100%; box-shadow: var(--shadow); }
dialog.sheet-modal::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
dialog.sheet-modal[open] { animation: pop .25s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.sheet-modal .modal-body { padding: 18px; display: grid; gap: 14px; }
.sheet-modal .modal-body img { width: 100%; border-radius: 0; }
.sheet-modal .close-x { position: absolute; right: 10px; top: 10px; }

.pill.s-amber { background: rgba(245, 183, 0, .14); color: #ffd04d; }
.pill.s-orange { background: rgba(251, 146, 60, .15); color: #fdba74; }
.pill.s-blue { background: rgba(96, 165, 250, .15); color: #93c5fd; }
.pill.s-violet { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
.pill.s-emerald { background: rgba(52, 211, 153, .13); color: #6ee7b7; }
.pill.s-red { background: rgba(248, 113, 113, .14); color: #fca5a5; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 10px; }
.bars span { flex: 1; background: var(--brand); border-radius: 0; min-height: 2px; position: relative; }
.bars span:hover { filter: brightness(1.25); }
.bars-x { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; margin-top: 6px; }
.hbar { display: grid; grid-template-columns: 70px 1fr 48px; align-items: center; gap: 10px; font-size: 14px; }
.hbar i { display: block; height: 10px; border-radius: 0; background: var(--brand-hi); }
.hbar + .hbar { margin-top: 8px; }

@media (max-width: 1000px) {
  .shop { grid-template-columns: 1fr; }
  .order-card { position: static; }
}
@media (max-width: 640px) {
  .order-card { padding: 20px 16px; }
  .price-pair b { font-size: 24px; }
  .qr-frame img { width: 210px; height: 210px; }
  .sum-grid { grid-template-columns: 1fr; }
  .track-steps li { font-size: 11.5px; }
  .track-steps .dot { width: 32px; height: 32px; }
  .track-steps li::before { top: 15px; }
}
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; white-space: normal; padding: 9px 16px; gap: 6px 24px; } }

/* ==================== team accounts ==================== */
.auth-card { max-width: 460px; margin: 40px auto 0; padding: 28px; display: grid; gap: 18px; }
.auth-card h1 { font-size: 26px; }
.steps-line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.steps-line li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--dim); padding: 8px 10px; border-radius: 0; background: var(--panel); border: 1px solid var(--line); }
.steps-line li b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--panel-3); color: var(--muted); flex: none; }
.steps-line li.now { color: var(--text); border-color: rgba(233, 30, 99, .45); background: var(--brand-soft); }
.steps-line li.now b { background: var(--brand); color: #fff; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; }
.team-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 0; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.team-strip div { display: grid; }
.team-strip b { font-size: 17px; }
.team-strip span.muted { font-size: 13.5px; }
@media (max-width: 640px) {
  .auth-card { margin-top: 20px; padding: 22px 18px; }
  .steps-line { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; }
  .entry .actions { justify-content: flex-start !important; }
}

/* ==================== stage ==================== */
/* Squared display face for titles, numbers and controls; body stays Noto Sans Thai. */
.logo, .btn, .tabs a, .seg a, .more, .vs, .bk-head, .bk-team .sc, .rank, .stat b, .counts b, .price-pair b,
.totals .grand dd, .countdown b, .prize b, .champion b, .table .total, .pager a, .pager span, .a-nav a { font-family: var(--display); }
.vs, .bk-team .sc, .stat b, .counts b, .table .total { letter-spacing: .02em; }

.topbar { background: #050506; backdrop-filter: none; }
.logo-mark { box-shadow: none; width: 40px; height: 40px; }
.logo:hover .logo-mark { transform: none; }
.logo { font-weight: 700; letter-spacing: .02em; }
.nav a { font-family: var(--display); font-weight: 600; letter-spacing: .02em; position: relative; }
.nav a:hover, .nav a.on { background: none; }
.nav a.on { color: var(--brand-text); }
@media (min-width: 1081px) { .nav a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -14px; height: 2px; background: var(--brand-hi); } }

.btn { height: 44px; padding: 0 20px; font-weight: 600; letter-spacing: .02em; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16.5px; }
.btn-primary { box-shadow: none; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .34); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: #fff; }
.btn-primary .ic, .btn-ghost .ic { transition: transform .3s var(--ease); }
.btn:hover .ic { transform: translateX(2px); }

/* Status tags: squared, with a square marker. */
.pill { height: 24px; padding: 0 9px; letter-spacing: .01em; }
.pill::before { border-radius: 0; width: 6px; height: 6px; }
.chip i { border-radius: 0; }

.club-crest { box-shadow: none; rotate: 0deg; }
.panel, .card { background: #0c0c0f; }

/* Section rhythm: a hairline opens each section, the heading carries it. */
.section { padding-top: 76px; }
.section-head { align-items: flex-end; padding-top: 20px; border-top: 1px solid var(--line); margin-bottom: 26px; }
.section-head h2 { font-size: clamp(28px, 3.8vw, 48px); line-height: 1.15; letter-spacing: -.005em; }
.section-head h2 .ic { display: none; }
.split .section-head h2 { font-size: clamp(22px, 2.4vw, 28px); }
.more { font-weight: 600; letter-spacing: .02em; }
.page-head h1 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.15; }

/* Corner brackets: a framed viewport, locked on once when it enters. */
.corners { position: relative; }
.corners::before {
  content: ''; position: absolute; inset: var(--ci, 24px 0 24px); pointer-events: none; z-index: 1;
  --c: var(--brand-hi); --l: 30px; --w: 2px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
}

/* Home stage */
.stage { position: relative; isolation: isolate; overflow: hidden; }
.stage-art { position: absolute; inset: 0; z-index: -2; }
.stage-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.stage-art .art span { font-size: clamp(160px, 30vw, 420px); bottom: -10%; }
.stage::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 5, 6, .97) 0%, rgba(5, 5, 6, .82) 46%, rgba(5, 5, 6, .4) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 38%); }
.stage-frame { --ci: 28px 4px 22px; min-height: min(80vh, 700px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: end; gap: 48px; padding-top: 110px; padding-bottom: 64px; }
.stage-copy { display: grid; gap: 22px; justify-items: start; padding-left: 28px; }
.stage-copy h1 { font-size: clamp(40px, 6.6vw, 86px); line-height: 1.22; letter-spacing: -.01em; }
.stage-copy h1 em { display: block; font-style: normal; color: var(--brand-hi); }
.stage-copy p { font-size: 18px; color: #d8d8de; max-width: 44ch; line-height: 1.7; }
.stage-copy .club-place { margin-top: 4px; }
.stage-feature { display: grid; gap: 10px; padding: 18px 0 0; margin-right: 28px; border-top: 1px solid var(--line-2); transition: border-color .3s; }
.stage-feature:hover { border-top-color: var(--brand-hi); }
.stage-feature b { font-family: var(--display); font-size: clamp(20px, 2vw, 26px); line-height: 1.25; }
.stage-feature .slide-meta { font-size: 14.5px; }
.stage-feature .more { justify-self: start; }

/* Ticker of what the club is running */
.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.ticker-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ticker-track span { display: inline-flex; align-items: center; gap: 22px; padding: 14px 22px 14px 0; font: 600 14px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ticker-track span::after { content: ''; width: 6px; height: 6px; background: var(--brand-hi); flex: none; }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* Tournament title cards: the art carries the title. */
.tcard { background: #0c0c0f; }
.tcard:hover { transform: none; box-shadow: none; border-color: rgba(233, 30, 99, .65); }
.tcard-art { aspect-ratio: 16 / 9; }
.tcard-art img { transition: transform .9s var(--ease); }
.tcard:hover .tcard-art img, .tcard:hover .art span { transform: scale(1.04); }
.art span { transition: transform .9s var(--ease); transform-origin: right bottom; }
.tcard-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 5, 6, .96) 8%, rgba(5, 5, 6, .66) 42%, transparent 82%); }
.tcard-art .pill { left: 0; top: 0; z-index: 2; height: 28px; padding: 0 11px; backdrop-filter: none; }
.tcard-art .pill.open { background: var(--brand); color: #fff; }
.tcard-art .pill.live { background: #fff; color: #050506; }
.tcard-art .pill.done, .tcard-art .pill.muted { background: #050506; color: var(--muted); }
.tcard-cap { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2; display: grid; gap: 6px; }
.tcard-cap .chip { color: #d6d6dc; }
.tcard h3 { font-size: 24px; line-height: 1.2; }
.tcard-body { gap: 12px; }
.meter { height: 3px; }

/* Ruled rows instead of boxed lists */
.panel.news { background: none; border: 0; border-bottom: 1px solid var(--line); }
.news a { padding: 18px 2px; border-top: 1px solid var(--line); }
.news a:first-child { border-top: 1px solid var(--line); }
.news h3 { font-size: 18px; font-weight: 600; line-height: 1.35; }

/* Pink close */
.band { margin-top: 84px; padding: 48px 52px; background: var(--brand); border: 0; }
.band h2 { color: #fff; font-size: clamp(26px, 3.6vw, 42px); line-height: 1.18; }
.band p { color: #fff; margin-top: 10px; max-width: 60ch; }
.band .more { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.band .btn-primary { background: var(--bg); color: #fff; }
.band .btn-primary:hover { background: #000; }
.band .btn-ghost { border-color: rgba(255, 255, 255, .75); color: #fff; }
.band .btn-ghost:hover { background: rgba(0, 0, 0, .16); border-color: #fff; }

/* Tournament header and tabs */
.t-hero .wrap { padding-top: 72px; --ci: 24px 4px 0; }
.t-hero .crumbs, .t-hero .t-title { padding-left: 24px; }
.t-title h1 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.14; }
.tabs a { letter-spacing: .02em; }
.tabs a.on::after { left: 16px; right: 16px; height: 2px; background: var(--brand-hi); }
.tabs .count { border-radius: 0; }
.auth-card { --ci: -1px; }

@media (prefers-reduced-motion: no-preference) {
  .corners::before { animation: lock-on .9s var(--ease) .15s both; }
  @keyframes lock-on { from { inset: 0 -14px; opacity: 0; } }
  .stage-copy > * { animation: rise .8s var(--ease) both; }
  .stage-copy > :nth-child(2) { animation-delay: .08s; }
  .stage-copy > :nth-child(3) { animation-delay: .16s; }
  .stage-copy > :nth-child(4) { animation-delay: .22s; }
}
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; padding-left: 20px; } }

@media (max-width: 1000px) {
  .stage-frame { grid-template-columns: 1fr; min-height: 0; gap: 36px; }
  .stage-feature { margin-right: 20px; margin-left: 20px; }
  .stage-copy { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 640px) {
  .stage-frame { --ci: 18px 0 14px; padding-top: 72px; padding-bottom: 44px; }
  .corners::before { --l: 20px; }
  .stage-copy { padding-left: 14px; padding-right: 14px; gap: 18px; }
  .stage-copy p { font-size: 16.5px; }
  .stage-feature { margin: 0 14px; }
  .section { padding-top: 56px; }
  .band { padding: 32px 22px; margin-top: 64px; }
  .tcard h3 { font-size: 20px; }
}

/* Bracket tab: the bracket takes the full width, the facts sit under it. */
.t-layout.wide { grid-template-columns: minmax(0, 1fr); }
.t-layout.wide .t-side { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 420px)); align-items: start; }
.t-layout .section-head h2 { font-size: clamp(22px, 2.4vw, 28px); }
@media (max-width: 640px) { .t-layout { padding-top: 24px; } }

/* ==================== league ==================== */
.path { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 0; list-style: none; margin: 0 0 4px; padding: 0; border: 1px solid var(--line); background: #0c0c0f; }
.path li { padding: 14px 18px; display: grid; gap: 2px; border-top: 2px solid transparent; margin-top: -1px; }
.path li b { font: 700 17px/1.3 var(--display); }
.path li span { font-size: 13.5px; color: var(--muted); }
.path li.on { border-top-color: var(--brand-hi); }
.path li.done b { color: var(--muted); }
.path li.gate { align-content: center; justify-items: center; padding: 10px 18px; background: var(--brand); border-top-color: var(--brand); color: #fff; }
.path li.gate b { font-size: 14px; white-space: nowrap; }
.group-head { font-size: 18px; margin: 18px 0 10px; }
.group-head:first-child { margin-top: 0; }
.table tr.cut td { border-bottom: 2px solid var(--brand-hi); }
.rank.in { background: var(--brand); color: #fff; }
.league-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.league-note i { width: 18px; height: 2px; background: var(--brand-hi); flex: none; }
.point-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.bk-round.straight .bk-slot::before { display: none; }
@media (max-width: 640px) {
  .path { grid-template-columns: 1fr; }
  .path li.gate { justify-items: start; padding: 8px 18px; }
  .point-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table.league .team-cell { min-width: 0; }
  .table.league th, .table.league td { padding-left: 8px; padding-right: 8px; }
}

/* ==================== player photos and rosters ==================== */
.photo-cell { display: grid; gap: 3px; justify-items: center; }
.photo-pick { position: relative; width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; cursor: pointer; background: #0c0c0f; border: 1px dashed var(--line-2); color: var(--dim); transition: border-color .2s, color .2s; }
.photo-pick:hover, .photo-pick:focus-within { border-color: var(--brand-hi); color: var(--text); }
.photo-pick:focus-within { outline: 2px solid var(--brand-hi); outline-offset: 2px; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove { display: flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); cursor: pointer; }
.photo-remove input { margin: 0; accent-color: var(--brand); }
.team-admin { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.rosters { display: grid; gap: 40px; }
.roster { display: grid; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.roster:first-child { padding-top: 0; border-top: 0; }
.roster header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.roster h2 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; }
.roster header .dim { font-size: 13.5px; }
.roster header .pill { margin-left: auto; }
.roster .people { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.roster .person-body b, .roster .person-body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-photo .sub-tag { position: absolute; left: 0; top: 0; padding: 2px 8px; font: 600 12px/1.5 var(--display); font-style: normal; color: var(--text); background: #050506; }
@media (max-width: 1000px) {
  .team-admin { grid-template-columns: 1fr; }
  .roster .people { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .roster .people { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .roster .person-body { padding: 8px 9px 10px; }
  .roster .person-body b { font-size: 14px; }
  .roster .person-photo span { font-size: 40px; }
}

/* ==================== game tiles ==================== */
.games { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.game-tile { height: 124px; color: var(--text); }
.game-tile:hover { transform: none; border-color: var(--brand-hi); }
.game-tile img { transition: transform .9s var(--ease); }
.game-tile:hover img, .game-tile:hover .art span { transform: scale(1.04); }
.game-tile.on { border-color: var(--brand-hi); outline: 1px solid var(--brand-hi); }
.game-tile::after { background: linear-gradient(0deg, rgba(5, 5, 6, .95) 12%, rgba(5, 5, 6, .62) 56%, rgba(5, 5, 6, .12) 100%); }
.game-tile b { font: 700 18px/1.25 var(--display); }
.game-tile small { color: #d6d6dc; }
.thumb.empty { display: inline-grid; place-items: center; color: var(--dim); border: 1px dashed var(--line-2); background: none; flex: none; }
.thumb.empty:hover { color: var(--text); border-color: var(--brand-hi); }
@media (max-width: 640px) { .games { grid-template-columns: repeat(2, minmax(0, 1fr)); } .game-tile { height: 104px; } .game-tile b { font-size: 16px; } }

/* ==================== match day and phones ==================== */
.tabs-bar { position: sticky; top: 68px; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.tabs-bar .tabs { margin-top: 0; }
html { scroll-padding-top: 130px; }
.t-hero .wrap { padding-bottom: 28px; }
.t-hero.compact .wrap { padding-top: 44px; padding-bottom: 22px; --ci: 16px 4px 8px; }
.t-hero.compact .t-title { gap: 8px; }
.t-hero.compact .t-title h1 { font-size: clamp(26px, 3.4vw, 40px); }
.t-hero.compact .t-title > p, .t-hero.compact .t-actions .btn-quiet { display: none; }
.t-hero.compact .t-actions { margin-top: 2px; }
.t-hero.compact .t-actions:not(:has(.btn:not(.btn-quiet))) { display: none; }
.bk-team.mine .name { color: var(--brand-text); }
.mrow.mine { border-color: var(--brand-hi); }
.player-head { font-size: 13px; font-weight: 600; color: var(--muted); }
@media (max-width: 640px) {
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .tabs a { padding: 12px 11px; font-size: 14.5px; }
  .t-hero.compact .wrap { padding-top: 28px; padding-bottom: 16px; --ci: 10px 0 6px; }
  .t-hero .crumbs, .t-hero .t-title { padding-left: 14px; }
  .t-hero.compact .crumbs { display: none; }
  .side span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .table .team-cell { min-width: 0; }
  .player-head { display: none; }
  .table tr[id^="m"] > td { display: block; width: auto !important; border-bottom: 0; padding-bottom: 6px; }
  .table tr[id^="m"] > td:last-child { padding-top: 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .score-form { display: grid; grid-template-columns: minmax(0, 1fr) 64px; }
  .score-form > .dim { display: none; }
  .score-form > .team-cell { grid-column: 1; flex-direction: row-reverse; }
  .score-form > .team-cell:last-of-type { flex-direction: row; justify-content: flex-start; }
  .score-form > .team-cell:first-of-type { grid-row: 1; }
  .score-form > [name="score1"] { grid-column: 2; grid-row: 1; }
  .score-form > [name="score2"] { grid-column: 2; grid-row: 2; }
  .score-form > .team-cell:last-of-type { grid-row: 2; }
  .score-form > [name="scheduled_at"], .score-actions { grid-column: 1 / -1; }
  .score-form > [name="scheduled_at"] { width: 100% !important; }
  .score-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .more { min-height: 44px; }
  .crumbs a { padding: 8px 0; }
  .seg a { padding: 11px 14px; }
}
