/* Take control in the live view (stream-input.js, docs/STREAMS.md step 6): the mode switch, and the chip over the picture. */
.sp-modes { display: inline-flex; gap: 2px; }
.sp-modes .sp-ib span { display: none; }
.sp-modes .sp-ib[aria-pressed="true"] span { display: inline; }
.sp-modes .sp-watchbtn[aria-pressed="true"] { background: #161b22; color: #e9e6df; }
.sp-modes .sp-ctrlbtn[aria-pressed="true"] { background: rgba(61, 220, 151, .16); color: #fff; }
/* At rest (Watch) the tools stay out of the way until you reach for the header, as before. */
@media (hover: hover) {
  .sp-head:not(:hover):not(:focus-within) .sp-tools:not(:has(.sp-commentbtn[aria-pressed="true"], .sp-ctrlbtn[aria-pressed="true"], .sp-focusbtn[aria-pressed="true"])) { opacity: 0; }
}

/* Driving it: a green ring on the picture. */
.sp-stage[data-mode="control"] .sp-canvas { box-shadow: 0 0 0 1px #2a3a33, 0 12px 40px rgba(0, 0, 0, .45); }
.sp-stage.si-on .sp-canvas { cursor: default; box-shadow: 0 0 0 2px #3ddc97, 0 12px 40px rgba(0, 0, 0, .45); }

.si-chip { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; height: 32px;
  max-width: calc(100% - 32px); padding: 0 4px 0 12px; border-radius: 999px; background: rgba(7, 9, 12, .82); backdrop-filter: blur(6px); color: #e9e6df; font-size: 12px; white-space: nowrap; }
.si-chip[hidden], .si-clip[hidden] { display: none; }
.si-chip i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #ffb020; animation: sp-blink 1s infinite; }
.si-chip[data-s="on"] i { background: #3ddc97; animation: none; }
.si-words { overflow: hidden; text-overflow: ellipsis; }
.si-clip { display: inline-flex; align-items: center; gap: 5px; color: #a7adb6; cursor: pointer; }
.si-clip input { margin: 0; accent-color: #3ddc97; }
.si-stop { height: 24px; font-size: 12px; color: #e9e6df; }
@media (max-width: 640px) {
  .si-chip { top: auto; bottom: 10px; }
  .sp-modes .sp-ib[aria-pressed="true"] span { display: none; }
}

/* Stop, where it is working (turn-stop.js): a small quiet button, never a card. */
.ts-stop { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 12px; }
.ts-stop svg { width: 13px; height: 13px; }
.sp-workstop { margin-left: 10px; font-size: 12px; }
.sp-stopturn { color: #ffb3c0; }
.sp-stopturn[hidden] { display: none; }
@media (max-width: 640px) { .sp-stopturn span { display: none; } }

/* Copy from it (Take control): the button in the chip, and the text when the browser wants its own click. */
.si-chip .si-copy { margin-left: 4px; }
.si-copied { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(520px, calc(100% - 32px)); background: var(--pop-bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; box-shadow: var(--pop-shadow); z-index: var(--z-float); display: flex; flex-direction: column; gap: 8px; }
.si-copied textarea { width: 100%; resize: vertical; font: 12px/1.4 var(--mono, ui-monospace, monospace); background: transparent; color: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.si-copied > div { display: flex; gap: 12px; align-items: center; }
