/* TV board: "Roster" layout (one row per person) on the "Glass" background.
   Sized in rem (root scales with screen width) so it fits 1080p–4K. */
:root {
  --text: #eef2f8;
  --muted: #8d99b0;
  --faint: #5d6880;
  --line: rgba(255, 255, 255, 0.08);
  --in: #2fd29b;
  --out: #f0b145;
  --none: #333c50;
  font-size: clamp(11px, 0.9vw, 36px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  color: var(--text);
  background:
    radial-gradient(60rem 40rem at 8% 0%, rgba(0, 94, 228, 0.35), transparent 60%),
    radial-gradient(55rem 40rem at 100% 100%, rgba(1, 190, 153, 0.22), transparent 60%),
    #070b16;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  overflow: hidden;
  cursor: none;
}
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Header: logo | title ............ clock ---------- */
header { display: flex; justify-content: space-between; align-items: center; padding: 2.2rem 3rem 1.6rem; }
.brand { display: flex; align-items: center; gap: 1.6rem; min-width: 0; }
/* The wordmark's letters sit low in its box (the signal arc is above them): their cap-height
   center is 65.6% down. Shift the logo up 15.6% so the divider and title center on the letters. */
.logo { height: 4.2rem; width: auto; flex: none; display: block; transform: translateY(-15.6%); }
h1 {
  margin: 0; padding-left: 1.6rem; border-left: 2px solid rgba(255, 255, 255, 0.14);
  font-size: 2.4rem; font-weight: 650; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clock { text-align: right; flex: none; }
#time { font-size: 2.8rem; font-weight: 600; letter-spacing: -0.02em; }
.date { color: var(--muted); font-size: 1.05rem; margin-top: 0.15rem; display: flex; align-items: center; justify-content: flex-end; gap: 0.55rem; }
/* Shown only while the live-update connection is down (the board still refreshes every 60s). */
#conn { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--out); font-weight: 600; margin-right: 0.4rem; }
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--out); }

/* ---------- Roster ----------
   Sized in --u (= 1rem × --scale) so board.js can shrink just the roster for big teams. */
main {
  --u: calc(1rem * var(--scale, 1));
  display: grid;
  grid-template-rows: auto repeat(var(--rows, 6), minmax(0, 1fr));
  padding: 0 calc(3 * var(--u)) calc(2.6 * var(--u));
  min-height: 0;
}
.head, .row {
  display: grid;
  grid-template-columns: calc(0.5 * var(--u)) calc(6 * var(--u)) minmax(0, 1.25fr) minmax(0, 1.6fr) calc(11 * var(--u)) calc(11 * var(--u));
  align-items: center;
  gap: 0 calc(2 * var(--u));
}
.head {
  color: var(--faint); font-size: calc(0.85 * var(--u)); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  padding-bottom: calc(0.9 * var(--u)); border-bottom: 1px solid var(--line);
}
.row { border-bottom: 1px solid var(--line); min-height: 0; }
.bar { align-self: stretch; margin: calc(1.1 * var(--u)) 0; border-radius: calc(0.3 * var(--u)); background: var(--in); }
.out .bar { background: var(--out); }
.none .bar { background: var(--none); }

.avatar {
  width: calc(5 * var(--u)); height: calc(5 * var(--u)); border-radius: 50%; object-fit: cover; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.07); color: #b4bfd2; font-size: calc(1.6 * var(--u)); font-weight: 700;
}
.who { min-width: 0; }
.name { font-size: calc(2.1 * var(--u)); font-weight: 650; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title { color: var(--muted); font-size: calc(1.05 * var(--u)); margin-top: calc(0.15 * var(--u)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.loc {
  display: flex; align-items: center; gap: calc(1 * var(--u)); min-width: 0;
  font-size: calc(2.7 * var(--u)); font-weight: 750; letter-spacing: -0.025em;
}
.loc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc i { width: calc(1 * var(--u)); height: calc(1 * var(--u)); border-radius: calc(0.25 * var(--u)); background: var(--bc); flex: none; }
.out .loc { color: var(--out); }
.none .loc { color: #4a5368; font-weight: 600; }

.since { font-size: calc(1.9 * var(--u)); font-weight: 600; color: #c9d0dc; }
.dur {
  justify-self: start; font-size: calc(1.35 * var(--u)); font-weight: 600; color: #a9b8cf;
  padding: calc(0.45 * var(--u)) calc(1 * var(--u)); border-radius: calc(0.6 * var(--u));
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.06);
}
.none .since, .none .dur { visibility: hidden; }

.empty-board { grid-row: 2 / -1; align-self: center; text-align: center; color: var(--muted); font-size: calc(1.8 * var(--u)); }

#error {
  position: fixed; right: 2rem; bottom: 2rem;
  background: #5a1d1d; color: #ffdede; padding: 0.8rem 1.2rem; border-radius: 0.6rem; font-size: 1rem;
}
