:root {
  --bg: #07090c;
  --panel: #0f1318;
  --panel-2: #151a21;
  --line: #2a323d;
  --line-soft: #1d232b;
  --text: #f2f5f8;
  --text-2: #a4adb8;
  --text-3: #66717e;
  --accent: #36d27f;      /* NorthStar green accent */
  --ok: #33d17a;
  --warn: #f5a524;
  --alert: #ff4d4f;
  --muted: #3b82f6;
  --amber-seg: #f0a030;
  --seg-off: #232a33;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: var(--bg); overflow: hidden; }
body { font-family: Inter, system-ui, -apple-system, sans-serif; color: var(--text); -webkit-font-smoothing: antialiased; }

#stage {
  position: absolute; top: 0; left: 0;
  width: 1920px; height: 1080px;
  padding: 26px 28px 22px;
  display: flex; flex-direction: column; gap: 14px;
  transform-origin: 0 0;
  background: radial-gradient(1200px 500px at 30% 0%, #10161d 0%, var(--bg) 70%);
}

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1.5px solid var(--line);
  border-radius: 14px;
}

/* ---------------- top: teams + preview ---------------- */
.top { display: flex; gap: 16px; height: 282px; }
.teams { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2.85fr); grid-template-rows: minmax(0, 1fr); gap: 14px; min-height: 0; }
.team.schedule { overflow: hidden; min-height: 0; }
.sched-list { min-height: 0; }
.team { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.team-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #13261d; border: 1px solid #1f4a33; border-radius: 8px;
  padding: 6px 10px; font-size: 14px; font-weight: 700; color: #cfeedd;
}
.team-head .live { background: var(--accent); color: #04140b; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 5px; letter-spacing: .04em; }
.team-head.past { opacity: .45; }
.pos { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; gap: 8px; font-size: 15px; line-height: 1.25; }
.pos .r { color: var(--text-3); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-list { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 28px; row-gap: 3px; align-content: start; }
.sched-list { --sf: 17px; row-gap: calc(var(--sf) * .28); }
.schedule .pos { grid-template-columns: 5.6em 1fr; font-size: var(--sf); line-height: 1.25; gap: .5em; }
.schedule .pos .r { color: var(--text-2); font-family: var(--mono); font-size: 1em; font-weight: 500; letter-spacing: 0; text-transform: none; }
.schedule .pos.svc .n { font-weight: 800; }
.schedule .pos.svc .r { color: var(--text); font-weight: 700; }
.schedule .pos.past .r, .schedule .pos.past .n { color: var(--text-3); opacity: .55; }
.schedule .pos.upnext .r, .schedule .pos.upnext .n { color: var(--accent); opacity: 1; }
.pos .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.preview { width: 560px; overflow: hidden; position: relative; padding: 0; }
.preview img, .preview video, .preview iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.preview .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.6)),
    repeating-linear-gradient(90deg, #0d1218 0 60px, #0f151c 60px 120px);
  color: var(--text-3); font-size: 14px; letter-spacing: .14em; font-weight: 700;
}
.preview .tag { position: absolute; left: 12px; top: 10px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--text-2); background: rgba(0,0,0,.55); padding: 4px 8px; border-radius: 6px; }

