/* stills2.html: page-only styles on top of the CoS kit (studio-frame.css). Every class is s2- prefixed. */
.sf-work { --s2-dock: 0px; }
.s2-well { margin-bottom: var(--s2-dock); container-type: size; transition: margin-bottom .2s ease; }
.s2-viewer { position: relative; aspect-ratio: 16 / 9; width: min(100cqw, calc(100cqh * 16 / 9)); background: #000; overflow: hidden; }
.s2-pic { width: 100%; height: 100%; object-fit: contain; display: block; }
.s2-viewer .sf-tags { right: 160px; }
.s2-hold { position: absolute; right: 12px; top: 10px; z-index: 2; }
.s2-said { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: 84%; text-align: center; font-family: var(--read); font-size: 22px; line-height: 1.38; color: #f3f1ec; text-shadow: 0 1px 10px rgba(0,0,0,.9); pointer-events: none; z-index: 2; }
.s2-viewer .chip.out { background: var(--need); color: #fff; border-color: transparent; }
.s2-viewer.over { box-shadow: 0 0 0 3px var(--run); }
html.s2-arming .s2-viewer, html.s2-arming .s2-win { cursor: copy; }

/* the strip: the film's stills over her voice (the kit dock) */
.s2-dock { padding: 6px 8px 4px; }
.s2-dockhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 0 4px 5px; }
.s2-dockhead b { color: var(--text); font-weight: 600; }
.s2-legend { flex: 1; text-align: right; min-width: 0; }
.s2-lg-ck { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; vertical-align: -2px; }
.s2-lg-grip { display: inline-block; width: 10px; height: 14px; border-radius: 3px; background: var(--hover); border: 1px solid var(--text-2); vertical-align: -2px; position: relative; }
.s2-lanewrap { overflow-x: auto; overflow-y: hidden; padding: 0 10px 4px; touch-action: pan-x; overscroll-behavior-x: contain; scrollbar-width: thin; }
.s2-lane { position: relative; height: 110px; }
.s2-lane canvas { position: absolute; left: 0; top: 68px; height: 40px; display: block; }
.s2-pz { position: absolute; top: 68px; height: 40px; background: var(--line-soft); border-radius: 2px; pointer-events: none; }
.s2-pz.hot { background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.s2-win { position: absolute; top: 0; height: 60px; border-radius: 5px; overflow: hidden; background: #000; outline: 1px solid var(--line); cursor: pointer; user-select: none; -webkit-user-select: none; }
.s2-win img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.s2-num { position: absolute; left: 3px; bottom: 3px; font: 600 12px var(--cond); color: #fff; background: rgba(0,0,0,.72); padding: 0 5px; border-radius: 4px; pointer-events: none; }
/* the tick box: small, in the corner, its own target only (clicking the picture looks at it) */
.s2-ck { position: absolute; right: 3px; top: 3px; width: 17px; height: 17px; border-radius: 4px; display: grid; place-items: center; background: rgba(0,0,0,.6); border: 1.5px solid rgba(255,255,255,.75); cursor: pointer; z-index: 2; }
.s2-ck::after { content: "✓"; font-size: 11px; font-weight: 800; line-height: 1; color: transparent; }
.s2-win[data-sel="1"] .s2-ck { background: var(--accent); border-color: var(--accent); }
.s2-win[data-sel="1"] .s2-ck::after { color: var(--on-accent); }
.s2-win[data-state="approved"] .s2-ck { background: var(--done); border-color: var(--done); }
.s2-win[data-state="approved"] .s2-ck::after { color: #fff; }
.s2-win[data-state="needsok"] .s2-ck { background: transparent; border-color: var(--accent); }
.s2-win[data-state="needsok"] .s2-ck::after { color: var(--accent); }
.s2-ck:hover { box-shadow: 0 0 0 2px var(--text); }
.s2-win[data-sel="0"] img { opacity: .45; filter: grayscale(.6); }
.s2-win[data-state="held"] { outline: 2px dashed var(--need); outline-offset: -2px; }
.s2-win[data-state="flagged"] { outline: 2px solid var(--need); outline-offset: -2px; }
.s2-win[data-state="flagged"] img { opacity: .7; filter: none; }
.s2-win[data-state="running"] { outline: 2px solid var(--run); outline-offset: -2px; }
.s2-hb { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--need); color: #fff; font: 700 10.5px var(--ui); padding: 2px 6px; border-radius: 10px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }
.s2-win[data-state="flagged"] .s2-hb { background: #b8462f; }
.s2-win[data-state="running"] .s2-hb { background: var(--run); }
.s2-win.narrow .s2-hb { font-size: 9.5px; padding: 1px 4px; }
.s2-win.cur { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); z-index: 3; }
.s2-win.over { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--run); }
/* grips: always visible, labelled in the strip's legend; snap to pauses */
.s2-edge { position: absolute; top: 62px; bottom: 0; width: 22px; margin-left: -11px; cursor: ew-resize; touch-action: none; z-index: 4; }
.s2-edge::before { content: ""; position: absolute; left: 10px; width: 2px; top: -62px; bottom: 2px; background: var(--muted); pointer-events: none; opacity: .7; }
.s2-edge i { position: absolute; left: 5px; top: 10px; width: 12px; height: 24px; border-radius: 4px; background: var(--hover); border: 1px solid var(--text-2); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.s2-edge i::before, .s2-edge i::after { content: ""; position: absolute; top: 6px; bottom: 6px; width: 1px; background: var(--text-2); }
.s2-edge i::before { left: 3px; } .s2-edge i::after { right: 3px; }
.s2-edge:hover i, .s2-edge.drag i, .s2-edge:focus-visible i { background: var(--accent); border-color: var(--accent); }
.s2-edge.drag::before, .s2-edge.moved::before { background: var(--accent); opacity: 1; }
.s2-edge.moved i { background: var(--accent); border-color: var(--accent); animation: s2pulse 1s ease 2; }
@keyframes s2pulse { 50% { transform: scale(1.35); } }
.s2-edge.blocked i { background: var(--need); border-color: var(--need); animation: s2shake .35s ease 2; }
@keyframes s2shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .s2-edge i { animation: none !important; } }
.s2-edge-t { position: absolute; left: 50%; bottom: 38px; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); font: 600 11.5px var(--ui); padding: 1px 6px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.s2-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); pointer-events: none; z-index: 5; }

/* panel */
.s2-play { min-width: 84px; height: 34px; font-size: 15px; }
.s2-note { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin: 7px 0 0; }
.s2-opts { margin-top: 8px; }
.s2-opts .sf-row + .sf-row { margin-top: 6px; }
.s2-optlab { min-width: 118px; }
.s2-step { width: 32px; height: 30px; font-size: 16px; padding: 0; }
.s2-loop { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); margin-left: 6px; cursor: pointer; }
.s2-dockctl { margin-top: 8px; }
.s2-sum { font-size: 14px; color: var(--text-2); }
.s2-sum b { color: var(--text); }
.s2-sum2 { font-size: 12.5px; color: var(--done); margin-top: 2px; }
.s2-allgood { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.s2-checklist { display: grid; gap: 3px; margin-top: 6px; max-height: 120px; overflow-y: auto; }
.s2-checklist > button { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 7px; font-size: 12.5px; color: var(--text-2); min-width: 0; background: none; border: 0; text-align: left; width: 100%; }
.s2-checklist > button:hover, .s2-checklist > button.on { background: var(--hover); }
.s2-checklist .n { font: 600 12px var(--cond); color: var(--muted); width: 16px; flex: none; text-align: right; }
.s2-checklist img { width: 44px; height: 25px; object-fit: cover; border-radius: 3px; flex: none; background: #000; }
.s2-checklist .w { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.s2-checklist .chip { flex: none; height: 20px; font-size: 11.5px; }
.s2-wh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.s2-wh b { font-size: 15px; font-weight: 600; }
.s2-pic-of { font-size: 13px; color: var(--muted); }
.s2-quote { font-family: var(--read); font-size: 15.5px; line-height: 1.38; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.s2-times { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.s2-reason, .s2-reply { display: flex; gap: 8px; align-items: baseline; margin-top: 8px; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.s2-reply { color: var(--text); background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 6px 9px; }
.s2-reason .sf-who, .s2-reply .sf-who { font-weight: 600; color: var(--accent-ink); flex: none; }
.s2-flagline { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text); margin-top: 8px; background: var(--need-soft); border-radius: 8px; padding: 6px 9px; line-height: 1.4; }
.s2-bang { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--need); color: #fff; font-weight: 800; font-size: 12px; }
.s2-okmark { color: var(--done); font-weight: 800; }
.s2-mynote { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.s2-verbs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
#stillBody { margin-top: 4px; }
.s2-verbs .btn { padding: 0 6px; }
#blooks[aria-pressed="true"] { background: var(--done-soft); border-color: var(--done); color: var(--done); font-weight: 600; }
#bhold[aria-pressed="true"] { background: var(--need-soft); border-color: var(--need); color: var(--need); font-weight: 600; }
.s2-words { margin-top: 12px; }
.s2-alts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.s2-alts > button { background: none; border: 0; padding: 0; font: inherit; text-align: left; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.s2-alts img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; display: block; outline: 1px solid var(--line); background: #000; }
.s2-alts > button.now img { outline: 2px solid var(--accent); outline-offset: 1px; }
.s2-alts > button.now { color: var(--accent-ink); font-weight: 600; }
#gFix .sf-fld { margin-top: 10px; }
.s2-inputs { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.s2-inputs .sf-lab { margin: 0 4px 0 0; }
.s2-eyes { font-size: 12.5px; color: var(--text-2); margin-top: 8px; line-height: 1.4; display: flex; gap: 6px; align-items: baseline; }
.s2-prevnext { margin-top: 10px; }
.chip.ok { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.sf-thumb.s2-armed { outline: 3px solid var(--accent); outline-offset: 1px; }

/* visible edits that come back from the still maker */
.f-warm { filter: sepia(.38) saturate(1.45) hue-rotate(-8deg); }
.f-cool { filter: saturate(.75) sepia(.25) hue-rotate(175deg) brightness(1.05); }
.f-bright { filter: brightness(1.4); }
.f-dark { filter: brightness(.62) contrast(1.25); }
img.c-close { transform: scale(1.6); transform-origin: 62% 28%; }

@media (max-width: 1500px) { .s2-legend { font-size: 11.5px; } }
@media (max-width: 760px) {
  .s2-said { font-size: 14px; bottom: 6px; width: 94%; }
  .s2-viewer .sf-tags { right: 8px; }
  .s2-hold { display: none; }
  .s2-legend { display: none; }
  .s2-lane { height: 100px; }
  .s2-win { height: 54px; }
  .s2-edge { top: 56px; }
  .s2-edge::before { top: -56px; }
  .s2-lane canvas, .s2-pz { top: 60px; height: 38px; }
  .s2-ck { width: 20px; height: 20px; }
}

/* likeness (similarity, line 0.35) and the approved-still warning */
.s2-like { font-size: 12.5px; color: var(--text-2); margin-top: 8px; line-height: 1.4; display: flex; gap: 6px; align-items: baseline; }
.s2-warn { margin: 6px 0 4px; padding: 8px 10px; border-radius: 9px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13px; line-height: 1.4; }
.s2-warn p { margin: 0 0 6px; }
