/* stream.css - the Stream window (docs/stream/PLAN.md): the console's row of
   window tabs (#wintabs, painted by staff.html's paintWinTabs over the Stream
   window's own tabs and the Socials and Creators pages under it), the quieter
   second row a page under it keeps (Socials' Board / Posts / Setup), and the
   Stream tabs' own bits (app/stream.js, .st-): the records (stage B), and the
   Stream kit tab's cards, its form and the Home tab's kit block (stage C; the
   word panel there keeps its own .lfb-sr* styles in board.css), the
   pickup's bar on the Streamers tab (stage D), and the Setup guides tab's
   groups, the platform list and the Home tab's guide chips (stage E).
   The rest is the console's kit: system.css tokens, board.css's .lfd-page,
   .lfd-tabs and .lfb- panels, staff.html's .btn and .fchip. Every colour is a
   token, so light, dark and every skin work without a rule here.
   On a phone the tab row is one line that slides sideways (never wraps),
   each tab 44px tall, the one that is up scrolled into view by the console. */

/* ------------------------------------------------------- the window's row */
#wintabs{margin:2px 0 0}
#wintabs[hidden]{display:none}
#wintabs .wt-name{font:600 20px/1.2 var(--display);letter-spacing:-.01em;color:var(--ink);margin:4px 0 8px}
/* One line that slides on a phone, wrapping on a desk with a mouse: system.css "Tab rows". */
#wintabs .wt-row{position:relative;margin-top:0;margin-bottom:12px}
#wintabs .wt-row .fchip{flex:0 0 auto;white-space:nowrap;min-height:34px;padding:6px 14px;font-size:14px}
#wintabs .wt-row .fchip.on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface));color:var(--ink)}
@media (max-width:719px),(pointer:coarse){
  #wintabs .wt-row .fchip{min-height:44px}
}


/* ------------------------------------------------------- the Stream tabs */
#v-stream .st-pane[hidden]{display:none}
#v-stream .st-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:14px;align-items:stretch}
#v-stream [data-stnextbody]{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
#v-stream .st-next .st-when{font-size:clamp(28px,5vw,40px);line-height:1.1;overflow-wrap:anywhere}
#v-stream .lfb-slots span.st-up{border-color:var(--accent);color:var(--ink)}
#v-stream .st-line{margin:0;line-height:1.45;max-width:72ch}
#v-stream .st-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}
#v-stream .st-acts .btn{min-height:34px}
@media (max-width:719px),(pointer:coarse){
  #v-stream .st-acts .btn{min-height:44px}
}

/* ------------------------------------------- stage B: the records (314) */
/* On stream now: one line, a dot while a stream is on (the word says it too). */
.st-now,.st-tilenow{margin:0 0 6px;line-height:1.45;color:var(--ink);font-weight:500;overflow-wrap:anywhere}
.st-now{font-size:16px}
.st-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--crit);margin:0 8px 1px 0;vertical-align:middle;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--crit) 22%,transparent)}
.st-warn{color:var(--ink);border-left:3px solid var(--warn);padding:4px 0 4px 10px;background:color-mix(in srgb,var(--warn) 8%,transparent)}
#v-stream .st-homegrid{margin-bottom:14px}
#v-stream [data-stnowbody],#v-stream [data-ststatus]{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
#v-stream [data-stdown]{margin:0;color:var(--ink)}

