:root {
  --bg: #0e0e10;
  --bar: #050506;
  --surface: #161619;
  --surface-2: #1e1e22;
  --line: #2a2a2f;
  --line-2: #3a3a40;
  --text: #f2f2f0;
  --soft: #c9c9c6;
  --mute: #8f8f95;
  --dim: #5d5d63;
  --red: #e5243b;
  --gold: #f4b52c;
  --L: #4cc9e4;
  --M: #e8c547;
  --H: #ee6a50;
  --display: "Saira Extra Condensed", "Arial Narrow", sans-serif;
  --font: "Saira", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(18px, 4.5vw, 56px);
  --gut: max(var(--pad), calc((100% - 1160px) / 2));
  --head: 60px;
  --r: 3px;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; color-scheme: dark; background: var(--bg); }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 400 .95rem/1.55 var(--font); -webkit-font-smoothing: antialiased; }
main { flex: 1; }

/* Page stinger: a red-edged panel wipes over the screen, then off again on the next page. */
html.sting-out::before,
html.sting::before {
  content: "";
  position: fixed;
  z-index: 80;
  top: -30%;
  bottom: -30%;
  left: -15%;
  width: 145%;
  background: linear-gradient(90deg, #050506 0 92%, #e5243b 92% 100%);
  transform: translateX(-105%) skewX(-14deg);
  pointer-events: none;
}
html.sting-out::after,
html.sting::after {
  content: "HO5T.";
  position: fixed;
  z-index: 81;
  inset: 0;
  display: grid;
  place-items: center;
  color: transparent;
  background: linear-gradient(90deg, #f2f2f0 0 calc(100% - .38em), var(--red) calc(100% - .38em));
  -webkit-background-clip: text;
  background-clip: text;
  font-family: var(--display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(5.5rem, 16vw, 10rem);
  line-height: .8;
  letter-spacing: .01em;
  opacity: 0;
  pointer-events: none;
}
html.sting-out::before { animation: sting-cover .52s cubic-bezier(.77, 0, .18, 1) forwards; }
html.sting-out::after { animation: sting-mark .32s ease .22s forwards; }
/* Covered and still, until the next page starts the fade. */
html.sting::before { transform: translateX(0) skewX(-14deg); opacity: 1; }
html.sting::after { opacity: 1; }
html.sting.sting-go::before,
html.sting.sting-go::after { animation: sting-off .55s ease forwards; }
@keyframes sting-cover { to { transform: translateX(0) skewX(-14deg); } }
@keyframes sting-mark { to { opacity: 1; } }
@keyframes sting-off { from { opacity: 1; } to { opacity: 0; } }

/* Landing entrance: the frame is dragged in, torn, then blown out to white. */
html.pull body.gate {
  transform-origin: 50% 40%;
  animation: drag-in 1.85s cubic-bezier(.55, .05, .2, 1) forwards;
}
html.pull .gate-scrim { animation: scrim-out .45s ease forwards; }
html.pull .gate-enter { pointer-events: none; }
html.pull .gate-name,
html.pull .gate-coin { animation: text-tear .07s steps(2, end) infinite; }
html.pull::before {
  content: "";
  position: fixed;
  z-index: 70;
  inset: 0;
  background: #f4f4f2;
  opacity: 0;
  pointer-events: none;
  animation: pull-white 1.85s linear forwards;
}
.pull-fx { position: fixed; z-index: 6; inset: -8%; pointer-events: none; opacity: 0; }
html.pull .pull-fx { animation: tear-on .08s linear forwards, tear-jump .09s steps(2, end) infinite; }
.pull-fx::before,
.pull-fx::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
}
.pull-fx::before {
  top: 0;
  bottom: 0;
  background:
    repeating-linear-gradient(180deg,
      transparent 0 18px,
      rgba(76, 201, 228, .45) 18px 20px,
      transparent 20px 64px,
      rgba(229, 36, 59, .7) 64px 68px,
      transparent 68px 110px);
  mix-blend-mode: screen;
}
.pull-fx::after {
  height: 14vh;
  top: 18%;
  background: linear-gradient(90deg, transparent, rgba(229, 36, 59, .55) 12%, rgba(76, 201, 228, .45) 78%, transparent);
  mix-blend-mode: screen;
  animation: tear-bar .11s steps(2, end) infinite;
}
@keyframes drag-in {
  0% { transform: scale(1); filter: brightness(1) contrast(1); }
  14% { transform: scale(1.04) translate3d(-10px, 6px, 0) skewX(-1.6deg); filter: brightness(1.25) contrast(1.35) saturate(1.35); }
  22% { transform: scale(1.04) translate3d(12px, -8px, 0) skewX(2.2deg); filter: brightness(1.55) contrast(1.7) hue-rotate(-10deg); }
  36% { transform: scale(1.1) translate3d(-6px, 0, 0); filter: brightness(1.3) contrast(1.25); }
  54% { transform: scale(1.2) translate3d(8px, -10px, 0) skewX(-1.2deg); filter: brightness(1.8) contrast(1.55) saturate(1.4); }
  63% { transform: scale(1.22) translate3d(-16px, 4px, 0) skewX(2.6deg); filter: brightness(2.3) contrast(1.8); }
  78% { transform: scale(1.4) translate3d(0, -16px, 0); filter: brightness(3.4) contrast(1.45); }
  100% { transform: scale(1.9) translate3d(0, -28px, 0); filter: brightness(14) contrast(1.3); }
}
@keyframes scrim-out { to { opacity: 0; } }
@keyframes text-tear {
  0% { transform: translate(0); text-shadow: 4px 0 #e5243b, -4px 0 #4cc9e4; }
  50% { transform: translate(-5px, 1px) skewX(-4deg); text-shadow: -5px 0 #e5243b, 5px 0 #4cc9e4; }
  100% { transform: translate(4px, -2px); text-shadow: 3px 0 #4cc9e4, -3px 0 #e5243b; }
}
@keyframes pull-white {
  0%, 58% { opacity: 0; }
  76% { opacity: .22; }
  90% { opacity: .78; }
  100% { opacity: 1; }
}
@keyframes tear-on { to { opacity: 1; } }
@keyframes tear-jump {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-22px, 3vh, 0); }
  100% { transform: translate3d(18px, -2vh, 0); }
}
@keyframes tear-bar {
  0% { top: 12%; transform: translateX(-6%); }
  50% { top: 61%; transform: translateX(8%) scaleY(1.8); }
  100% { top: 34%; transform: translateX(-3%); }
}

/* Arrival: the white holds, then the page kicks through it. */
html.arrive::before {
  content: "";
  position: fixed;
  z-index: 90;
  inset: 0;
  background: #f4f4f2;
  pointer-events: none;
}
html.arrive.arrive-go::before { animation: arrive-bam .36s steps(1, end) forwards; }
html.arrive.arrive-go body { animation: arrive-kick .36s steps(2, end); }
@keyframes arrive-bam {
  0% { opacity: 1; }
  28% { opacity: .08; }
  44% { opacity: .9; }
  61% { opacity: 0; }
  74% { opacity: .42; }
  100% { opacity: 0; }
}
@keyframes arrive-kick {
  0% { transform: scale(1.05) translateX(-8px); filter: contrast(1.55) brightness(1.7) saturate(1.15); }
  45% { transform: scale(1.015) translateX(5px); filter: contrast(1.15) brightness(1.15); }
  100% { transform: none; filter: none; }
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

h1, h2, h3, .logo { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: .01em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.small { font-size: .84rem; color: var(--mute); }
.label { font-family: var(--display); font-weight: 700; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; height: var(--head); display: flex; justify-content: space-between; align-items: stretch; gap: 24px; padding: 0 var(--gut); background: var(--bar); border-bottom: 1px solid var(--line); }
.logo { align-self: center; text-decoration: none; font-size: 1.7rem; font-weight: 900; }
.logo::after { content: "."; color: var(--red); }
.top nav { display: flex; gap: clamp(18px, 3vw, 36px); padding-right: 4px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.top nav a { position: relative; display: flex; align-items: center; text-decoration: none; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.1rem; letter-spacing: .03em; text-transform: uppercase; color: var(--mute); transition: color .15s; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }
.top nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--red); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; background: var(--red); color: #fff; border: 1px solid var(--red); border-radius: var(--r); padding: 9px 20px 8px; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: #f23a50; border-color: #f23a50; }
.btn:disabled { opacity: .4; cursor: default; }
.btn:disabled:hover { background: var(--red); border-color: var(--red); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-quiet:hover, .btn-quiet:disabled:hover { background: var(--surface-2); border-color: var(--line-2); }
.link { background: none; border: 0; padding: 0; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; font-size: .84rem; }
.link:hover { color: var(--text); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-media { min-height: clamp(500px, 78vh, 760px); display: flex; flex-direction: column; background: var(--bar); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(1.05) contrast(1.04); }
.hero-scrim { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 10, 12, .9) 0%, rgba(10, 10, 12, .68) 48%, rgba(10, 10, 12, .35) 100%),
    linear-gradient(180deg, rgba(5, 5, 6, .55) 0%, rgba(14, 14, 16, .1) 35%, rgba(14, 14, 16, .82) 84%, var(--bg) 100%),
    radial-gradient(ellipse 55% 65% at 0% 100%, rgba(229, 36, 59, .2), transparent 65%); }
.hero-inner { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: clamp(22px, 3vw, 32px) var(--gut) clamp(32px, 5vw, 52px); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px 4px; background: rgba(14, 14, 16, .72); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r); backdrop-filter: blur(8px); font-family: var(--display); font-style: italic; font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.hero-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.hero-tag span { color: var(--gold); }
.hero-tag span:empty { display: none; }
.hero-ctrl { display: flex; gap: 6px; }
.vid-btn { padding: 5px 11px 4px; background: rgba(14, 14, 16, .72); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--r); backdrop-filter: blur(8px); font-family: var(--display); font-style: italic; font-weight: 700; font-size: .88rem; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); transition: background .15s, color .15s, border-color .15s; }
.vid-btn:hover { background: rgba(22, 22, 25, .92); color: var(--text); border-color: rgba(255, 255, 255, .3); }
.vid-btn[aria-pressed="true"] { border-color: var(--red); color: var(--text); }
.hero-body { max-width: 44rem; }
.hero-copy { max-width: 44rem; }
.hero h1 { font-weight: 900; font-size: clamp(5rem, 15vw, 10.5rem); line-height: .82; margin: 0 0 18px -.03em; text-shadow: 0 8px 32px rgba(0, 0, 0, .55); }
.hero h1::after { content: "."; color: var(--red); }
.lede { max-width: 40ch; font-size: clamp(1rem, 1.4vw, 1.12rem); color: #e2e2df; text-shadow: 0 2px 14px rgba(0, 0, 0, .65); }
.hero-cta { margin-top: 24px; }
.btn-glass { background: rgba(14, 14, 16, .72); color: var(--text); border-color: rgba(255, 255, 255, .22); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(30, 30, 34, .92); border-color: rgba(255, 255, 255, .4); }

.sec { padding: clamp(44px, 6vw, 76px) var(--gut); border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 60px); align-items: start; }
.side { position: sticky; top: calc(var(--head) + 24px); display: grid; gap: 10px; }
.side .small { max-width: 26ch; }
.club { color: var(--soft); font-variant-numeric: tabular-nums; }
.club:empty { display: none; }
/* club leaderboard */
.board-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 32px; flex-wrap: wrap; margin-bottom: 16px; }
.board-head .small { max-width: 46ch; margin-top: 8px; }
.board-wrap { max-height: min(480px, 62vh); overflow: auto; padding: 10px 8px; background: var(--bar); border: 1px solid var(--line); border-radius: 8px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.board-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.board-wrap::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.board { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0 4px; font-variant-numeric: tabular-nums; }
.board th { position: sticky; top: 0; z-index: 1; padding: 8px 16px; background: var(--bar); box-shadow: 0 4px 0 var(--bar); text-align: left; font-family: var(--display); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.board th:first-child { text-align: right; }
.board td { padding: 11px 16px; background: var(--surface); border-block: 1px solid var(--line); vertical-align: middle; }
.board td:first-child { width: 4rem; border-left: 1px solid var(--line); border-radius: var(--r) 0 0 var(--r); text-align: right; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.35rem; color: var(--mute); }
.board td:last-child { border-right: 1px solid var(--line); border-radius: 0 var(--r) var(--r) 0; }
.board tbody tr:first-child:not(.out) td:first-child { background: var(--gold); border-color: var(--gold); color: #1a1205; }
.pname { font-weight: 600; font-size: 1rem; }
.hash { margin-left: 6px; color: var(--dim); font-weight: 500; font-size: .8rem; }
.stat { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.3rem; line-height: 1.05; }
.stat-sub { display: block; margin-top: 2px; color: var(--mute); font-size: .76rem; }
.na { color: var(--dim); }
.board tr.out td { background: transparent; border-color: var(--line); }
.board tr.out .pname { font-weight: 500; color: var(--soft); }
.board-load { display: grid; justify-items: center; gap: 14px; margin: 0; padding: 64px 16px; color: var(--soft); font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.spin { width: 22px; height: 22px; border: 2px solid var(--line-2); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.board-note { margin-top: 12px; color: var(--mute); font-size: .86rem; }
.board-note:empty { display: none; }
.L { --c: var(--L); } .M { --c: var(--M); } .H { --c: var(--H); }

/* ---------- tool pages ---------- */
.page { padding: clamp(36px, 5vw, 60px) var(--gut) clamp(56px, 8vw, 96px); }
.page > h1 { font-weight: 900; font-size: clamp(2.8rem, 6vw, 4.2rem); }
.sub { margin-top: 8px; max-width: 56ch; color: var(--mute); }
.tool-grid, .t-layout { display: grid; gap: clamp(20px, 3vw, 32px); align-items: start; margin-top: clamp(26px, 4vw, 36px); }
.tool-grid { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); }
.panel { position: sticky; top: calc(var(--head) + 16px); display: grid; gap: 18px; min-width: 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.panel > * { min-width: 0; }

.form { display: grid; gap: 18px; }
.form label, .t-add label { display: grid; gap: 6px; font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.form label .small { font-family: var(--font); font-size: .8rem; letter-spacing: 0; text-transform: none; }
.panel > label:first-child { display: block; }
.panel > label:first-child + textarea { margin-top: -10px; }
.form input, .form select, .form textarea, .add-row input { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); font: 400 .95rem var(--font); transition: border-color .15s; }
.form input:focus, .form select:focus, .form textarea:focus, .add-row input:focus { outline: none; border-color: var(--mute); }
.panel textarea { min-height: 240px; resize: vertical; line-height: 1.6; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex !important; align-items: center; gap: 10px !important; font: 400 .9rem var(--font) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--soft) !important; cursor: pointer; }
.check input { width: 16px !important; height: 16px; accent-color: var(--red); }
.form .btn-row { display: grid; grid-template-columns: 1fr 1fr; }
.form .btn-row .btn:first-child { grid-column: 1 / -1; padding-block: 11px 10px; }

.results-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 16px; min-height: 42px; margin-bottom: 14px; }
.results-head h2 { font-size: 1.8rem; }
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.team { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.team h3 { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 14px 7px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 1.3rem; }
.team h3 span { font-family: var(--font); font-style: normal; font-weight: 400; font-size: .78rem; color: var(--mute); text-transform: none; }
.team ol { list-style: none; padding: 2px 14px 6px; }
.team li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 500; opacity: 0; animation: deal .3s forwards; animation-delay: calc(var(--i) * 50ms); }
.team li + li { border-top: 1px solid var(--line); }
.team li i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c); }
.team li.nc i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.team.bench { background: transparent; border-style: dashed; }
.team.bench h3 { background: transparent; color: var(--mute); }
@keyframes deal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* Roster page */
.roster-grid { list-style: none; margin-top: clamp(26px, 4vw, 36px); display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 0; }
.roster-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: border-color .15s, background .15s; }
.roster-card:hover, .roster-card:focus-visible { border-color: var(--line-2); background: var(--surface-2); }
.roster-no { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.3rem; color: var(--dim); }
.roster-who { display: block; min-width: 0; overflow: hidden; }
.roster-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-hash { display: block; margin-top: 2px; color: var(--dim); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster-go { font-family: var(--display); font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.roster-card:hover .roster-go { color: var(--red); }
.empty { padding: 52px 24px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--mute); text-align: center; }
.empty-title { margin-bottom: 4px; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.7rem; text-transform: uppercase; color: var(--text); }
.empty .btn { margin-top: 18px; }

/* ---------- wild card ---------- */
.wheel-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; margin-top: clamp(36px, 5vw, 52px); }
.wheel-box { position: relative; width: 100%; aspect-ratio: 1; }
.wheel-box canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.pointer { position: absolute; top: -10px; left: 50%; z-index: 2; width: 24px; height: 28px; transform: translateX(-50%); background: var(--text); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.wheel-out { padding-top: 6px; }
.wheel-pick { display: grid; gap: 6px; margin: 0 0 18px; max-width: 240px; font-family: var(--display); font-weight: 700; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.wheel-pick select { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); font: 500 .95rem var(--font); letter-spacing: 0; text-transform: none; }
.result-title { margin-top: 6px; font-family: var(--display); font-style: italic; font-weight: 900; font-size: clamp(2.8rem, 5vw, 4rem); line-height: .9; text-transform: uppercase; }
.result-desc { margin: 10px 0 22px; min-height: 3.1em; max-width: 38ch; color: var(--soft); }
.on-wheel { margin: 40px 0 8px; }
.plain { list-style: none; padding: 0; color: var(--mute); font-size: .88rem; }
.plain li { padding: 9px 0; border-top: 1px solid var(--line); }
.plain b { margin-right: 4px; color: var(--text); font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.1rem; text-transform: uppercase; }

/* ---------- tournament ---------- */
.wide { --gut: max(var(--pad), calc((100% - 1560px) / 2)); }
.t-layout { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); }
.t-side { display: flex; flex-direction: column; max-height: calc(100vh - var(--head) - 32px); }
.t-add { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.add-row { display: flex; gap: 6px; }
.add-row input { flex: 1; min-width: 0; }
.add-row input:disabled { opacity: .5; }
.t-list-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.t-list-head h2 { font-size: 1.5rem; }
.t-list-head h2 span { margin-left: 4px; color: var(--mute); }
.t-list { list-style: none; padding: 0 4px 0 0; display: grid; gap: 4px; align-content: start; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.t-list:empty { display: none; }
.t-list li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0 4px; align-items: center; padding: 5px 4px 7px 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.t-list .pos { text-align: center; font-size: .8rem; font-weight: 500; color: var(--dim); font-variant-numeric: tabular-nums; }
.tl-name, .tl-pin { width: 100%; min-width: 0; padding: 3px 6px; background: transparent; border: 1px solid transparent; border-radius: var(--r); color: var(--text); font: 600 .95rem/1.3 var(--font); }
.tl-name:hover:not(:disabled) { border-color: var(--line); }
.tl-name:focus, .tl-pin:focus { outline: none; border-color: var(--line-2); background: var(--surface); }
.tl-players, .tl-pin { grid-column: 2 / -1; }
.tl-players { padding: 0 7px; background: none; border: 0; text-align: left; color: var(--mute); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-players:hover:not(:disabled) { color: var(--text); text-decoration: underline; }
.tl-players.empty-p { color: var(--dim); }
.tl-pin { margin-top: 2px; font: 400 .84rem var(--font); text-transform: none; }
.x { width: 28px; height: 28px; flex: none; background: none; border: 0; border-radius: var(--r); color: var(--dim); font-size: 1.2rem; line-height: 1; }
.x:hover { color: var(--text); background: var(--surface-2); }
.x:disabled { opacity: .3; cursor: default; }
.x:disabled:hover { background: none; color: var(--dim); }

.t-main { min-width: 0; }
.t-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
#status { min-height: 1.3em; margin-bottom: 18px; }
#status:empty { display: none; }

/* tabs, styled like the official day selector */
.seg { display: inline-flex; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; min-width: 8.5rem; padding: 8px 18px 7px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-align: center; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); transition: background .15s, color .15s; }
.seg label:hover span { color: var(--text); }
.seg input:checked + span { background: var(--gold); border-color: var(--gold); color: #1a1205; }
.seg input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }

/* knockout tree: first round on top, final at the bottom */
.tree-scroll { overflow-x: auto; padding: 4px 0 12px; }
.tree-fit { margin: 0 auto; }
.tree { display: flex; width: max-content; transform-origin: 0 0; }
.node { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 8px; }
.kids { position: relative; display: flex; margin-bottom: 28px; }
.kids::after { content: ""; position: absolute; left: 50%; bottom: -28px; height: 14px; border-left: 1px solid var(--line-2); }
.kids > .node::after { content: ""; position: absolute; left: 50%; bottom: -14px; height: 14px; border-left: 1px solid var(--line-2); }
.kids > .node::before { content: ""; position: absolute; left: 0; right: 0; bottom: -14px; border-top: 1px solid var(--line-2); }
.kids > .node:first-child::before { left: 50%; }
.kids > .node:last-child::before { right: 50%; }

.match { width: 184px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mh { padding: 4px 10px 3px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-family: var(--display); font-style: italic; font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.slot { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: stretch; width: 100%; padding: 0 0 0 10px; background: none; border: 0; text-align: left; color: var(--text); cursor: pointer; transition: background .15s; }
.slot + .slot { border-top: 1px solid var(--line); }
button.slot:hover:not(:disabled) { background: var(--surface-2); }
.slot .tn { grid-column: 1; padding-top: 7px; font-weight: 600; font-size: .9rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .tn:last-child { padding-bottom: 7px; }
.slot .tm { grid-column: 1; padding-bottom: 6px; color: var(--mute); font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* score column: dash until decided, then W / L */
button.slot::after { content: "-"; grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; background: var(--surface-2); border-left: 1px solid var(--line); font-family: var(--display); font-style: italic; font-weight: 800; font-size: .95rem; color: var(--dim); }
.slot.win::after { content: "W"; background: var(--red); border-color: var(--red); color: #fff; }
.slot.lose::after { content: "L"; }
.slot.lose .tn, .slot.lose .tm { opacity: .4; }
.slot.empty { display: block; padding: 7px 10px; color: var(--dim); font-size: .8rem; cursor: default; }
button.slot:disabled { cursor: default; }

.champ { width: fit-content; min-width: 280px; max-width: 100%; margin: 20px auto 0; padding: 14px 32px 16px; text-align: center; background: var(--surface); border: 1px solid var(--gold); border-top-width: 3px; border-radius: var(--r); }
.champ .label { color: var(--gold); }
.champ-name { margin-top: 4px; font-family: var(--display); font-style: italic; font-weight: 900; font-size: clamp(2.2rem, 4vw, 3rem); line-height: .95; text-transform: uppercase; }
.champ .small { margin-top: 4px; }

/* round robin */
.table-wrap { overflow-x: auto; margin-bottom: 26px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 9px 12px; text-align: center; font-size: .9rem; }
.table th { padding-block: 2px 4px; font-family: var(--display); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.table td { background: var(--surface); border-block: 1px solid var(--line); }
.table td:first-child { width: 3rem; background: var(--surface-2); border-left: 1px solid var(--line); border-radius: var(--r) 0 0 var(--r); font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.2rem; color: var(--mute); }
.table td:last-child { border-right: 1px solid var(--line); border-radius: 0 var(--r) var(--r) 0; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.25rem; }
.table td.tname, .table th:nth-child(2) { text-align: left; }
.table .tn { display: block; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.table .tm { display: block; color: var(--mute); font-size: .72rem; }
.table tr.lead td:first-child { background: var(--gold); border-color: var(--gold); color: #1a1205; }
.fixtures { margin-bottom: 20px; }
.fixtures h3 { margin-bottom: 6px; font-size: 1.15rem; color: var(--mute); }
.fixture { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem auto 3.2rem minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.fixture + .fixture { margin-top: 4px; }
.fixture .ta { text-align: right; }
.fixture .tn { display: block; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.fixture .tm { display: block; color: var(--mute); font-size: .72rem; }
.fixture input { width: 100%; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-align: center; font: italic 800 1.2rem var(--display); }
.fixture input:focus { outline: none; border-color: var(--mute); }
.fixture .vs { color: var(--dim); }

/* ---------- footer ---------- */
.foot { padding: 20px var(--gut); background: var(--bar); border-top: 1px solid var(--line); color: var(--dim); font-size: .78rem; }
.foot a { color: var(--mute); }
.foot a:hover { color: var(--text); }

/* ---------- coin landing ---------- */
.gate { min-height: 100vh; overflow: hidden; }
.gate-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gate-scrim { position: fixed; inset: 0; background: rgba(5, 5, 6, .78); }
.gate-enter { position: relative; z-index: 1; display: grid; align-content: center; justify-items: center; gap: 22px; width: 100%; min-height: 100vh; padding: 24px; background: none; border: 0; color: var(--text); cursor: pointer; }
.gate-name { font-family: var(--display); font-style: italic; font-weight: 900; font-size: clamp(6rem, 22vw, 14rem); line-height: .78; letter-spacing: .01em; }
.gate-name::after { content: "."; color: var(--red); }
.gate-coin { font-family: "Press Start 2P", "Courier New", monospace; font-style: normal; font-weight: 400; font-size: clamp(.8rem, 1.6vw, 1.05rem); line-height: 1.4; letter-spacing: .04em; text-transform: uppercase; color: var(--red); animation: coin-blink 3.6s linear infinite; }
@keyframes coin-blink {
  0%, 32% { color: #e5243b; }
  34%, 65% { color: #4cc9e4; }
  67%, 100% { color: #f4b52c; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .split, .tool-grid, .t-layout, .wheel-grid { grid-template-columns: minmax(0, 1fr); }
  .side, .panel { position: static; }
  .split { gap: 18px; }
  .hero-media { min-height: 460px; }
  .t-side { max-height: none; }
  .t-list { max-height: 50vh; }
  .wheel-box { max-width: 340px; margin-inline: auto; }
  .results-head .btn-row { width: 100%; }
}
@media (max-width: 600px) {
  .top { height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
  .top nav { width: 100%; justify-content: space-between; gap: 12px; }
  .top nav a { padding: 10px 0 12px; font-size: 1rem; }
  .board { min-width: 0; }
  .board .fans { display: none; }
  .seg span { min-width: 0; }
  .panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
  .team li { opacity: 1; }
}
