/* The multiview.
 *
 * Tiles of real video, one per camera, because a director's whole job is seeing
 * every source at once and choosing between them. A program monitor shows what
 * is going out; this shows what could.
 *
 * The on-air tile is marked with the console's one accent, and it is the only
 * place the accent appears here — the same reservation the program panel keeps,
 * so "what is being sent" reads the same way wherever you look for it. */

.cap-st { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }

.cap-st-multi {
  flex: 1; min-height: 0;
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  align-content: start;
}
.cap-st-loading, .cap-st-empty {
  grid-column: 1 / -1; color: var(--ink-3); font-size: .78125rem; padding: 8px 0;
}

/* ── a tile ──────────────────────────────────────────────────────────── */
/* The picture is a 16:9 box that fills the tile's width. It does not stretch:
   a face with the wrong proportions is the most obvious way a preview is wrong. */
.cap-st-tile {
  position: relative; display: block; padding: 0; cursor: pointer;
  border: var(--rule) solid var(--hairline); border-radius: var(--r-sm, 10px);
  background: var(--ink); overflow: hidden; text-align: left;
  transition: border-color 170ms var(--ease, ease), transform 170ms var(--ease, ease);
}
.cap-st-tile .pic {
  display: block; position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: color-mix(in oklab, var(--ink) 88%, black);
}
.cap-st-tile .pic video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.cap-st-tile .bar {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  font-family: var(--mono); font-size: .65625rem;
  color: color-mix(in oklab, var(--paper) 62%, transparent);
  background: color-mix(in oklab, var(--ink) 92%, black);
}
.cap-st-tile .nm {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cap-st-tile .mark { margin-left: auto; flex: none; }
.cap-st-tile:hover { border-color: var(--hairline-2); }

/* On air: the accent, the one this console reserves for what is being sent. */
.cap-st-tile.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 55%, transparent);
}
.cap-st-tile.on .bar { color: var(--accent); }
.cap-st-tile.on .mark::after {
  content: ''; display: block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: cap-st-breathe 3.2s ease-in-out infinite;
}
@keyframes cap-st-breathe { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

/* A source that cannot open says why where the picture would be — never a black
   rectangle, which is what a refused permission looks like from the outside. */
.cap-st-tile.dead .pic {
  display: grid; place-content: center; text-align: center; padding: 10px;
}
.cap-st-tile.dead .nm, .cap-st-tile.dead .bar { color: var(--gold, #b98a2e); }
.cap-st-tile.dead .pic video { display: none; }
.cap-st-tile.dead .pic::after {
  content: attr(data-why);
}

/* A screen is not a device until somebody picks one. */
.cap-st-tile.ondemand { border-style: dashed; }
.cap-st-tile.ondemand .pic {
  display: grid; place-content: center;
  background: color-mix(in oklab, var(--ink) 94%, black);
}
.cap-st-tile .ask {
  color: color-mix(in oklab, var(--paper) 62%, transparent);
  font-size: .75rem; padding: 6px 12px; border-radius: var(--r-pill, 100px);
  border: var(--rule) solid color-mix(in oklab, var(--paper) 26%, transparent);
}
.cap-st-tile.ondemand:hover .ask { color: var(--paper); }

/* ── the scenes, as the show's shape ─────────────────────────────────── */
.cap-st-scenes { flex: none; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.cap-st-scene {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: baseline; gap: 10px;
  padding: 8px; margin: 0 -8px; border-radius: var(--r-sm, 8px);
  border: 0; background: transparent; cursor: pointer; text-align: left;
  width: calc(100% + 16px); font: inherit; color: var(--ink-2);
}
.cap-st-scene + .cap-st-scene { border-top: var(--rule) solid var(--hairline); border-radius: 0; }
.cap-st-scene:hover { background: color-mix(in oklab, var(--ink) 5%, transparent); color: var(--ink); }
.cap-st-scene .n { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--ink-3); }
.cap-st-scene .t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cap-st-scene .t b { font-size: .875rem; font-weight: 500; color: var(--ink); }
.cap-st-scene .t small {
  font-size: .78125rem; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Which source this scene sends: the fact that makes a scene more than words. */
.cap-st-scene .src {
  font-family: var(--mono); font-size: .625rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}
.cap-st-scene.on { background: var(--paper-2); color: var(--ink); }
.cap-st-scene.on .n { color: var(--ink-2); }
.cap-st-scene.on .src { color: var(--ink-2); }

.cap-st-foot {
  flex: none; display: flex; align-items: baseline; gap: 12px;
  border-top: var(--rule) solid var(--hairline); padding-top: 8px;
  font-size: .75rem; color: var(--ink-3);
}
.cap-st-foot .cap-st-on { font-family: var(--mono); color: var(--ink-2); white-space: nowrap; }
.cap-st-foot .cap-st-hint { margin-left: auto; text-align: right; }

@media (max-width: 700px) {
  .cap-st-foot .cap-st-hint { display: none; }
}
.cap-st-empty{font-size:max(var(--touch-text-floor,0rem),.75rem);color:var(--ink-3);font-style:italic;padding:4px 0}