/* The Streamers tab: the list and the streams side by side on a wide screen. */
#v-stream .st-cols{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin-top:14px;align-items:start}
@media (min-width:1100px){ #v-stream .st-cols{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr)} }
#v-stream .st-list{list-style:none;margin:0 0 10px;padding:0}
#v-stream .st-row{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;padding:10px 0;border-top:1px solid var(--line)}
#v-stream .st-list > .st-row:first-child{border-top:0}
#v-stream .st-rowmain{min-width:0;flex:1 1 auto}
#v-stream .st-rowhead{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline;color:var(--ink)}
#v-stream .st-rowsub{color:var(--ink2);font-size:13.5px;margin-top:2px;overflow-wrap:anywhere}
#v-stream .st-rownote{color:var(--ink3);font-size:13px;margin-top:2px;overflow-wrap:anywhere}
#v-stream .st-alias{color:var(--ink3);font-size:13px}
#v-stream .st-when2{font-family:var(--mono);font-size:13px;font-variant-numeric:tabular-nums}
#v-stream .st-len{font-family:var(--mono);font-size:12px;color:var(--ink3)}
#v-stream .st-how{color:var(--ink3)}
#v-stream .st-row .st-acts{flex:0 0 auto;margin-top:0;justify-content:flex-end}
#v-stream .st-ordhead{margin-bottom:10px}
#v-stream .st-ordundo{display:flex;align-items:center;gap:8px;margin:0 0 10px;color:var(--ink2)}
#v-stream .st-pill{font-family:var(--mono);font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;border-radius:4px;padding:1px 6px;
  border:1px solid var(--line);color:var(--ink2);background:var(--surface2)}
#v-stream .st-pilllive{color:var(--crit);border-color:color-mix(in srgb,var(--crit) 45%,var(--line));background:color-mix(in srgb,var(--crit) 10%,var(--surface))}
/* B1 (325): the Orders tab's marks. The word carries each state; the hue
   only backs it. Gold (the one accent) is the Ripped pill alone; the mark
   buttons stay neutral. */
#v-stream .st-pillgood{color:var(--good);border-color:color-mix(in srgb,var(--good) 45%,var(--line));background:color-mix(in srgb,var(--good) 10%,var(--surface))}
#v-stream .st-pillacc{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 45%,var(--line));background:color-mix(in srgb,var(--accent) 10%,var(--surface))}
#v-stream .st-pillwarn{color:var(--ink);border-color:color-mix(in srgb,var(--warn) 55%,var(--line));background:color-mix(in srgb,var(--warn) 14%,var(--surface))}
/* An order: its line and buttons side by side, its items folded out under
   both at full width (a phone stacks everything, below). */
#v-stream .st-ord{flex-wrap:wrap}
/* on a wide monitor the lists keep the 1280 wrap, so the buttons stay near what they mark */
#v-stream [data-stolist],#v-stream [data-stoearlier],#v-stream [data-stodonelist]{max-width:1280px}
#v-stream .st-ord > .st-acts{align-items:center}
#v-stream .st-ord .st-pill{align-self:center}
#v-stream .st-ordname{font-weight:600;overflow-wrap:anywhere}
#v-stream .st-orditems{flex:1 0 100%;align-self:stretch;min-width:0;margin:0;padding:0 0 0 12px;border-left:2px solid var(--line)}
#v-stream .st-orditems > .st-row{padding:8px 0}
#v-stream .st-orditems .st-acts{align-items:center}
#v-stream .st-qty{font-family:var(--mono);font-variant-numeric:tabular-nums}
#v-stream .st-ordgroup{margin:14px 0 4px;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--ink3)}
#v-stream .st-ordhint{margin:4px 0 10px;max-width:72ch}
#v-stream .st-orddone > summary{font-weight:500}
#v-stream .st-ordundo .btn{min-height:34px}
#v-stream .st-void .st-rowhead .st-when2,#v-stream .st-void .st-rowsub{text-decoration:line-through;color:var(--ink3)}
#v-stream .st-wait{box-shadow:inset 3px 0 0 var(--warn);padding-left:10px}
#v-stream .st-offrow{opacity:.75}
#v-stream .st-offlist{margin:4px 0 10px}
#v-stream .st-offlist > summary{cursor:pointer;color:var(--ink2);font-size:13.5px;min-height:34px;display:flex;align-items:center}

/* The forms: label above the box, two columns that stack on a phone. */
#v-stream .st-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px;margin:0 0 14px;padding:12px;
  border:1px solid var(--line);border-radius:var(--r);background:var(--surface2)}