/* ---------------- clock bar ---------------- */
.clockbar { display: flex; align-items: center; gap: 26px; height: 104px; padding: 0 6px; border-bottom: 1px solid var(--line-soft); }
.logo { height: 76px; width: 76px; flex: none; }
.clockwrap { display: flex; flex-direction: column; }
.clock { font-size: 78px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.clock small { font-size: 34px; font-weight: 600; margin-left: 10px; color: var(--text-2); }
.next { font-size: 14px; color: var(--text-2); margin-top: 6px; font-weight: 500; }
.next b { color: var(--text); font-weight: 700; }
.dateblock { display: flex; flex-direction: column; gap: 6px; }
.date { font-size: 26px; font-weight: 600; }
.service { font-size: 18px; font-weight: 800; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.countdown { margin-left: auto; display: flex; align-items: center; gap: 22px; max-width: 880px;
  padding: 10px 22px; border-radius: 14px; border: 1.5px solid #1f4a33; background: #0c1a13; }
.clock-title { min-width: 0; text-align: right; font-size: 38px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clock-title:not(.hidden) + .cd-main:not(.hidden) { padding-left: 22px; border-left: 1.5px solid rgba(255,255,255,.12); }
.cd-main { text-align: right; flex: none; }
.countdown.urgent { border-color: #6b2222; background: #1d0c0c; }
.countdown.urgent .cd-time { color: var(--alert); }
.cd-label { font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--text-2); }
.cd-time { font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1.05; }
.hidden { display: none !important; }

/* ---------------- mic strips ---------------- */
.mics { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.mics-head { display: flex; align-items: center; justify-content: space-between; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--text-2); }
.legend { display: flex; gap: 18px; font-size: 11px; font-weight: 700; color: var(--text-3); letter-spacing: .05em; align-items: center; }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); }
.dot.alert { background: var(--alert); } .dot.muted { background: var(--muted); }
.conn { color: var(--ok); }
.conn.down { color: var(--alert); }

.strips { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; min-height: 0; }
.col { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.col > .strip { flex: 1; min-height: 0; }
.col.stack > .strip { flex: 1 1 0; }
.strip.band .photo { min-height: 70px; }
.strip.band .who .name, .strip.mic-only .who .name { height: auto; min-height: 22px; }
.strip.mic-only .photo { min-height: 40px; }
.strip.mic-only .rfp.mic { height: auto; min-height: 0; }
.strip.mic-only .batt { margin-top: 2px; }
.strip.s-empty { opacity: .55; }
.photo.open { background: repeating-linear-gradient(135deg, #141a21 0 10px, #11161c 10px 20px); }
.photo.open .initials { font-size: 16px; letter-spacing: .14em; color: var(--text-3); }
.strip {
  display: flex; flex-direction: column; min-width: 0;
  background: linear-gradient(180deg, #141a21, #0d1116);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 6px; gap: 6px;
}
.photo {
  position: relative; flex: 1; min-height: 150px; border-radius: 9px; overflow: hidden;
  background: #1a2029; border: 2px solid transparent;
}
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.photo.has-photo .initials { display: none; }
.photo .initials { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; font-weight: 800; color: rgba(255,255,255,.85); }
.strip.s-ok .photo    { border-color: rgba(51,209,122,.55); }
.strip.s-warn .photo  { border-color: var(--warn); box-shadow: 0 0 18px rgba(245,165,36,.45); }
.strip.s-alert .photo { border-color: var(--alert); box-shadow: 0 0 22px rgba(255,77,79,.6); animation: pulse 1.6s ease-in-out infinite; }
.strip.s-muted .photo { border-color: var(--muted); box-shadow: 0 0 18px rgba(59,130,246,.5); }
@keyframes pulse { 50% { box-shadow: 0 0 6px rgba(255,77,79,.25); } }

.who { text-align: center; padding: 0 2px; }
.who .name { font-size: 16px; font-weight: 700; line-height: 1.1; height: 36px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.who .role { font-size: 13px; color: var(--text-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* RF panels — modeled on the Wireless Workbench channel strip */
.rfp { background: #090c10; border: 1px solid var(--line-soft); border-radius: 8px; padding: 6px 6px 7px; display: flex; flex-direction: column; gap: 5px; flex: none; }
.rfp.mic { height: 170px; }
.rfp.iem { height: 96px; }
.rfp.empty { opacity: .28; }
.rfp-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.kind { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--text-3); }
.kind-mic { color: var(--ok); }
.kind-iem { color: var(--warn); }
.rfp.empty .kind { color: var(--text-3); }
.txt { font-size: 10px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.chan { font-size: 15px; font-weight: 800; background: #1f2731; border-radius: 5px; padding: 3px 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rfp.iem .chan { background: #12302a; color: #bff3dc; }
.freq { font-family: var(--mono); font-size: 13px; color: var(--text-2); text-align: center; letter-spacing: .02em; }
.freq .mhz { font-size: 9px; color: var(--text-3); margin-left: 2px; }

.meter-row { display: grid; grid-template-columns: 22px 1fr 34px; align-items: center; gap: 4px; }
.meter-row .lbl { font-size: 9px; font-weight: 800; color: var(--text-3); letter-spacing: .04em; }
.meter-row .val { font-family: var(--mono); font-size: 10px; color: var(--text-2); text-align: right; }
.segs { display: grid; grid-auto-flow: column; gap: 2px; height: 9px; }
.seg { background: var(--seg-off); border-radius: 2px; }
.segs.rf .seg.on { background: var(--amber-seg); }
.segs.au .seg.on { background: var(--ok); }
.segs.au .seg.on.hot { background: var(--warn); }
.segs.au .seg.on.clip { background: var(--alert); }

.ant { display: flex; gap: 3px; justify-content: center; }
.ant span { font-size: 9px; font-weight: 800; width: 15px; height: 13px; border-radius: 3px; display: grid; place-items: center; background: var(--seg-off); color: var(--text-3); }
.ant span.on { background: var(--muted); color: #fff; }

.txrow { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.tx { font-size: 10.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.batt { display: flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--mono); font-size: 24px; font-weight: 700; margin-top: auto; line-height: 1; }
.batt-ico { position: relative; width: 40px; height: 20px; border: 2px solid var(--text-2); border-radius: 4px; padding: 2px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.batt-ico::after { content: ''; position: absolute; right: -6px; top: 5px; width: 3px; height: 6px; background: var(--text-2); border-radius: 0 2px 2px 0; }
.batt-ico i { background: transparent; border-radius: 1px; }
.batt-ico i.on { background: var(--ok); }
.batt.low .batt-ico i.on { background: var(--warn); }
.batt.crit .batt-ico i.on { background: var(--alert); }
.batt.low { color: var(--warn); } .batt.crit { color: var(--alert); }

.flag { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-align: center; border-radius: 4px; padding: 2px 0; }
.flag.alert { background: rgba(255,77,79,.18); color: var(--alert); }
.flag.muted { background: rgba(59,130,246,.2); color: #8fb6ff; }
.flag.ok { background: rgba(51,209,122,.12); color: var(--ok); }

.other { flex: none; text-align: center; font-size: 11px; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: 4px 2px; color: var(--text-2); }
.other b { display: block; font-size: 8.5px; letter-spacing: .1em; color: var(--text-3); }
.other.none { visibility: hidden; }
