/* Kona Ice — Territory Command v7.4 · the wall TV (cycle 14, ruling 10)
   A fixed 1920×1080 composition read from ten feet: nothing under 28 px, 48 px side / 27 px top-bottom safe margins,
   the clock in a fixed cell so no text can push it, no map, no timeline, no crew list, no bay headers.
   Evidence: design/loop/cycle-14/ux/gate1-ux-audit.md findings 8, 9, 16; research: tvOS 23–29 pt, Fire TV ≥ 28 px, 5 % margins. */
body.tv{ --tvfs:28px; --tvh:34px; overflow:hidden; }
body.tv #app{ display:grid; box-sizing:border-box; height:100vh; width:100vw; padding:27px 96px; /* cycle 21: side margins doubled to the inner 90 % (TV panels overscan; was 48px). Top and bottom stay 27 px: review 21 measured that 54 px there clips the Needs-a-look list and the strips on a busy day with an alert showing. */ gap:14px 24px;
  grid-template-columns:minmax(0,31fr) minmax(0,31fr) minmax(0,38fr); grid-template-rows:100px minmax(0,1fr) 170px;
  grid-template-areas:"brand brand clock" "trucks trucks side" "give strip strip"; }
/* review 15 css 16: an alert is a fourth row, not a fixed overlay over the season number; the row (and its 14 px gap) exists only while an alert shows,
   so the quiet wall does not shift. :has(> …) checks #app's direct children only. */