#v-stream .st-formh{margin:0;font:600 15px/1.3 var(--display);color:var(--ink)}
#v-stream .st-field{display:grid;gap:6px;min-width:0;margin:0;padding:0;border:0}
#v-stream .st-field > legend{padding:0;margin:0 0 6px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink2)}
#v-stream .st-wide{grid-column:1 / -1}
#v-stream .st-opt{font-weight:400;text-transform:none;letter-spacing:0;color:var(--ink3)}
#v-stream .st-field select,#v-stream .st-field input{width:100%;min-height:36px;margin:0}
#v-stream .st-check{display:flex;align-items:center;gap:8px;text-transform:none;letter-spacing:0;font-weight:500;font-size:14px;cursor:pointer;color:var(--ink)}
#v-stream .st-check input[type=checkbox]{width:auto;min-height:0;margin:0}
#v-stream .st-chips{display:flex;flex-wrap:wrap;gap:6px}
#v-stream .st-tog{min-height:34px;padding:6px 12px}
#v-stream .st-form .err{grid-column:1 / -1;margin:0}
#v-stream .st-danger{color:var(--crit)}
@media (max-width:719px),(pointer:coarse){
  #v-stream .st-form{grid-template-columns:minmax(0,1fr)}
  #v-stream .st-tog,#v-stream .st-acts .btn,#v-stream .st-field select,#v-stream .st-field input{min-height:44px}
  #v-stream .st-field select,#v-stream .st-field input{font-size:16px}
  #v-stream .st-row{flex-direction:column;gap:8px}
  #v-stream .st-row .st-acts{justify-content:flex-start}
  #v-stream .st-offlist > summary{min-height:44px}
  #v-stream .st-orditems{padding-left:8px}
  #v-stream .st-ordundo{flex-wrap:wrap}
  #v-stream .st-ordundo .btn{min-height:44px}
}

/* The app Home page's Going live tile: the line and the button app/stream.js paints into its slot. */
.lfb-stslot:empty{display:none}
.lfb-stslot{display:flex;flex-direction:column;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.st-tilenow{font-size:14px}
.st-tileacts{display:flex;flex-wrap:wrap;gap:8px}
.st-tileacts .btn{min-height:34px}
@media (max-width:719px),(pointer:coarse){ .st-tileacts .btn{min-height:44px} }

/* ------------------------------------------ stage C: the stream kit tab */
/* The word panel (app/stream-rules.js, its own .lfb-sr* styles in board.css)
   first, then the kit: one card per platform, side by side on a wide screen,
   stacked on a phone. */
#v-stream .st-words{margin:0 0 14px}
#v-stream .st-kitsum{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 12px}
#v-stream .st-kitsum .lfb-srpill,#v-stream .st-kithead .lfb-srpill{margin-left:0}
#v-stream .st-kitgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:12px;align-items:start}
#v-stream .st-kitslot{min-width:0}
#v-stream .st-kitcard{display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface2)}
#v-stream .st-kitflagged{border-color:color-mix(in srgb,var(--warn) 45%,var(--line))}
#v-stream .st-kithead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 10px}
#v-stream .st-kitname{margin:0;font:600 15px/1.3 var(--display);color:var(--ink)}
#v-stream .st-kitrule{margin:0;font-size:12.5px;line-height:1.45;color:var(--ink);border-left:3px solid var(--warn);padding:4px 0 4px 10px;
  background:color-mix(in srgb,var(--warn) 7%,transparent)}
#v-stream .st-kitrule.st-kr-tiktok{border-left-color:var(--crit);background:color-mix(in srgb,var(--crit) 7%,transparent)}
#v-stream .st-kitpart{display:flex;flex-direction:column;gap:6px;padding-top:8px;border-top:1px solid var(--line)}
#v-stream .st-kitlabel{font-family:var(--lfb-mono);font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink3)}
#v-stream .st-kittext{font-size:13.5px;line-height:1.5;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere}
#v-stream .st-tags{list-style:none;margin:0;padding:0}
#v-stream .st-tags .lfb-tag{font-family:var(--lfb-mono);font-size:12px;overflow-wrap:anywhere}
#v-stream .st-kitcopy{display:flex}
#v-stream .st-copy{min-height:34px;min-width:72px}
#v-stream .st-kitwhen{margin:0;font-size:12px;color:var(--ink3)}
#v-stream .st-kitcard > .st-acts{margin-top:2px}

