/* EquineSuite Live — design tokens from the EquineSuite UI kit (Live screen):
   Rajdhani for UI, IBM Plex Mono for data/labels, Ink #0C1015, Gold #E2B866, Live #FF4D5E. */
:root {
  --acc: #E2B866; --live: #FF4D5E; --ink0: #0C1015; --paper: #F2F4F0;
  --bg: #0C1015; --hdr: rgba(12,16,21,.86); --surf: #141920; --surf2: #1C2229; --line: #272E36;
  --ink: #F2F4F0; --mute: #8A9086; --faint: #5E645B; --accT: #E2B866; --accBg: rgba(226,184,102,.14);
  --liveBg: rgba(255,77,94,.15); --ok: #5BE09A; --okBg: rgba(76,211,138,.15); --warn: #F5B841; --warnBg: rgba(245,184,65,.16);
  --bad: #FF6B70; --badBg: rgba(255,90,95,.14); --info: #7DB7FF; --infoBg: rgba(79,157,255,.15);
  --sh: 0 24px 60px rgba(0,0,0,.55); --mk: var(--ink);
  --ui: 'Rajdhani', 'IBM Plex Sans Arabic', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F2F4F0; --hdr: rgba(242,244,240,.88); --surf: #FFFFFF; --surf2: #F1F3EF; --line: #DDE1DA;
  --ink: #0C1015; --mute: #5E645B; --faint: #8A9086; --accT: #8A6420; --accBg: rgba(226,184,102,.2);
  --liveBg: rgba(255,77,94,.12); --ok: #1E8E55; --okBg: rgba(47,191,119,.14); --warn: #A86A00; --warnBg: rgba(245,184,65,.2);
  --bad: #D2373D; --badBg: rgba(229,72,77,.11); --info: #2468C9; --infoBg: rgba(79,157,255,.14); --sh: 0 24px 60px rgba(12,16,21,.18);
  color-scheme: light;
}
[lang="ar"] { --ui: 'IBM Plex Sans Arabic', 'Rajdhani', system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--ui); font-weight: 500; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--accT); text-decoration: none; } a:hover { color: #F0CC85; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input::placeholder, textarea::placeholder { color: #8A9086; opacity: .85; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.mute { color: var(--mute); } .faint { color: var(--faint); }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hide { display: none !important; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes flash { from { background: var(--accBg); } to { background: transparent; } }
@keyframes slideUp { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.pulse { animation: pulse 1.6s infinite; }
[data-motion="off"] .pulse, [data-motion="off"] .flash { animation: none !important; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--live); display: inline-block; flex: none; }

/* ---------- layout ---------- */
.shell { display: flex; flex-direction: column; min-height: 100vh; }
.hdr { position: sticky; top: 0; z-index: 30; background: var(--hdr); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.hdr-in { max-width: 1360px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; }
.brand small { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: .24em; color: var(--mute); }
.brand b { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 20px; line-height: .9; letter-spacing: .1em; }
.brand b .dot { width: 7px; height: 7px; }
.nav { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav a { height: 36px; padding: 0 12px; border-radius: 8px; color: var(--mute); display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14.5px; letter-spacing: .04em; white-space: nowrap; }
.nav a.on { background: var(--accBg); color: var(--accT); }
.nav a:hover { color: var(--ink); }
.nav svg, .ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--live); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; font-weight: 600; }
.search { flex: 1 1 120px; min-width: 44px; max-width: 380px; margin-inline-start: auto; height: 40px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--mute); position: relative; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font-weight: 600; font-size: 14.5px; outline: none; }
.sq { position: absolute; top: 46px; inset-inline: 0; background: var(--surf); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh); max-height: 60vh; overflow: auto; z-index: 45; }
.sq a { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--ink); }
.sq a:hover, .sq a.sel { background: var(--surf2); }
.sq h6 { margin: 0; padding: 8px 12px 4px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: var(--faint); font-weight: 600; }
.iconbtn { width: 40px; height: 40px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: var(--surf); color: var(--ink); display: flex; align-items: center; justify-content: center; position: relative; }
.iconbtn .badge { position: absolute; top: -5px; inset-inline-end: -5px; border: 2px solid var(--bg); }
.me-chip { height: 40px; flex: none; padding: 0 12px 0 4px; border: 1px solid var(--line); border-radius: 20px; background: var(--surf); display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.av { width: 32px; height: 32px; border-radius: 16px; background: var(--acc); color: var(--ink0); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; flex: none; text-transform: uppercase; }
.main { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 24px 20px 64px; display: flex; flex-direction: column; gap: 22px; }
.ftr { border-top: 1px solid var(--line); background: var(--surf); }
.ftr-in { max-width: 1360px; margin: 0 auto; padding: 22px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ftr svg { width: 26px; height: 26px; }
.tabbar { display: none; }

/* ---------- building blocks ---------- */
.btn { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surf); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 13px; letter-spacing: .03em; white-space: nowrap; }
.btn:hover { border-color: var(--mute); }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--ink0); }
.btn.pri:hover { background: #F0CC85; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--mute); }
.btn.sm { height: 32px; padding: 0 11px; border-radius: 8px; font-size: 12px; }
.btn.ok { color: var(--ok); border-color: var(--ok); background: transparent; }
.btn.warn { color: var(--warn); border-color: var(--warn); background: transparent; }
.btn.bad { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.card { background: var(--surf); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.card-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 19px; }
.card-h .mono, .lbl { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .14em; color: var(--mute); }
.list-row { padding: 11px 18px; display: grid; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover, .hov:hover { background: var(--surf2); color: var(--ink); }
.pill { height: 22px; padding: 0 8px; border-radius: 5px; display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .06em; white-space: nowrap; background: var(--surf2); color: var(--mute); }
.pill.live { background: var(--liveBg); color: var(--live); } .pill.live.solid { background: var(--live); color: #fff; }
.pill.done, .pill.ok, .pill.accepted { background: var(--okBg); color: var(--ok); }
.pill.pending, .pill.warn { background: var(--warnBg); color: var(--warn); }
.pill.waitlist { background: var(--infoBg); color: var(--info); }
.pill.rejected, .pill.bad { background: var(--badBg); color: var(--bad); }
.pill.start_list, .pill.acc { background: var(--accBg); color: var(--accT); }
.pill .dot { width: 6px; height: 6px; }
.disc { border-radius: 11px; background: var(--ink0); display: inline-flex; align-items: center; justify-content: center; flex: none; --mk: #F2F4F0; }
.disc svg { width: 75%; height: 75%; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 12px 0 5px; border-radius: 17px; border: 1px solid var(--line); background: var(--surf); display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; color: var(--ink); }
.chip.on { background: var(--accBg); border-color: var(--acc); }
.chip .disc { width: 24px; height: 24px; border-radius: 12px; }
.chip.plain { padding: 0 12px; }
.h1 { font-weight: 700; font-size: 40px; line-height: .95; letter-spacing: .02em; text-transform: uppercase; margin: 0; }
.kick { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .18em; color: var(--mute); }
.kick.live { color: var(--live); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.empty { padding: 36px; border-radius: 16px; border: 1px dashed var(--line); text-align: center; font-weight: 600; font-size: 15px; color: var(--mute); }
.seg { display: inline-flex; gap: 2px; background: var(--surf); border: 1px solid var(--line); padding: 3px; border-radius: 10px; flex-wrap: wrap; }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--mute); font-weight: 700; font-size: 13px; }
.seg button.on { background: var(--acc); color: var(--ink0); }
.seg button .n { font-family: var(--mono); font-size: 10px; opacity: .7; margin-inline-start: 4px; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { height: 42px; padding: 0; border: 0; background: transparent; color: var(--mute); font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; box-shadow: inset 0 -2px 0 transparent; }
.tabs button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--tab, var(--acc)); }
.tabs .n { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px; border-radius: 14px; background: var(--surf2); }
.field { height: 40px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); display: flex; align-items: center; gap: 6px; padding: 0 4px 0 12px; }
.field .lbl { font-size: 9.5px; color: var(--faint); letter-spacing: .12em; }
.field select, .field input { height: 34px; border: 0; background: transparent; color: var(--ink); font-weight: 700; font-size: 14px; outline: none; min-width: 0; }
.field.grow { flex: 1 1 220px; color: var(--mute); }
.field.grow input { flex: 1; font-weight: 600; }
.toggle { width: 36px; height: 21px; border-radius: 11px; background: var(--line); display: inline-flex; align-items: center; padding: 2px; flex: none; border: 0; }
.toggle i { width: 17px; height: 17px; border-radius: 9px; background: #fff; display: block; transition: transform .15s; }
.toggle.on { background: var(--acc); } .toggle.on i { transform: translateX(15px); }
[dir="rtl"] .toggle.on i { transform: translateX(-15px); }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.form label, .lf { display: flex; flex-direction: column; gap: 5px; }
.form label > span, .lf > span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; color: var(--mute); text-transform: uppercase; }
.inp { height: 42px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); padding: 0 12px; font-weight: 600; font-size: 15px; outline: none; width: 100%; }
textarea.inp { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.inp:focus { border-color: var(--acc); }
.err { font-family: var(--mono); font-size: 11px; color: var(--bad); }
.note { font-weight: 500; font-size: 13.5px; color: var(--mute); line-height: 1.45; }
.dark-hero { border-radius: 20px; background: var(--ink0); color: var(--paper); padding: 26px 28px; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.dark-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 10%, var(--glow, rgba(226,184,102,.3)) 0%, transparent 55%); }
.dark-hero > * { position: relative; }
.dark-hero .btn { background: transparent; border-color: #272E36; color: var(--paper); }
.dark-hero .btn.on { background: rgba(226,184,102,.16); color: var(--acc); }

/* ---------- live cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 14px; }
.lc { background: var(--surf); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: border-color .15s, transform .15s; }
.lc:hover { border-color: var(--acc); color: var(--ink); }
.lc-h { padding: 14px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.lc-h .disc { width: 40px; height: 40px; }
.lc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-t b { font-weight: 700; font-size: 17px; line-height: 1.1; }
.lc-t span { font-family: var(--mono); font-size: 10px; color: var(--mute); }
.lc-cur { padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.bib { width: 46px; height: 46px; border-radius: 11px; color: var(--ink0); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; flex: none; }
.lc-cur .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-cur .who small { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--mute); }
.lc-cur .who b { font-weight: 700; font-size: 18px; line-height: 1.05; }
.lc-cur .who span { font-family: var(--mono); font-size: 10px; color: var(--mute); }
.clk { font-family: var(--mono); font-weight: 600; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; text-align: end; }
.clk.over { color: var(--bad); }
.lc-top { padding: 6px 0; }
.lc-top div { padding: 6px 16px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.lc-top .rk { font-weight: 700; font-size: 16px; }
.lc-top .nm { font-weight: 600; font-size: 14.5px; }
.lc-top .sc { font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
.lc-f { margin-top: auto; padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--mute); gap: 10px; }
.lc-f b { color: var(--accT); font-weight: 600; }
.prog { height: 3px; background: var(--line); }
.prog i { display: block; height: 100%; background: var(--c, var(--acc)); transition: width .4s; }
.list-mode .cards { grid-template-columns: 1fr; }
.list-mode .lc { flex-direction: row; flex-wrap: wrap; }
.list-mode .lc-top, .list-mode .prog { display: none; }
.list-mode .lc-h { border: 0; flex: 1 1 300px; } .list-mode .lc-cur { flex: 1 1 300px; } .list-mode .lc-f { flex: 1 1 100%; }

/* ---------- shows ---------- */
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.sc { background: var(--surf); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); }
.sc:hover { border-color: var(--acc); color: var(--ink); }
.sc-art { height: 92px; background: var(--ink0); position: relative; display: flex; align-items: flex-end; padding: 12px 16px; overflow: hidden; }
.sc-art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, var(--glow) 0%, transparent 60%); }
.sc-art .row { position: relative; gap: 5px; }
.sc-art .disc { width: 30px; height: 30px; border-radius: 8px; background: #141920; }
.sc-art .pill { position: absolute; top: 12px; inset-inline-end: 14px; }
.sc-b { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.sc-b b { font-weight: 700; font-size: 19px; line-height: 1.1; }
.sc-b span { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; color: var(--mute); }
.sc-b .mono { font-size: 11px; }
.datebox { width: 48px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 9px; background: var(--surf2); }
.datebox small { font-family: var(--mono); font-size: 9px; color: var(--mute); }
.datebox b { font-weight: 700; font-size: 20px; line-height: 1; }
.days { display: flex; gap: 8px; flex-wrap: wrap; }
.days button { height: 54px; min-width: 86px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surf); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.days button small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; }
.days button b { font-weight: 700; font-size: 17px; }
.days button.on { background: var(--acc); border-color: var(--acc); color: var(--ink0); }
.days button.locked { color: var(--faint); }

/* ---------- class / results ---------- */
.cls-h { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cls-h .disc { width: 64px; height: 64px; border-radius: 17px; }
.livebar { border-radius: 18px; background: var(--ink0); color: var(--paper); padding: 18px 22px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; position: relative; overflow: hidden; }
.livebar::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 100% 50%, var(--glow) 0%, transparent 55%); }
.livebar > * { position: relative; }
.livebar .bib { width: 64px; height: 64px; border-radius: 15px; font-size: 26px; }
.livebar .who small { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--live); }
.livebar .who b { display: block; font-weight: 700; font-size: 28px; line-height: 1; margin: 4px 0; }
.livebar .who span { font-family: var(--mono); font-size: 11px; color: #A3A99E; }
.livebar .clkw { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.livebar .clkw small { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: #8A9086; }
.livebar .clk { font-size: 44px; line-height: .9; }
.tbl { background: var(--surf); border: 1px solid var(--line); border-radius: 18px; overflow-x: auto; }
.tr { display: grid; grid-template-columns: 54px 48px minmax(170px, 1.6fr) minmax(130px, 1.1fr) 56px var(--cols) 40px; gap: 12px; min-width: 760px; padding: 0 18px; height: 56px; align-items: center; border-bottom: 1px solid var(--line); }
.tr.th { height: auto; padding: 11px 18px; font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .12em; color: var(--mute); }
.tr:last-child { border-bottom: 0; }
.tr .rk { font-weight: 700; font-size: 22px; }
.tr .no { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--mute); }
.tr .rd { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tr .rd a, .tr .hs a { color: var(--ink); }
.tr .rd a:hover, .tr .hs a:hover { color: var(--accT); }
.tr .rd b { font-weight: 700; font-size: 16px; }
.tr .rd small { font-family: var(--mono); font-size: 9.5px; color: var(--mute); }
.tr .rd small.hz, .tr .v.mob { display: none; }
.tr .rd a { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr .v.mob b { display: block; } .tr .v.mob small { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--mute); font-weight: 500; }
.tr .hs { font-weight: 600; font-size: 15px; }
.tr .nat { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.tr .v { text-align: end; font-family: var(--mono); font-size: 13.5px; color: var(--mute); font-variant-numeric: tabular-nums; }
.tr .v.last { font-weight: 700; font-size: 16px; color: var(--ink); }
.tr.live { background: var(--liveBg); box-shadow: inset 3px 0 0 var(--live); }
.tr.live .rk, .tr.live .v.last, .tr.live small { color: var(--live); }
.tr.togo { opacity: .62; } .tr.out .v.last { color: var(--bad); }
.tr.me { box-shadow: inset 3px 0 0 var(--acc); }
.tr.flash { animation: flash 2.4s ease-out; }
.star { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); display: flex; align-items: center; justify-content: center; }
.star svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.star.on { color: var(--acc); } .star.on svg { fill: var(--acc); }
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.info div { background: var(--surf); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.info b { font-weight: 700; font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stats div { background: var(--surf); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.stats b { font-weight: 700; font-size: 30px; line-height: 1; }

/* ---------- TV / big-screen mode ---------- */
.tv { position: fixed; inset: 0; z-index: 80; background: var(--ink0); color: var(--paper); display: flex; flex-direction: column; padding: 3vh 3vw; gap: 2vh; --mk: #F2F4F0; }
.tv h2 { margin: 0; font-size: 4.4vh; text-transform: uppercase; line-height: 1; }
.tv .sub { font-family: var(--mono); font-size: 1.6vh; letter-spacing: .16em; color: var(--acc); }
.tv .tvcur { display: grid; grid-template-columns: auto 1fr auto; gap: 3vh; align-items: center; background: #141920; border-radius: 2vh; padding: 2vh 3vh; }
.tv .tvcur .bib { width: 10vh; height: 10vh; font-size: 5vh; border-radius: 2vh; }
.tv .tvcur b { font-size: 5vh; line-height: 1; display: block; }
.tv .tvcur span { font-family: var(--mono); font-size: 2vh; color: #A3A99E; }
.tv .tvcur .clk { font-size: 10vh; }
.tv .tvrows { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: .6vh; }
.tv .tvrow { display: grid; grid-template-columns: 7vh 1fr 1fr auto; gap: 2vh; align-items: center; font-size: 3.2vh; padding: .8vh 2vh; border-radius: 1vh; background: #141920; font-weight: 700; }
.tv .tvrow .sc { font-family: var(--mono); }
.tv .x { position: absolute; top: 2vh; inset-inline-end: 2vw; }

/* ---------- overlays ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(6,8,11,.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: 100%; max-width: 420px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surf); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.modal.wide { max-width: 720px; }
.modal h3 { margin: 0; font-weight: 700; font-size: 26px; line-height: 1; text-transform: uppercase; }
.pop { position: fixed; top: 70px; inset-inline-end: max(20px, calc((100vw - 1360px) / 2 + 20px)); z-index: 41; width: min(400px, calc(100vw - 40px)); max-height: 72vh; overflow-y: auto; background: var(--surf); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh); }
.pop .list-row { grid-template-columns: 10px minmax(0, 1fr) auto; align-items: start; }
.pop .list-row.unread { background: var(--accBg); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 100; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); display: flex; align-items: center; gap: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.3); font-weight: 700; font-size: 15px; max-width: calc(100vw - 40px); animation: slideUp .2s ease-out; }
.toast svg { width: 16px; height: 16px; color: var(--acc); fill: none; stroke: currentColor; stroke-width: 2.4; flex: none; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--mute); }
.conn i { width: 7px; height: 7px; border-radius: 4px; background: var(--ok); }
.conn.off i { background: var(--warn); }

/* ---------- my suite ---------- */
.prof { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.prof .av { width: 84px; height: 84px; border-radius: 42px; font-size: 30px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 18px; }
.kv div { display: flex; flex-direction: column; gap: 3px; }
.kv b { font-weight: 700; font-size: 15px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .d { min-height: 74px; border-radius: 10px; background: var(--surf2); padding: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; overflow: hidden; }
.cal .d.o { opacity: .35; } .cal .d.t { outline: 1.5px solid var(--acc); }
.cal .d small { font-family: var(--mono); font-size: 10px; color: var(--mute); }
.cal .ev { border-radius: 4px; padding: 1px 5px; font-weight: 700; font-size: 11px; color: var(--ink0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .wd { font-family: var(--mono); font-size: 9.5px; color: var(--faint); text-align: center; letter-spacing: .1em; padding-bottom: 4px; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.steps span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; padding: 6px 10px; border-radius: 6px; background: var(--surf2); color: var(--mute); }
.steps span.on { background: var(--accBg); color: var(--accT); }
.hchip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: transparent; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--mute); }
.hchip.on { border-color: var(--acc); background: var(--accBg); color: var(--accT); }
.hero-land { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; }

/* ---------- print ---------- */
#print { display: none; }
@media print {
  body * { visibility: hidden; }
  #print, #print * { visibility: visible; }
  #print { display: block; position: absolute; left: 0; top: 0; width: 100%; background: #fff; color: #0C1015; font-family: var(--ui); padding: 10mm; --mk: #0C1015; }
  #print .ph { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #0C1015; padding-bottom: 8px; }
  #print table { width: 100%; border-collapse: collapse; font-size: 11pt; margin-top: 8px; }
  #print td, #print th { border-bottom: 1px solid #E3E6E0; padding: 4px 6px; text-align: start; }
  #print th { font-family: var(--mono); font-size: 8pt; letter-spacing: .1em; }
  #print .pf { margin-top: 10px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 7pt; color: #8A9086; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .nav .lbl-t { display: none; } }
@media (max-width: 900px) {
  .grid2, .hero-land { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .hdr-in { padding: 0 16px; gap: 8px; height: 58px; }
  .nav { display: none; }
  .brand small { display: none; }
  .search { max-width: none; }
  .search.collapsed { flex: 0 0 40px; padding: 0; justify-content: center; }
  .search.collapsed input { display: none; }
  .me-chip span.nm { display: none; } .me-chip { padding: 0 4px; }
  .main { padding: 16px 16px 96px; gap: 18px; }
  .h1 { font-size: 30px; }
  .dark-hero { padding: 20px; }
  .livebar { grid-template-columns: auto minmax(0, 1fr); }
  .livebar .clkw { grid-column: 1 / -1; align-items: flex-start; }
  .livebar .clk { font-size: 40px; }
  .tabbar { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 35; background: var(--hdr); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--mute); padding: 4px 0; position: relative; }
  .tabbar a.on { color: var(--accT); }
  .tabbar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .badge { position: absolute; top: -2px; left: calc(50% + 6px); }
  .ftr { padding-bottom: 70px; }
  .pop { top: 64px; inset-inline: 16px; width: auto; }
  .cal .d { min-height: 54px; } .cal .ev { font-size: 9px; }
  .toast { bottom: 84px; }
  /* compact results table on phones */
  .tr { grid-template-columns: 34px minmax(0, 1fr) auto 30px; min-width: 0; gap: 8px; padding: 0 12px; height: 62px; }
  .tr .no, .tr .hs, .tr .nat, .tr .v { display: none; }
  .tr .rd small.hz, .tr .v.mob { display: block; }
  .tr .v.mob { font-weight: 700; font-size: 15px; color: var(--ink); text-align: end; max-width: 120px; }
  .grid2 { grid-template-columns: 1fr !important; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 16px; }
  .tabs button { flex: none; }
  .crow { grid-template-columns: 44px 30px minmax(0, 1fr) auto !important; gap: 10px; padding: 11px 14px; }
  .crow .ldr { display: none; }
  .crow .disc { width: 30px !important; height: 30px !important; }
  .drow { grid-template-columns: 40px 28px minmax(0, 1fr) !important; }
  .drow .dact { grid-column: 1 / -1; justify-content: flex-start !important; flex-wrap: wrap; }
  .orow { grid-template-columns: minmax(0, 1fr) auto !important; }
  .orow > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .orow > :nth-child(4) { grid-column: 1 / -1; flex-wrap: wrap; }
  .orow2 { grid-template-columns: 32px minmax(0, 1fr) !important; }
  .orow2 > :nth-child(n+3) { grid-column: 2; justify-self: start; }
  .prow { grid-template-columns: 44px minmax(0, 1fr) auto !important; }
  .prow > :nth-child(3) { grid-column: 2; justify-self: start; }
  .mrow { grid-template-columns: minmax(0, 1fr) auto !important; }
  .mrow > :nth-child(3) { grid-column: 1 / -1; justify-self: start; }
  .cedit { flex-wrap: wrap !important; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .cedit .inp { flex: 1 1 120px; width: auto !important; }
  .ohead .row { width: 100%; }
  .modal { padding: 20px; border-radius: 18px; }
  .scrim { padding: 12px; align-items: flex-end; }
  .modal.wide, .modal { max-width: 100%; max-height: calc(100vh - 24px); }
  .cls-h .disc { width: 48px !important; height: 48px !important; border-radius: 13px !important; }
  .cls-h .h1 { font-size: 26px !important; }
  .cls-h > .btn { height: 36px; padding: 0 11px; font-size: 12px; }
  .dark-hero .h1 { font-size: 28px; }
  .days button { min-width: 74px; height: 50px; }
  .stats b { font-size: 24px; }
  .prof .av { width: 64px; height: 64px; font-size: 24px; }
  .card-h { padding: 12px 14px; font-size: 17px; }
  .list-row { padding: 10px 14px; }
  .lc-cur .who b { font-size: 16px; } .clk { font-size: 22px; }
  .tv .tvrow { grid-template-columns: 6vh 1fr auto; } .tv .tvrow > :nth-child(3) { display: none; }
  .tr .rk { font-size: 18px; }
}
@media (max-width: 720px) { .crow b.ell { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }

/* ---------- live video ---------- */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 18px; overflow: hidden; }
.player-in, .player-in iframe, .player-in video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-ov { position: absolute; inset: 0; pointer-events: none; }
.player-ov .ov { --ov-s: .62; }

/* ---------- broadcast overlay (OBS / vMix browser source, chroma key) ---------- */
html.overlay, html.overlay body { background: var(--key) !important; overflow: hidden; }
html.overlay #app { width: 100vw; height: 100vh; }
.ov { position: absolute; inset: 0; font-family: var(--ui); color: var(--ov-ink); font-size: calc(1.9vh * var(--ov-s)); -webkit-font-smoothing: antialiased; }
.ov * { box-shadow: none !important; text-shadow: none !important; }
.ov-brand { position: absolute; top: var(--ov-safe); right: var(--ov-safe); display: flex; align-items: center; gap: .5em; background: var(--ov-panel); padding: .45em .8em .45em .5em; border-radius: .5em; font-weight: 700; letter-spacing: .12em; font-size: 1.1em; }
.ov-brand svg { width: 1.8em; height: 1.8em; }
.ov-lt { position: absolute; left: var(--ov-safe); bottom: var(--ov-safe); min-width: 34em; max-width: 60vw; background: var(--ov-panel); border-radius: .6em; overflow: hidden; }
.ov-top .ov-lt { bottom: auto; top: var(--ov-safe); }
.ov-tag { background: var(--ov-acc); color: #0C1015; font-family: var(--mono); font-weight: 600; font-size: .78em; letter-spacing: .14em; padding: .45em .9em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-main { display: flex; align-items: center; gap: .9em; padding: .7em .9em; }
.ov-bib { min-width: 2.4em; height: 2.4em; padding: 0 .3em; border-radius: .4em; background: var(--ov-acc); color: #0C1015; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.3em; }
.ov-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ov-who b { font-size: 1.7em; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-who small { font-family: var(--mono); font-size: .85em; color: var(--ov-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-clk { font-family: var(--mono); font-weight: 600; font-size: 2.3em; color: var(--ov-acc); font-variant-numeric: tabular-nums; min-width: 4.2em; text-align: right; }
.ov-clk.over { color: #FF4D5E; }
.ov-clockonly { position: absolute; right: var(--ov-safe); bottom: var(--ov-safe); background: var(--ov-panel); border-radius: .6em; padding: .4em .9em; }
.ov-top .ov-clockonly { bottom: auto; top: var(--ov-safe); }
.ov-clockonly .ov-clk { font-size: 3.4em; }
.ov-board { position: absolute; right: var(--ov-safe); top: var(--ov-safe); width: 30em; background: var(--ov-panel); border-radius: .6em; overflow: hidden; }
.ov-board .ov-row { display: grid; grid-template-columns: 2.2em 1fr auto; gap: .7em; align-items: center; padding: .45em .9em; border-top: .08em solid rgba(138,144,134,.35); }
.ov-rk { font-weight: 700; font-size: 1.3em; color: var(--ov-acc); }
.ov-nm { font-weight: 700; font-size: 1.15em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; flex-direction: column; }
.ov-nm small { font-family: var(--mono); font-weight: 500; font-size: .7em; color: var(--ov-mute); }
.ov-sc { font-family: var(--mono); font-weight: 600; font-size: 1em; }
.ov-board:only-of-type, .ov-board ~ .ov-board { top: var(--ov-safe); }
.ov-full .ov-board { top: var(--ov-safe); }
.ov-ticker { position: absolute; left: 0; right: 0; bottom: var(--ov-safe); display: flex; background: var(--ov-panel); height: 2.6em; align-items: stretch; }
.ov-top .ov-ticker { bottom: auto; top: var(--ov-safe); }
.ov-tk-l { background: var(--ov-acc); color: #0C1015; font-weight: 700; display: flex; align-items: center; padding: 0 1em; white-space: nowrap; font-size: 1.05em; }
.ov-tk { flex: 1; overflow: hidden; display: flex; align-items: center; }
.ov-tk-in { display: inline-flex; gap: 2.5em; white-space: nowrap; padding-left: 100%; animation: ovtick 40s linear infinite; font-size: 1.1em; font-weight: 600; }
.ov-tk-in i { font-style: normal; font-family: var(--mono); color: var(--ov-acc); margin-left: .4em; }
@keyframes ovtick { to { transform: translateX(-100%); } }
.ovb-prev { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.ovb-prev iframe { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; }
.ovb-url { font-family: var(--mono); font-size: 12px; word-break: break-all; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.ov .ov-brand ~ .ov-board { top: calc(var(--ov-safe) + 3.6em); }
/* scene graphics: each one positioned on its own anchor */
.ovs .ov-g { position: absolute; color: var(--ov-ink); }
.ovs .ov-g.off { display: none; }
.ovs .ov-g.fade { display: block; transition: opacity .35s; } .ovs .ov-g.fade.off { opacity: 0; }
.ovs .sc { position: static !important; max-width: none; }
.ovs .ov-g .ov-lt { min-width: 30em; }
.ovs .ov-g .ov-board { width: 28em; }
.ovs .ov-g .ov-ticker { width: 100%; }
.ovc-g { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ovc-take { width: 92px; height: 44px; border-radius: 10px; border: 2px solid var(--line); background: var(--surf2); color: var(--mute); font-weight: 700; letter-spacing: .08em; }
.ovc-take.on { background: #FF4D5E; border-color: #FF4D5E; color: #fff; }
.ovc-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; grid-column: 1 / -1; }
.ovc-set label { display: flex; flex-direction: column; gap: 3px; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--mute); }
.ovc-set .inp { height: 34px; font-size: 13px; padding: 0 8px; }