@supports selector(:has(*)){ body.tv #app:has(> .alerts:not([hidden])){ grid-template-rows:100px minmax(0,1fr) 170px auto; grid-template-areas:"brand brand clock" "trucks trucks side" "give strip strip" "alerts alerts alerts"; } } @supports not selector(:has(*)){ body.tv #app > .alerts:not([hidden]){ position:fixed; left:96px; right:96px; bottom:27px; z-index:5; } } /* gate review 10: an old wall browser falls back to the overlay */
/* the wrappers between #app and the pieces we place become transparent */
body.tv header, body.tv header .clock, body.tv main, body.tv aside, body.tv #pane-today, body.tv #pane-today .scroll{ display:contents !important; }
/* everything not placed is not on the wall */
body.tv header > *:not(.brand):not(.clock), body.tv .clock > *:not(#clock):not(#today):not(#tvGive),
body.tv main > *:not(aside), body.tv aside > *:not(#pane-today), body.tv #pane-today > *:not(.scroll),
body.tv #pane-today .scroll > *:not(#bays):not(#tvSide):not(#tvStrip):not(#yardline),
body.tv #app > *:not(header):not(main):not(.alerts){ display:none !important; }
body.tv .alerts[hidden]{ display:none !important; } body.tv #app > .alerts:not([hidden]){ display:block !important; grid-area:alerts; position:static; min-width:0; font-size:var(--tvfs); line-height:1.2; padding:12px 24px; border-radius:10px; border-bottom:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } /* review 15 css 16 */
/* row 1 */
body.tv .brand{ grid-area:brand; display:flex; flex-direction:column; justify-content:center; min-width:0; }
body.tv .brand .bw{ font-size:var(--tvfs); color:var(--muted); } body.tv .brand h1{ font-size:44px; line-height:1.05; margin:0; }
body.tv .brand .sub{ display:none; }
body.tv #clock{ grid-area:clock; justify-self:end; align-self:start; width:360px; text-align:right; font-size:72px; line-height:1; white-space:nowrap; }
body.tv #today{ grid-area:clock; justify-self:end; align-self:end; width:360px; text-align:right; font-size:var(--tvfs); color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* row 2 left: the trucks */
body.tv #bays{ grid-area:trucks; min-height:0; overflow:hidden; display:flex; flex-direction:column; gap:10px; }
body.tv #bays .bay{ margin:0; display:contents; } body.tv #bays .bay h4, body.tv #bays .bay-h{ display:none !important; } body.tv #bays .strips{ display:contents; }
body.tv #bays li.strip{ margin:0; min-height:0; max-height:118px; padding:6px 10px; grid-template-columns:230px 210px minmax(0,1fr) 150px; grid-template-rows:auto auto; grid-template-areas:"cs win site usd" "cs win notes usd"; align-items:start; border-radius:10px; overflow:hidden; }
body.tv #bays li.strip > .cs, body.tv #bays li.strip > .win, body.tv #bays li.strip > .usd{ align-self:center; }
body.tv #bays li.strip > div{ padding:4px 10px; border-left:0; background:none; min-width:0; }
body.tv .strip .acts, body.tv .strip .st-chips, body.tv .strip .con{ display:none !important; }
body.tv .cs b{ font-size:var(--tvh) !important; } body.tv .cs small{ font-size:var(--tvfs) !important; margin-top:2px; display:block; }
body.tv .cs .mystate{ font-size:var(--tvfs); }
body.tv .win b{ font-size:var(--tvh) !important; } body.tv .win small{ font-size:var(--tvfs) !important; display:inline; margin-left:6px; }
body.tv .win .bar{ position:relative; height:6px; margin-top:6px; } /* cycle 17 G (F10): static made the elapsed fill (.bar i, absolute) size itself against the whole cell — a 36×106 block over the time */ body.tv .win .chip{ position:static; display:inline-block; font-size:var(--tvfs); padding:2px 10px; margin-top:4px; }
body.tv .site{ padding-bottom:0 !important; } body.tv .site b{ font-size:var(--tvh) !important; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; } body.tv .site small{ font-size:var(--tvfs) !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; line-height:1.15; }
body.tv .site > :not(b):not(small){ display:none !important; }
body.tv .notes{ font-size:var(--tvfs) !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:0 10px 2px !important; position:static; line-height:1.2; display:block; }
body.tv .notes > *{ display:inline !important; font-size:var(--tvfs) !important; white-space:nowrap; } body.tv .notes > .txt + .txt::before{ content:" · "; color:var(--muted); }
body.tv .notes .stamp, body.tv .win .stamp{ position:static; display:inline-block; margin:0 10px 0 0; font-size:var(--tvfs); transform:none; padding:2px 10px; }
body.tv .usd{ font-size:32px !important; text-align:right; padding-top:0 !important; }
body.tv .skip, body.tv #toast, body.tv .toast, body.tv #msgBanner{ display:none !important; } body.tv #app > header, body.tv #app > main{ display:contents !important; }
body.tv .strip.cocked{ transform:none; box-shadow:inset 8px 0 0 var(--red); }
body.tv .strip.idle{ display:none !important; }
body.tv #yardline{ grid-area:trucks; align-self:end; justify-self:start; font-size:var(--tvh); color:var(--muted); padding:0 10px 6px; pointer-events:none; }
body.tv #yardline{ display:block; } /* review 15 css 26: the :has() branch was redundant with this selector and re-evaluated on every #bays redraw */
/* row 2 right: Next up, then Needs a look */
body.tv #tvSide{ grid-area:side; min-height:0; overflow:hidden; display:flex; flex-direction:column; gap:6px; } body.tv #tvSide > *{ order:0 !important; }
body.tv #tvSide h3{ font-size:var(--tvfs) !important; margin:0; color:var(--muted); letter-spacing:0; text-transform:none; }
body.tv #tvSide ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
body.tv #tvSide li.row{ display:grid; grid-template-columns:150px minmax(0,1fr); gap:0 14px; align-items:start; padding:8px 14px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
body.tv #tvSide li.row .when{ font-size:32px !important; min-width:0; } body.tv #tvSide li.row .when small{ font-size:var(--tvfs) !important; display:block; }
body.tv #tvSide li.row .what .wx, body.tv #tvSide li.row .what .risk, body.tv #tvSide li.row .what .chip{ font-size:var(--tvfs) !important; padding:2px 8px; font-family:Inter, sans-serif !important; letter-spacing:0; text-transform:none; } body.tv #tvSide li.row .what .risk.unknown{ display:none !important; } /* cycle 17 G: a forecast still loading is not news on the wall */ body.tv #tvSide li.row .what .wx span:nth-child(n+2){ display:none; }
body.tv #tvSide li.row .what b{ font-size:32px; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.tv #tvSide li.row .what .meta, body.tv #tvSide li.row .what i, body.tv #tvSide li.row .what small{ font-size:var(--tvfs) !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
body.tv #tvSide li.row .what button, body.tv #tvSide li.row .x, body.tv #tvSide li.row .row-btns, body.tv #tvSide li.row .loc{ display:none !important; }
body.tv #tvSide li.empty, body.tv #tvSide li.more{ font-size:var(--tvfs) !important; color:var(--muted); padding:2px 14px; line-height:1.2; } body.tv #tvSide li.empty > :not(:first-child), body.tv #tvSide li.empty ul{ display:none; } body.tv #tvSide li.empty *{ font-size:var(--tvfs) !important; letter-spacing:0 !important; text-transform:none !important; }
body.tv #tvSide li.attn{ display:grid; grid-template-columns:minmax(0,1fr); padding:10px 14px; border:1px solid var(--line); border-radius:10px; }
body.tv #tvSide li.attn .what{ font-size:32px !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } body.tv #tvSide li.attn .meta{ font-size:var(--tvfs) !important; }
body.tv #tvSide li.attn .btn, body.tv #tvSide li.attn .attn-acts{ display:none !important; }
body.tv #tvSide #attention[hidden]{ display:none; }
/* cycle 17 G: the Next-up cap is set by faces.tvChrome() (3–5 rows by trucks out); the fixed nth-child(n+4) rule is gone */
/* row 3: the season number and the 14-day strip */
body.tv #tvGive{ grid-area:give; display:block !important; align-self:center; font-size:var(--tvh); color:var(--muted); line-height:1.15; }
body.tv #tvGive b, body.tv #tvGive .n{ display:block; font-size:64px; color:var(--ink); line-height:1; margin-top:4px; }
body.tv #tvStrip{ grid-area:strip; align-self:end; margin:0; padding:0; max-height:170px; overflow:hidden; }
body.tv #tvStrip > b{ display:inline-block; font-size:var(--tvfs) !important; color:var(--muted); font-weight:600; letter-spacing:0; text-transform:none; margin:0 16px 6px 0; }
body.tv #tvStrip .ts-row{ display:grid; grid-template-columns:repeat(14,minmax(0,1fr)); gap:6px; }
body.tv #tvStrip .ts-d{ min-height:72px; padding:4px 4px; border:1px solid var(--line); border-radius:8px; text-align:center; display:flex; flex-direction:column; justify-content:center; gap:2px; }
body.tv #tvStrip .ts-d > *{ font-size:var(--tvfs) !important; line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; } body.tv #tvStrip .ts-d b{ font-size:32px !important; } body.tv #tvStrip .ts-d small{ font-size:24px !important; } /* the one caption under 28 px — tvOS caption 23 pt; a $ figure in an 84 px cell */
body.tv #tvStrip .ts-d.rest, body.tv #tvStrip .ts-d.rest *{ opacity:1 !important; color:var(--muted) !important; } body.tv #tvStrip .ts-d i{ color:var(--muted) !important; }
body.tv #tvStrip .ts-empty{ display:inline; font-size:var(--tvfs) !important; color:var(--muted); font-style:normal; }
body.tv .subhead, body.tv .oneline, body.tv .oneline-today{ display:none !important; }
/* stamps on the wall: inline, white ground, never over the text; the timer cell keeps to itself */
body.tv .strip .stamp{ position:static !important; transform:none !important; display:inline-block !important; vertical-align:middle; margin:0 8px 0 12px !important; font-size:var(--tvfs) !important; padding:2px 10px !important; line-height:1.2; }
body.tv .strip .win .stamp{ display:none !important; } body.tv .strip > .win{ overflow:hidden; }
body.tv #tvStrip .ts-d{ padding:4px 2px; } body.tv #tvStrip .ts-d small{ letter-spacing:-0.02em; }
/* cycle 21: inside the 90 % safe area each day cell is 5 px narrower — tighter gap and no side padding keep "$3,000" and "6 open" whole */
body.tv #tvStrip .ts-row{ gap:4px; } body.tv #tvStrip .ts-d{ padding:4px 0; } body.tv #tvStrip .ts-d small{ letter-spacing:-0.03em; }
 body.tv #tvSide #attention{ overflow:hidden; } body.tv #tvSide li.tv-hide{ display:none !important; } body.tv #tvSide li.more{ display:block !important; }