/* The card's form: the description box full width, the hashtags as chips
   (a press takes one off), the box that adds more beside its button. */
#v-stream .st-kitform{grid-template-columns:minmax(0,1fr);margin:0}
#v-stream .st-field textarea{width:100%;min-height:120px;margin:0;font-size:14px;line-height:1.5}
#v-stream .st-hint{margin:0;font-size:12.5px;color:var(--ink3);line-height:1.45}
#v-stream .st-count{font-family:var(--lfb-mono);font-variant-numeric:tabular-nums;margin-left:6px}
#v-stream .st-tagedit{display:flex;flex-wrap:wrap;gap:6px}
#v-stream .st-tagx{appearance:none;display:inline-flex;align-items:center;min-height:34px;padding:4px 10px;border:1px solid var(--line);border-radius:999px;
  background:var(--surface);color:var(--ink);font:500 13px/1 var(--lfb-mono);cursor:pointer}
#v-stream .st-tagx:hover,#v-stream .st-tagx:focus-visible{border-color:var(--crit);color:var(--crit);outline:none}
#v-stream .st-tagx span{color:var(--ink3)}
#v-stream .st-tagadd{display:flex;gap:8px;align-items:stretch}
#v-stream .st-tagadd input{flex:1 1 auto;min-width:0;min-height:36px;margin:0}
#v-stream .st-tagadd .btn{flex:0 0 auto;min-height:36px}
#v-stream .st-vh{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* The Home tab's kit block: one line per platform. */
#v-stream .st-homekit [data-sthomekit]{display:flex;flex-direction:column;gap:10px;height:100%}
#v-stream .st-kitlines{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
#v-stream .st-kitline{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:8px 0;border-top:1px solid var(--line)}
#v-stream .st-kitline:first-child{border-top:0;padding-top:0}
#v-stream .st-kitlinename{color:var(--ink);font-weight:600;min-width:7em}
#v-stream .st-kittags{flex:1 1 12em;min-width:0;font-family:var(--lfb-mono);font-size:12.5px;color:var(--ink2);overflow-wrap:anywhere}
#v-stream .st-kitline .lfb-srpill{margin-left:0}

@media (max-width:719px),(pointer:coarse){
  #v-stream .st-copy,#v-stream .st-tagx,#v-stream .st-tagadd input,#v-stream .st-tagadd .btn{min-height:44px}
  #v-stream .st-field textarea,#v-stream .st-tagadd input{font-size:16px}
}

/* The tile's Open Stream carries the kit's count of words to check. */
.st-tileacts .lfb-srpill{margin-left:6px}

/* ------------------------------------------ stage D: the pickup (315) */
/* Above the streams: when the pickup last ran, Pick up now, and the
   manager's switch for the guess by nights. */
#v-stream .st-pickup:empty{display:none}
#v-stream .st-pickup{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin:0;padding:0 0 12px;border-bottom:1px solid var(--line)}
/* the panel's own gap spaces its parts: a form host with no form open takes no room */
#v-stream [data-stsesform]:empty,#v-stream [data-stlistform]:empty{display:none}
#v-stream .st-pickup .st-acts{margin-top:0}
#v-stream .st-pickmsg{color:var(--ink);font-weight:500}
#v-stream .st-switch{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 14px;width:100%;padding:10px 12px;
  border:1px solid var(--line);border-radius:var(--r);background:var(--surface2)}
#v-stream .st-switchtext{display:flex;flex-direction:column;gap:2px;flex:1 1 18em;min-width:0;font-size:13.5px;line-height:1.45;color:var(--ink)}
#v-stream .st-switch .btn{flex:0 0 auto;min-height:34px}
#v-stream .st-why{font-style:normal}
#v-stream [data-stunpicked]{color:var(--ink)}
@media (max-width:719px),(pointer:coarse){
  #v-stream .st-switch .btn{min-height:44px}
}

