:root{
  --bg:#050505;
  --panel:#0f0f0f;
  --panel-2:#151515;
  --line:#303030;
  --text:#f7f7f7;
  --muted:#9fa4a8;
  --red:#df1421;
  --gold:#d3a81e;
  --green:#24d16d;
}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden;background:var(--bg)}
body{font-family:"Kanit",Arial,Helvetica,sans-serif;color:var(--text)}
.screen-stage{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    repeating-linear-gradient(135deg,rgba(255,255,255,.018) 0,rgba(255,255,255,.018) 2px,transparent 2px,transparent 15px),
    radial-gradient(circle at 18% -10%,rgba(223,20,33,.12),transparent 31%),
    #050505;
}
.live-board{
  width:1920px;
  height:1080px;
  flex:0 0 1920px;
  transform-origin:center center;
  display:grid;
  grid-template-rows:112px minmax(0,1fr) 34px;
  gap:10px;
  padding:18px 20px 12px;
}
.hidden{display:none!important}

.board-header{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
  padding:0 8px 14px;
  border-bottom:4px solid var(--red);
  position:relative;
}
.board-header::after{content:"";position:absolute;left:8px;bottom:-4px;width:280px;height:4px;background:var(--gold)}
.brand-block{display:flex;align-items:center;gap:24px;min-width:0}
.brand-copy p{margin:0 0 2px;color:var(--gold);font-size:15px;font-weight:800;font-style:italic;letter-spacing:.13em}
.brand-copy h1{margin:0;color:#fff;font-size:44px;line-height:.94;font-weight:800;font-style:italic;letter-spacing:.01em;text-transform:uppercase}
.board-logo{width:148px;max-height:62px;object-fit:contain}
.live-meta{display:grid;justify-items:end;gap:6px;text-transform:uppercase}
.status-line{display:flex;align-items:center;justify-content:flex-end;gap:15px}
.live-meta strong{font-size:21px;letter-spacing:.025em}
.live-meta>span{color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.06em}
.live-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border:1px solid rgba(36,209,109,.55);border-radius:999px;color:#aaffca;background:rgba(36,209,109,.08);font-size:13px;font-weight:800;letter-spacing:.08em}
.live-dot{width:9px;height:9px;border-radius:50%;background:var(--green);box-shadow:0 0 12px rgba(36,209,109,.7);animation:pulse 1.5s infinite}
@keyframes pulse{50%{opacity:.4}}

.empty-state{display:grid;place-items:center;border:1px solid #2a2a2a;border-left:6px solid var(--gold);background:linear-gradient(135deg,#111,#090909)}
.empty-state div{max-width:930px;text-align:center;padding:44px}
.empty-kicker{display:block;margin-bottom:10px;color:var(--gold)!important;font-size:17px!important;font-weight:800!important;font-style:italic;letter-spacing:.12em!important}
.empty-state strong{display:block;font-size:46px;font-style:italic;line-height:1;text-transform:uppercase}
.empty-state span:last-child{display:block;margin-top:16px;color:var(--muted);font-size:21px;line-height:1.45}

.all-rounds{
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-columns:repeat(var(--round-count,5),minmax(0,1fr));
  gap:9px;
}
.round-column{
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-rows:42px minmax(0,1fr);
  gap:6px;
}
.round-head{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 11px;
  background:var(--red);
  border-bottom:3px solid var(--gold);
}
.round-head strong{font-size:20px;font-weight:800;font-style:italic;letter-spacing:.035em;white-space:nowrap}
.round-head span{font-size:9px;font-weight:700;letter-spacing:.055em;opacity:.85;white-space:nowrap}
.round-heats{
  min-height:0;
  display:grid;
  grid-template-rows:repeat(6,minmax(0,1fr));
  gap:6px;
}
.heat-card{
  min-width:0;
  min-height:0;
  overflow:hidden;
  border:1px solid #2c2c2c;
  border-left:3px solid var(--gold);
  background:linear-gradient(180deg,#141414,#0c0c0c);
  display:grid;
  grid-template-rows:25px minmax(0,1fr);
}
.heat-head{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  padding:0 8px;
  border-bottom:1px solid #2c2c2c;
  background:#0d0d0d;
}
.heat-head strong{font-size:13px;font-weight:800;font-style:italic;letter-spacing:.025em;white-space:nowrap}
.heat-head span{color:var(--muted);font-size:8px;font-weight:700;letter-spacing:.05em;white-space:nowrap}
.heat-members{
  min-height:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(var(--member-rows,6),minmax(0,1fr));
  grid-auto-flow:column;
  overflow:hidden;
  padding:2px 4px 3px;
}
.member{
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-columns:27px minmax(0,1fr);
  align-items:center;
  gap:4px;
  padding:0 4px 0 2px;
  border-bottom:1px solid rgba(255,255,255,.045);
  overflow:hidden;
}
.member:nth-child(n+7){border-left:1px solid rgba(255,255,255,.065);padding-left:5px}
.member-number{
  display:grid;
  place-items:center;
  width:24px;
  height:18px;
  border:1px solid #414141;
  background:#090909;
  color:var(--gold);
  font-size:9px;
  line-height:1;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.member-value{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#fff;
  font-size:13px;
  line-height:1;
  font-weight:700;
  letter-spacing:0;
}
.member.number-only .member-number{border-color:rgba(211,168,30,.7);background:rgba(211,168,30,.08)}
.member.number-only .member-value{color:#777}
.member.assigned .member-number{color:#fff}

.board-footer{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:0 8px;color:#858b8f;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase}
.board-footer strong{color:#d8d8d8;font-size:11px;font-weight:800}
.board-footer span:last-child{text-align:right}
@media (prefers-reduced-motion:reduce){.live-dot{animation:none}}
