/* Shared broadcast look for the live display and the ceremony video. */

:root {
  --bg: #0b0d11;
  --panel: rgba(20, 23, 29, 0.86);
  --panel-2: rgba(32, 36, 44, 0.9);
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef0f4;
  --muted: #9aa1ad;
  --gold: #e9c86b;
  --gold-2: #b8913a;
  --neon: #5cf2ff;
  --alert: #ff4b3e;
  --ok: #6fe39a;
  --head: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--body); }

.stage {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden;
  transform-origin: 0 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(233, 200, 107, 0.10), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(92, 242, 255, 0.06), transparent 50%),
    var(--bg);
}

h1, h2, h3, .head { font-family: var(--head); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }

/* ---------- badge: faction icon on system texture ---------- */
.badge {
  --s: 64px;
  position: relative; flex: none; width: var(--s); height: var(--s);
  border-radius: 16%;
  background: var(--tex) center / 180% auto, #262a31;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.10), 0 2px 8px rgba(0, 0, 0, 0.6);
}
.badge.sys-old-world { border-radius: 50% 50% 16% 16%; }
.badge img { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.8)); }
.badge.painted {
  box-shadow: 0 0 0 3px var(--gold), 0 0 calc(var(--s) * 0.28) calc(var(--s) * 0.06) rgba(233, 200, 107, 0.7);
}
.live .badge.painted { animation: glow 2.6s ease-in-out infinite; }
@keyframes glow {
  50% { box-shadow: 0 0 0 3px #fff1c2, 0 0 calc(var(--s) * 0.45) calc(var(--s) * 0.12) rgba(233, 200, 107, 0.95); }
}
.badge-neutral { background: #1b1e24; }
.badge-neutral img { opacity: 0.75; filter: grayscale(1); }

/* ---------- player chip ---------- */
.chip { display: flex; align-items: center; gap: 14px; min-width: 0; max-width: 100%; }
.chip-text { min-width: 0; }
.chip-name { font-weight: 600; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-army { color: var(--muted); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.neutral-name { color: var(--muted); font-style: italic; }

/* ---------- panels & headings ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px 32px; }
.title-bar { display: flex; align-items: baseline; gap: 24px; margin-bottom: 20px; }
.title-bar h2 { font-size: 48px; color: var(--gold); }
.title-bar .sub { font-family: var(--head); font-size: 28px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.eyebrow { font-family: var(--head); color: var(--muted); letter-spacing: 0.3em; text-transform: uppercase; font-size: 22px; }

/* ---------- standings table ---------- */
/* fixed layout: the table never grows past its pane; long names ellipsise in .chip-name */
table.standings { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0 6px; }
.standings th { font-family: var(--head); font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-size: 18px; text-align: left; padding: 0 14px; }
.standings td { background: var(--panel-2); padding: 6px 14px; font-size: 24px; }
.standings td:first-child { border-radius: 10px 0 0 10px; }
.standings td:last-child { border-radius: 0 10px 10px 0; }
.standings .c-rank { width: 70px; text-align: center; font-family: var(--head); font-size: 30px; color: var(--gold); }
.standings .c-num { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
.standings .c-wins { color: var(--gold); font-weight: 800; }
.standings .c-army { width: 22%; color: var(--muted); font-size: 18px; }
.standings .c-army span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings.compact .c-rank { width: 56px; }
.standings.compact .c-num { width: 80px; }
.standings.compact { border-spacing: 0 4px; }
.standings.compact td { font-size: 20px; padding: 3px 12px; }
.standings.compact .chip-name { font-size: 20px; }
.standings.compact .c-rank { font-size: 24px; }
.standings tr.hl td { background: rgba(92, 242, 255, 0.14); }

/* ---------- table cards ---------- */
.table-card {
  position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) 52px minmax(0, 1fr); align-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px;
  transition: opacity 0.6s, filter 0.6s;
}
.tc-num { font-family: var(--head); font-size: 44px; color: var(--gold); text-align: center; line-height: 1; }
.tc-num span { display: block; font-size: 14px; letter-spacing: 0.25em; color: var(--muted); }
.tc-vs { color: var(--muted); font-family: var(--head); text-transform: uppercase; text-align: center; font-size: 18px; }
.tc-side { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.tc-side.won .chip-name { color: var(--gold); }
.tc-score { font-family: var(--head); font-size: 36px; font-variant-numeric: tabular-nums; }
.table-card.reported { opacity: 0.45; filter: saturate(0.3); }
.tc-check {
  position: absolute; right: -10px; top: -12px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ok); color: #06210f; font-size: 30px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 0 18px rgba(111, 227, 154, 0.6);
}

/* ---------- venue map ---------- */
/* Any columns × rows fits its box: tracks are minmax(0, 1fr) and cells are size
   containers, so their text scales with the cell (cqmin) instead of growing it. */
.venue-map {
  display: grid; gap: 12px; height: 100%; min-height: 0; min-width: 0;
  grid-template: 't t t' auto 'l g r' minmax(0, 1fr) 'b b b' auto / auto minmax(0, 1fr) auto;
}
.vm-side { display: flex; justify-content: center; gap: 12px; min-width: 0; min-height: 0; }
.vm-side-top { grid-area: t; }
.vm-side-bottom { grid-area: b; }
.vm-side-left { grid-area: l; flex-direction: column; }
.vm-side-right { grid-area: r; flex-direction: column; }
.vm-stage, .vm-entrance { text-align: center; font-family: var(--head); font-size: 18px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.vm-stage { flex: 1; letter-spacing: 0.6em; color: #111; background: linear-gradient(90deg, var(--gold-2), var(--gold), var(--gold-2)); }
.vm-entrance { flex: 0 0 auto; min-width: 26%; letter-spacing: 0.3em; color: var(--text); border: 2px dashed rgba(255, 255, 255, 0.55); }
.vm-side-left > *, .vm-side-right > * { writing-mode: vertical-rl; min-width: 0; min-height: 26%; padding: 10px 6px; }
.vm-side-left > .vm-stage { transform: rotate(180deg); }
.vm-grid { grid-area: g; display: grid; gap: 10px; min-width: 0; min-height: 0; }
.vm-cell {
  position: relative; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 0; min-height: 0; container-type: size;
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55)), var(--tex) center / cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.vm-cell.sys-old-world { border-radius: 22px; }
.vm-cell.sys-other { border-style: dashed; background: rgba(255, 255, 255, 0.03); }
.vm-empty { background: transparent; }
.vm-num { font-family: var(--head); font-size: clamp(12px, 34cqmin, 44px); line-height: 1; text-shadow: 0 2px 6px #000; }
.vm-sys { font-size: clamp(7px, 9cqmin, 13px); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.vm-label { font-family: var(--head); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-size: clamp(8px, 15cqmin, 22px); text-align: center; padding: 0 4px; overflow-wrap: anywhere; line-height: 1.1; }
.vm-hl { outline: 4px solid var(--neon); outline-offset: -4px; box-shadow: 0 0 22px rgba(92, 242, 255, 0.55); }
.vm-done { opacity: 0.45; }
.vm-mark { font-size: clamp(7px, 10cqmin, 14px); color: var(--text); text-align: center; padding: 0 6px; line-height: 1.2; max-width: 100%; overflow: hidden; }

/* ---------- schedule ---------- */
.schedule { list-style: none; display: grid; gap: 10px; }
.schedule li { display: flex; gap: 24px; font-size: 28px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.sch-time { font-family: var(--head); color: var(--gold); width: 100px; font-variant-numeric: tabular-nums; }
