/* RVP OPS office TV wall (W1). A 1920×1080 design box, scaled to the screen with a ±4 px burn-in shift.
 * Every piece of text is one line with an ellipsis or clamped (two lines for titles); nothing a director
 * reads is under 21 px; a shape sits beside every coloured mark; fonts are the system's (no CDN). */
:root { --bg:#0d1117; --panel:#161b22; --line:#30363d; --text:#e6edf3; --muted:#9aa4af;
        --red:#ff6b61; --amber:#e3b341; --green:#3fb950; --grey:#6e7681; --focus:#58a6ff; }
html, body { margin:0; height:100%; background:#000; overflow:hidden; cursor:none; }
#stage { position:absolute; left:0; top:0; width:1920px; height:1080px; box-sizing:border-box; padding:24px;
         background:var(--bg); color:var(--text); transform-origin:0 0; overflow:hidden;
         font:24px/1.25 system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
#stage.mode-night { filter:brightness(.55); }
#stage.mode-night.nodim { filter:none; }
#banner { flex:1; text-align:center; color:var(--amber); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vgrid.three.away { grid-template-rows:44px minmax(0,1fr); }
.vgrid.three.away .awayline { grid-column:1 / -1; font-size:26px; color:var(--amber); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#demo { position:absolute; left:0; right:0; top:0; height:24px; background:#7d4e00; color:#fff; font-size:21px; line-height:24px;
        text-align:center; font-weight:700; letter-spacing:.08em; z-index:5; }
#head { height:110px; display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; grid-template-rows:62px 40px; column-gap:24px;
        align-items:center; border-bottom:6px solid var(--line); box-sizing:border-box; }
#stage.mode-escalated #head { border-bottom-color:var(--red); background:linear-gradient(#3a0f0f, transparent); }
#stage.mode-clear #head { border-bottom-color:var(--green); }
#headline { grid-column:1; grid-row:1; font-size:44px; font-weight:700; }
#headsub { grid-column:1; grid-row:2; font-size:26px; color:var(--muted); }
#headqr { grid-column:2; grid-row:1 / span 2; height:100px; }
#headqr .qr { display:block; }
#mode { grid-column:3; grid-row:1 / span 2; font-size:26px; color:var(--muted); white-space:nowrap; }
#clock { grid-column:4; grid-row:1 / span 2; font-size:40px; font-weight:700; white-space:nowrap; }
#board { display:grid; grid-template-columns:620px minmax(0,1fr) 560px; gap:24px; margin-top:16px; height:866px; overflow:hidden; }
#checked.stale { color:var(--amber); font-weight:700; }
#foot { position:absolute; left:24px; right:24px; bottom:14px; height:28px; display:flex; justify-content:space-between; font-size:21px; color:var(--muted); }
.col { min-width:0; overflow:hidden; display:flex; flex-direction:column; }
.title { height:44px; flex:none; font-size:26px; font-weight:700; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; unicode-bidi:isolate; }
.t { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; unicode-bidi:isolate; }
.item { flex:none; display:flex; align-items:center; gap:10px; padding:0 10px; box-sizing:border-box; border-radius:6px; border:4px solid transparent; height:36px; }
.item > .t { flex:1; }
.attention .item { height:90px; align-items:flex-start; padding-top:6px; }
.item .body { flex:1; min-width:0; }
.attention .item .t { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; white-space:normal; overflow-wrap:anywhere; font-size:24px; line-height:28px; max-height:56px; }
.own { display:block; font-size:21px; line-height:26px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; unicode-bidi:isolate; }
.unowned .own { color:var(--red); font-weight:700; }
.word { flex:none; width:96px; font-size:21px; font-weight:700; }
.red .word { color:var(--red); } .amber .word { color:var(--amber); }
.age, .val { flex:none; color:var(--muted); font-size:21px; max-width:200px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; unicode-bidi:isolate; }
.item.focus, .store.focus { border-color:var(--focus); box-shadow:0 0 0 4px var(--focus) inset; }
.more { flex:none; height:34px; color:var(--muted); font-size:21px; padding-left:14px; }
.shape { flex:none; display:inline-block; width:18px; height:18px; margin-top:4px; }
.shape.diamond { background:var(--red); transform:rotate(45deg) scale(.8); }
.shape.triangle { width:0; height:0; border-left:10px solid transparent; border-right:10px solid transparent; border-bottom:18px solid var(--amber); }
.shape.circle { border-radius:50%; background:var(--grey); }
.map { flex:none; height:604px; display:flex; flex-direction:column; }
.map svg { width:620px; height:560px; background:#0b1520; border-radius:8px; }
.map .place { fill:#c9d1d9; } .map .pl { fill:#c9d1d9; font-size:38px; }   /* 38 of 1000 on a 560 px map: 21 px on the wall */
.map .tk.red { fill:var(--red); } .map .tk.amber { fill:var(--amber); } .map .tk.grey { fill:var(--grey); }
.map .tl { font-size:38px; font-weight:700; paint-order:stroke; stroke:#0b1520; stroke-width:4px; } .map .tl.red { fill:var(--red); } .map .tl.amber { fill:var(--amber); }
.legend { height:42px; display:flex; align-items:center; gap:8px; font-size:21px; color:var(--muted); white-space:nowrap; overflow:hidden; }
.legend .n { margin-right:10px; flex:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; }
.legend .n.last { flex:1 1 auto; min-width:0; max-width:none; }
.stages { flex:none; }
.stagerow { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:4px 12px; }
.stage { min-width:0; }
.stage .big { font-size:40px; font-weight:700; line-height:46px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stage .lbl { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:21px; line-height:24px; max-height:48px; color:var(--muted); overflow-wrap:normal; word-break:normal; hyphens:none; }
.stores, .checks, .position { flex:none; display:flex; flex-direction:column; }
.store { flex:none; height:92px; box-sizing:border-box; padding:0 6px; border:4px solid transparent; border-radius:6px; }
.srow { display:flex; gap:10px; height:30px; align-items:center; }
.srow .t { flex:1; font-weight:700; }
.bar { height:8px; margin:1px 0; background:var(--line); border-radius:5px; overflow:hidden; }
.bar .fill { height:8px; background:var(--green); } .bar .fill.full { background:var(--red); }
.store .sub, .position .sub { display:block; font-size:21px; line-height:26px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.srow .flagtxt { color:var(--amber); max-width:260px; }
.checks .item.red .t, .checks .item.red .val { color:var(--red); font-weight:700; }
/* W2: the five views (full screen) and the detail panel */
#overlay { position:absolute; inset:0; background:var(--bg); padding:24px; box-sizing:border-box; overflow:hidden; z-index:3; }
.vhead { height:64px; display:flex; align-items:center; gap:24px; border-bottom:4px solid var(--line); margin-bottom:16px; }
.vhead h1 { margin:0; flex:1; min-width:0; font-size:40px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vhead .hint { flex:none; font-size:21px; color:var(--muted); white-space:nowrap; }
.vgrid { display:grid; gap:24px; height:928px; overflow:hidden; }
.vgrid.map2 { grid-template-columns:960px minmax(0,1fr); }
.vgrid.cards { grid-template-columns:repeat(3, minmax(0,1fr)); grid-template-rows:repeat(2, 452px); }
.vgrid.moving { grid-template-columns:minmax(0,1fr) 520px; }
.vgrid.three { grid-template-columns:repeat(3, minmax(0,1fr)); }
.vgrid.two { grid-template-columns:repeat(2, minmax(0,1fr)); height:auto; }
.vcol { min-width:0; overflow:hidden; display:flex; flex-direction:column; }
.vsec { flex:none; display:flex; flex-direction:column; margin-bottom:12px; }
.vmap .map { height:880px; } .vmap .map svg { width:900px; height:830px; }
.card { min-width:0; overflow:hidden; background:var(--panel); border:4px solid var(--line); border-radius:10px; padding:10px 14px; box-sizing:border-box; display:flex; flex-direction:column; gap:2px; }
.card.focus { border-color:var(--focus); }
.card .sub, .vsec .sub, .vweek > .sub { display:block; font-size:21px; line-height:28px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:none; }
.mrow { flex:none; height:52px; box-sizing:border-box; display:grid; grid-template-columns:22px 170px minmax(0,1.4fr) 110px minmax(0,1.3fr) 150px 140px minmax(0,1fr); gap:10px; align-items:center; padding:0 8px; border:4px solid transparent; border-radius:6px; }
.mrow.head { height:40px; color:var(--muted); font-size:21px; }
.mrow .c { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:22px; }
.mrow .c.b { font-weight:700; }
.mrow.red .c.b { color:var(--red); } .mrow.amber .c.b { color:var(--amber); }
.mrow.focus { border-color:var(--focus); box-shadow:0 0 0 4px var(--focus) inset; }
.bignum { font-size:64px; font-weight:700; line-height:76px; flex:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vweek { display:flex; flex-direction:column; gap:16px; height:928px; overflow:hidden; }
.tiles { display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); gap:16px; flex:none; }
.tile { min-width:0; background:var(--panel); border-radius:10px; padding:12px; overflow:hidden; }
.tile .lbl { display:block; font-size:21px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tile .bignum { font-size:48px; line-height:60px; }
.tile .sub { display:block; font-size:21px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bars { height:300px; display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); gap:16px; align-items:end; flex:none; }
.barc { height:300px; display:flex; flex-direction:column; justify-content:flex-end; min-width:0; }
.barc .barf { background:var(--green); border-radius:6px 6px 0 0; min-height:2px; }
.barc .v, .barc .lbl { display:block; text-align:center; font-size:21px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.barc .lbl { color:var(--muted); }
#panel { position:absolute; inset:100px 200px; background:var(--panel); border:4px solid var(--focus); border-radius:12px; padding:32px; box-sizing:border-box; overflow:hidden; z-index:6; display:flex; gap:32px; }
#panel .pmain { flex:1; min-width:0; overflow:hidden; display:flex; flex-direction:column; gap:4px; }
#panel h1 { margin:0 0 8px; font-size:44px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; unicode-bidi:isolate; flex:none; }
#panel .pl { display:block; flex:none; font-size:26px; line-height:34px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; unicode-bidi:isolate; }
#panel .pl .k { color:var(--muted); }
#panel .tri { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:16px; margin:8px 0; flex:none; }
#panel .tc .k { display:block; font-size:21px; color:var(--muted); }
#panel .tc .v { display:block; font-size:26px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#panel .pmark { flex:none; width:22px; font-size:22px; }
#panel .item.ok .pmark { color:var(--green); } #panel .item.amber .pmark { color:var(--amber); } #panel .item.red .pmark { color:var(--red); }
#panel .pqr { flex:none; width:280px; display:flex; flex-direction:column; align-items:center; gap:8px; }
#panel .pqr .sub { font-size:21px; color:var(--muted); white-space:nowrap; }
#panel .hint { position:absolute; bottom:12px; right:28px; color:var(--muted); font-size:21px; }
.rowqr { flex:none; margin-left:6px; }
#pairing { position:absolute; inset:0; background:var(--bg); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:24px; z-index:8; }
#pairing h1 { margin:0; font-size:56px; }
#pairing .hint2 { font-size:28px; color:var(--muted); max-width:1200px; text-align:center; }
#pairing .code { font:700 72px/1 ui-monospace, monospace; letter-spacing:.2em; }
#pairing .keys { display:grid; grid-template-columns:repeat(5, 140px); gap:16px; }
#pairing .key { height:110px; display:flex; align-items:center; justify-content:center; font-family:inherit; font-weight:700; font-size:48px; line-height:1; color:inherit; background:var(--panel); border:4px solid var(--line); border-radius:12px; padding:0; margin:0; cursor:pointer; outline:none; -webkit-tap-highlight-color:transparent; }
#pairing .key.on, #pairing .key:focus { border-color:var(--focus); box-shadow:0 0 0 6px var(--focus); }
#stage:focus { outline:none; }
#diag { position:fixed; left:0; right:0; bottom:0; z-index:99; font:20px/1.3 ui-monospace, monospace; color:#fff; background:rgba(0,0,0,.75); padding:6px 12px; white-space:pre-wrap; }
#pairing .msg { font-size:30px; color:var(--amber); max-width:1200px; text-align:center; }
#notlive { position:absolute; inset:0; background:rgba(60,60,60,.92); color:#fff; display:flex; align-items:center; justify-content:center; font-size:72px; font-weight:700; z-index:9; }
[hidden] { display:none !important; }
