:root { --project: var(--primary); }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--surface); color: var(--ink); font-family: var(--font-sans); }
/* Fixed 1920x1080 canvas scaled to the window (OBS browser source: 1920x1080). */
#stage { position: absolute; width: 1920px; height: 1080px; transform-origin: top left; display: grid; grid-template-rows: 120px 1fr auto 72px; }
header, footer { display: flex; align-items: center; justify-content: space-between; padding: 0 64px; }
header { border-bottom: 2px solid var(--line); gap: 32px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 40px; color: var(--project); white-space: nowrap; }
#title { font-family: var(--font-display); font-weight: 600; font-size: 44px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#clock { font-family: var(--font-display); font-size: 40px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
footer { font-size: 20px; color: var(--ink-muted); border-top: 2px solid var(--line); position: relative; }
#progress { position: absolute; top: -2px; left: 0; height: 4px; background: var(--project); width: 0; }

#slides { position: relative; overflow: hidden; }
.slide { position: absolute; inset: 0; padding: 40px 64px; display: flex; flex-direction: column; opacity: 0; transform: translateX(80px); transition: opacity 0.6s, transform 0.6s; }
.slide.on { opacity: 1; transform: none; }
.slide.off { opacity: 0; transform: translateX(-80px); }
.sub { font-size: 28px; color: var(--ink-muted); margin: 0 0 28px; font-family: var(--font-display); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 40px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); gap: 20px 28px; }
.card { background: var(--surface-raised); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 18px 26px; min-width: 0; }
.meta { font-size: 18px; color: var(--ink-muted); display: flex; justify-content: space-between; gap: 16px; white-space: nowrap; }
.meta span:first-child { overflow: hidden; text-overflow: ellipsis; }
.row { display: flex; align-items: center; gap: 16px; font-size: 30px; margin-top: 8px; }
.row .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .pts { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.win { font-weight: 600; }
.lose { color: var(--ink-muted); }
.live { color: var(--accent); font-weight: 600; }

.logo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.logo-lg { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.logo-xl { width: 260px; height: 260px; object-fit: contain; }
.logo--empty { display: inline-grid; place-items: center; border-radius: var(--radius-full); background: var(--surface-sunken); color: var(--ink-muted); font-size: 14px; font-weight: 700; }
.logo-xl.logo--empty { font-size: 72px; }

.winner { display: flex; align-items: center; gap: 18px; font-family: var(--font-display); font-size: 34px; font-weight: 700; margin-top: 10px; }
.winner .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runner { display: flex; align-items: center; gap: 12px; font-size: 20px; color: var(--ink-muted); margin-top: 8px; }
.card .runner span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.season { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--project); }
.tier { display: inline-block; padding: 2px 12px; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent-strong); font-size: 16px; font-weight: 600; }
.tier--2 { background: var(--primary-soft); color: var(--primary); }
.tname { font-family: var(--font-display); font-size: 30px; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hero { display: flex; align-items: center; justify-content: center; gap: 80px; flex: 1; min-height: 0; }
.hero > div { min-width: 0; max-width: 1200px; }
.hero h2 { font-family: var(--font-display); font-size: 88px; line-height: 1.1; margin: 0; overflow-wrap: anywhere; }
.podium { max-width: 1700px; }
.podium .winner, .podium .runner { flex-wrap: wrap; overflow-wrap: anywhere; }
.hero .lead { font-size: 40px; color: var(--ink-muted); margin: 16px 0 0; }
.hero .chips { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }
.hero .chip { padding: 8px 24px; border-radius: var(--radius-full); background: var(--surface-raised); border: 2px solid var(--line); font-size: 28px; }
.hero .record { font-family: var(--font-display); font-size: 48px; margin-top: 32px; }
.photo { width: 360px; height: 360px; border-radius: var(--radius-full); object-fit: cover; border: 6px solid var(--project); }
.podium { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.podium .winner { font-size: 72px; justify-content: center; }
.podium .runner { font-size: 34px; justify-content: center; }
.message { display: grid; place-items: center; flex: 1; min-height: 0; text-align: center; font-family: var(--font-display); font-size: 72px; font-weight: 600; padding: 0 120px; }

#ticker { overflow: hidden; background: var(--project); color: var(--on-primary); font-size: 30px; font-weight: 600; height: 56px; display: flex; align-items: center; }
#ticker[hidden] { display: none; }
#ticker-text { white-space: nowrap; padding-left: 100%; animation: scroll 30s linear infinite; }
@keyframes scroll { to { transform: translateX(-100%); } }

/* Group and Swiss tables */
.tables { display: grid; gap: 22px 40px; }
.tables--2 { grid-template-columns: repeat(2, 1fr); }
.standing { display: grid; gap: 4px; }
.srow { display: grid; grid-template-columns: 48px 36px minmax(0, 1fr) 110px 110px; align-items: center; gap: 14px; font-size: 26px; padding: 3px 10px; border-radius: var(--radius-md); border-left: 6px solid transparent; }
.srow .logo { width: 34px; height: 34px; }
.srow .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .rank { font-family: var(--font-display); font-weight: 700; color: var(--ink-muted); text-align: right; }
.srow .rec { font-family: var(--font-display); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.srow .games { color: var(--ink-muted); text-align: right; font-variant-numeric: tabular-nums; }
.srow--up { border-left-color: var(--success); }
.srow--down { border-left-color: var(--danger); color: var(--ink-muted); }
.tables--2 .srow { font-size: 24px; }
.ranking { max-width: 1200px; margin: 0 auto; }
.ranking .srow { grid-template-columns: 48px 36px minmax(0, 1fr) 220px; font-size: 32px; }

/* Bracket: one column per round */
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 32px; flex: 1; min-height: 0; }
.round { display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.round-matches { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 0; }
.round-name { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--project); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmatch { padding: 10px 18px; }
.bmatch .row { font-size: 24px; margin-top: 2px; gap: 12px; }
.bmatch .logo { width: 32px; height: 32px; }

/* Tournament format */
.stage ul { margin: 12px 0 0; padding-left: 28px; font-size: 24px; line-height: 1.4; }
.stage .tname { white-space: normal; }

/* Hand-made slides */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 60px; flex: 1; min-height: 0; text-align: center; }
.versus .side { display: grid; justify-items: center; gap: 24px; min-width: 0; }
.vname { font-family: var(--font-display); font-size: 52px; font-weight: 700; overflow-wrap: anywhere; }
.big-score { font-family: var(--font-display); font-size: 160px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; gap: 32px; justify-content: center; }
.big-score span { color: var(--ink-muted); }
.versus .lead { font-size: 34px; color: var(--ink-muted); }
.announce-title { font-size: 96px; font-weight: 700; overflow-wrap: anywhere; }
.announce-text { font-size: 44px; font-weight: 500; color: var(--ink-muted); margin: 32px 0 0; font-family: var(--font-sans); overflow-wrap: anywhere; }
.stat-value { font-size: 220px; font-weight: 700; color: var(--project); line-height: 1; overflow-wrap: anywhere; }