/* ------------------------------------- stage E: the setup guides tab */
/* The guides grouped by platform, one card per group, side by side on a
   wide screen and stacked on a phone; each guide a row that opens it in
   Guides; the managers' platform list under them. The Home tab's block is
   chips: a platform's guides, then Socials and Creators. */
#v-stream [data-stpfwrap][hidden]{display:none}
#v-stream .st-pfpanel{margin-top:14px}
/* on a wide monitor the list keeps its Edit buttons near the names */
#v-stream .st-pfpanel [data-stpfbody],#v-stream .st-pfpanel [data-stpfform]{max-width:1100px}
#v-stream [data-stgdbody]{display:flex;flex-direction:column;gap:10px}
#v-stream .st-gdfile{color:var(--ink);border-left:3px solid var(--accent);padding:4px 0 4px 10px;background:color-mix(in srgb,var(--accent) 7%,transparent)}
#v-stream .st-gdgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:12px;align-items:start}
#v-stream .st-gdgroup{display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface2)}
#v-stream .st-gdoff,#v-stream .st-gdstray{border-style:dashed}
#v-stream .st-gdhead{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
#v-stream .st-gdname{margin:0;font:600 15px/1.3 var(--display);color:var(--ink);border-radius:4px}
#v-stream .st-gdname:focus{outline:none}
#v-stream .st-gdname:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
#v-stream .st-gdcat{margin:0;font-family:var(--lfb-mono);font-size:11.5px;color:var(--ink3);overflow-wrap:anywhere}
#v-stream .st-gdlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
#v-stream .st-gditem{min-width:0}
#v-stream .st-gdrow{appearance:none;display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:100%;min-height:34px;margin:0;padding:8px 10px;
  border:1px solid var(--line);border-radius:var(--r);background:var(--surface);color:var(--ink);font:inherit;text-align:left;cursor:pointer}
#v-stream .st-gdrow:hover{border-color:var(--accent)}
#v-stream .st-gdrow:focus-visible{border-color:var(--accent);outline:2px solid color-mix(in srgb,var(--accent) 45%,transparent);outline-offset:1px}
#v-stream .st-gdtitle{font-weight:600;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
#v-stream .st-gdsum{font-size:13px;line-height:1.4;color:var(--ink2);overflow-wrap:anywhere}
#v-stream .st-gdmeta{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;font-size:12px;color:var(--ink3)}
#v-stream .st-gdin{color:var(--ink2);font-weight:500}
#v-stream .st-gdlvl{align-self:flex-start;color:var(--ink);border-color:color-mix(in srgb,var(--warn) 50%,var(--line));background:color-mix(in srgb,var(--warn) 12%,var(--surface))}
#v-stream .st-gdwarn{margin:6px 0 0;font-size:12.5px;line-height:1.45;color:var(--ink);border-left:3px solid var(--warn);padding:2px 0 2px 8px}
#v-stream .st-gdgroup > .st-acts{margin-top:2px}
#v-stream .st-pfkey{font-family:var(--lfb-mono);font-size:13px;color:var(--ink);padding:8px 0}
#v-stream .st-pfform .st-check{min-height:34px;margin:0}
#v-stream .st-pfform fieldset.st-field{gap:4px}

/* The Home tab's Setup guides block. */
#v-stream .st-homegd [data-sthomegd]{display:flex;flex-direction:column;gap:10px;height:100%}
#v-stream .st-gdchips{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
#v-stream .st-gdchip{appearance:none;display:inline-flex;align-items:center;gap:6px;min-height:34px;margin:0;padding:6px 14px;border:1px solid var(--line);border-radius:999px;
  background:var(--surface);color:var(--ink);font:inherit;font-size:13.5px;font-weight:500;white-space:nowrap;cursor:pointer}
#v-stream .st-gdchip:hover,#v-stream .st-gdchip:focus-visible{border-color:var(--accent);outline:none}
#v-stream .st-gdn{font-family:var(--lfb-mono);font-size:11.5px;color:var(--ink3)}

@media (max-width:719px),(pointer:coarse){
  #v-stream .st-gdrow,#v-stream .st-gdchip,#v-stream .st-pfform .st-check{min-height:44px}
}
