/* castset.css: shared look for cast.html and set.html (CoS try-it night 2026-10-03). Load after studio-frame.css. Prefix cs-. */

/* ---------- work area: Recent strip on top, the picture, the anchors dock ---------- */
.cs-work { gap: 8px; }
.cs-head { flex: none; display: flex; align-items: center; gap: 8px; min-height: 40px; overflow-x: auto; scrollbar-width: none; }
.cs-head::-webkit-scrollbar { display: none; }
.cs-hl { font: 600 13px var(--ui); color: var(--muted); flex: none; padding-right: 2px; }
.cs-rec { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 4px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font: 500 13.5px var(--ui); white-space: nowrap; flex: none; }
.cs-rec img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; object-position: 50% 15%; background: #000; display: block; }
.cs-rec small { color: var(--muted); font-size: 12px; }
.cs-rec:hover { background: var(--hover); color: var(--text); }
.cs-rec[aria-current="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); font-weight: 600; }
.cs-rec.cs-new { padding: 0 12px; }
.cs-film { margin-left: auto; flex: none; }

.cs-well { }
.cs-well > img { transition: filter .25s; }
.cs-well > img[hidden] { display: none; }
.cs-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 15px; }
.cs-empty b { display: block; font: 600 22px var(--cond); color: var(--text-2); margin-bottom: 4px; }
.cs-well .sf-tags .chip { height: 26px; }
.cs-cap { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.cs-cap > * { pointer-events: auto; max-width: 100%; }
.cs-say { display: flex; }
.cs-cap .sf-receipt { margin: 0; background: rgba(0,0,0,.62); border-radius: 8px; padding: 4px 10px; backdrop-filter: blur(6px); font-size: 13px; }
.cs-cap .sf-receipt summary { color: #d9d7d2; }
.cs-cap .sf-receipt[open] .sf-receipt-b { background: rgba(16,17,20,.92); color: #d9d7d2; max-height: 200px; }
.cs-gh { flex-wrap: wrap; row-gap: 2px; }
.cs-gh .sf-gt { white-space: nowrap; flex: 1 0 auto; }
.cs-gh .sf-gx { order: 4; }
.cs-gh .sf-standin { font-weight: 400; font-size: 11px; order: 5; margin-left: 30px; }
.cs-well .sf-tags .chip.need { background: rgba(0,0,0,.66); color: #ff9a88; border-color: rgba(255,122,102,.5); }
.cs-say span { max-width: 100%; background: rgba(0,0,0,.62); color: #ecebe7; font-size: 14px; line-height: 1.35; padding: 6px 10px; border-radius: 8px; backdrop-filter: blur(6px); }
.cs-say span b { color: #f5b866; font-weight: 600; margin-right: 6px; }
.cs-say:empty { display: none; }

/* dock: one strip, the pictures that make up the character / set */
.cs-cards { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 2px; }
.cs-card { flex: none; width: 150px; display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--bg-2); }
.cs-card[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cs-card-pic { position: relative; height: 80px; padding: 0; border: 0; border-radius: 7px; overflow: hidden; background: #000; display: grid; place-items: center; color: var(--faint); font-size: 12px; }
.cs-card-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; pointer-events: none; }
.cs-card-pic .sf-spin { border-top-color: var(--accent); }
.cs-card-t { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 22px; }
.cs-card-t b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-card-t .chip { height: 20px; font-size: 11px; padding: 0 7px; }
.cs-hold { height: 26px; width: 100%; border-radius: 6px; font-size: 12.5px; }
.cs-hold[aria-pressed="true"] { background: var(--need-soft); border-color: transparent; color: var(--need); font-weight: 600; }
.cs-card.cs-held .cs-card-pic img { opacity: .45; }

/* ---------- panel groups ---------- */
.cs-gh { cursor: pointer; user-select: none; }
.sf-panel-body > .cs-g { padding: 10px 14px; }
.cs-g .sf-gh { margin-bottom: 6px; }
.cs-gh:hover .sf-gt { color: var(--accent-ink); }
.cs-gcar { width: 16px; height: 16px; display: inline-grid; place-items: center; color: var(--muted); transition: transform .15s; flex: none; }
.cs-gcar svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cs-g:not(.cs-closed) .cs-gcar { transform: rotate(90deg); }
.cs-g.cs-closed > :not(.sf-gh):not(.cs-sum) { display: none !important; }
.cs-g.cs-closed .sf-gh { margin-bottom: 2px; }
.cs-sum { display: none; font-size: 13px; color: var(--text-2); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 30px; cursor: pointer; }
.cs-g.cs-closed > .cs-sum { display: block; }
.cs-wait { font-size: 13px; color: var(--muted); }

.cs-namerow { display: flex; align-items: center; gap: 8px; }
.cs-namerow label { font-size: 13px; color: var(--text-2); flex: none; width: 46px; }
.cs-namerow input { height: 34px; padding: 0 10px; }
.cs-seg { margin: 8px 0 6px; width: 100%; }
.cs-seg > button { flex: 1; }
.cs-desc { min-height: 54px; }

/* the step builder: one line per step; hover or click opens it */
.cs-steps { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.cs-step { margin: 0 !important; border-top: 1px solid var(--line-soft); }
.cs-step:first-child { border-top: 0; }
.cs-step-h { display: grid; grid-template-columns: 88px minmax(0, 1fr) 14px; align-items: center; gap: 6px; min-height: 30px; padding: 4px 8px 4px 10px; cursor: pointer; outline-offset: -2px; }
.cs-step-h:hover, .cs-step-h[aria-expanded="true"] { background: var(--hover); }
.cs-step-l { margin: 0 !important; font-size: 13px; font-weight: 600; color: var(--text) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-step-v { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-step-car { color: var(--muted); display: inline-grid; place-items: center; }
.cs-step-car svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cs-step-h[aria-expanded="true"] .cs-step-car { color: var(--accent-ink); }
.cs-step.cs-flash .cs-step-h { animation: csflash 1.4s ease; }
@keyframes csflash { 0%, 40% { background: var(--accent-soft); } 100% { background: transparent; } }
.cs-step-h { grid-template-columns: minmax(0, 1fr) 14px; grid-template-rows: auto auto; row-gap: 1px; }
.cs-step-l { grid-column: 1; grid-row: 1; overflow: visible !important; white-space: normal !important; }
.cs-step-v { grid-column: 1; grid-row: 2; }
.cs-step-car { grid-column: 2; grid-row: 1 / span 2; }
.cs-step-l .sf-filled { font-weight: 500; }
.cs-step-ed { padding: 8px 10px 10px; background: var(--bg-2); display: flex; flex-direction: column; gap: 8px; }
.cs-step-ed.cs-fly { position: fixed; z-index: 70; width: 320px; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); background: var(--panel); padding: 12px; }
.cs-ed-t { font: 600 15px var(--ui); display: flex; align-items: center; gap: 8px; }
.cs-ed-t .cs-ed-x { margin-left: auto; }
.cs-step-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cs-opt { cursor: pointer; height: auto; min-height: 26px; white-space: normal; text-align: left; line-height: 1.25; padding: 3px 10px; }
.cs-opt[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.cs-opt:hover { color: var(--text); }
.cs-step-in { height: 34px; padding: 0 10px; }

.cs-refnote { font-size: 12.5px; font-weight: 400; color: var(--text-2); }
.cs-refs-l { font: 600 13px var(--ui); margin: 10px 0 6px; display: block; }

/* make */
.cs-engline { font-size: 13.5px; flex-wrap: nowrap !important; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cs-engline b { color: var(--text); font-weight: 600; }
.cs-spent { font-size: 13.5px; color: var(--text-2); margin-top: 6px; }
.cs-spent b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }

/* look and decide */
.cs-reason { font-size: 14px; line-height: 1.4; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 9px; padding: 7px 10px; }
.cs-reason b { color: var(--accent-ink); font-weight: 600; margin-right: 4px; }
.cs-reason .cs-miss { color: var(--need); }
.cs-reason .cs-flagt { color: var(--need); font-weight: 600; }
.cs-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cs-btns .btn { flex: 1 1 auto; }
.cs-accept { width: 100%; height: 40px !important; font-size: 15px !important; }
.cs-dockrow { margin-top: 8px; }
.cs-g .sf-words { margin-top: 8px; }

/* redo one picture */
.cs-for { font-size: 14px; margin-bottom: 8px; }
.cs-for b { font-weight: 600; }
.cs-kind { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 6px; }
.cs-kind label { font-size: 13px; color: var(--text-2); }
.cs-kind select { height: 32px; }
.cs-kind .sf-filled { grid-column: 2; justify-self: start; margin: 0; }
.cs-like { margin-top: 10px; font-size: 13.5px; color: var(--text-2); }
.cs-like b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.cs-like .cs-over { color: var(--need); }
.cs-meter { position: relative; height: 6px; border-radius: 3px; background: var(--raised); margin: 6px 0 4px; }
.cs-meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--done); }
.cs-meter i.cs-over { background: var(--need); }
.cs-meter u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-2); }
.cs-redo { width: 100%; margin-top: 10px; }

/* approve */
.cs-asum { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.cs-asum small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 2px; }

/* foot: the line of inputs + the one next press */
.cs-foot { flex-direction: column; align-items: stretch; gap: 6px; }
.cs-foot .sf-uses { font-size: 13px; padding: 5px 9px; }
.cs-notsent { font-size: 12.5px; color: var(--need); line-height: 1.3; }
.cs-notsent:empty { display: none; }
.cs-foot .btn.primary { width: 100%; flex: none; height: 42px; }
.cs-main-note { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.cs-main-note:empty { display: none; }

/* receipt sits in "Make" */
.cs-rec-holder .sf-receipt { margin-top: 6px; }

@media (max-width: 760px) {
  .cs-head { min-height: 36px; }
  .cs-rec { height: 34px; font-size: 13px; }
  .cs-rec img { width: 26px; height: 26px; }
  .cs-card { width: 108px; padding: 3px; }
  .cs-card-pic { height: 58px; }
  .cs-card-t { flex-direction: column; align-items: flex-start; gap: 2px; }
  .cs-card-t b { font-size: 12px; max-width: 100%; }
  .cs-hold { height: 24px; font-size: 12px; }
  .cs-say span { font-size: 12.5px; }
  .cs-step-ed.cs-fly { position: static; width: auto; box-shadow: none; border: 0; border-radius: 0; background: var(--bg-2); padding: 8px 10px 10px; }
}

/* the picture always fits inside the well, whatever its shape (portrait faces, wide rooms) */
.cs-well > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cs-kind .sf-lab { margin: 0; line-height: 1.25; }
.cs-kind .sf-filled { margin: 2px 0 0; height: 16px; padding: 0 5px; font-size: 10.5px; display: flex; width: max-content; }
.cs-kind + .cs-kind { margin-top: 6px !important; }

/* QA cold run 1 (cast): where each step came from; empty person steps; the strip note; compare + keep; approve asks first */
.cs-src { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 6px; border-radius: 9px; background: var(--done-soft); color: var(--done); font-size: 11px; font-weight: 500; white-space: nowrap; vertical-align: middle; }
.cs-step-v.cs-unset { color: var(--muted); font-style: italic; }
.cs-kept { font-size: 12.5px; color: var(--done); margin: 0 0 6px; }
.cs-docknote { flex: 0 1 220px; align-self: center; font-size: 13px; line-height: 1.35; color: var(--text-2); padding: 0 8px; }
.cs-redo-uses { margin: 8px 0 0; font-size: 13px; padding: 5px 9px; }
.cs-cmp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cs-cmp .sf-lab { margin: 0; }
.cs-confirm { font-size: 13.5px; line-height: 1.35; color: var(--text); background: var(--need-soft); border: 1px solid rgba(255,122,102,.45); border-radius: 9px; padding: 7px 10px; display: flex; flex-direction: column; gap: 6px; }
.cs-confirm .cs-row2 { display: flex; gap: 6px; }
.cs-confirm .cs-row2 .btn { flex: 1; }
@media (max-width: 760px) { .cs-docknote { flex-basis: 160px; font-size: 12px; } }

/* QA run 2: no primary label clips (wrap instead) */
.cs-foot .btn.primary { white-space: normal; height: auto; min-height: 42px; padding: 7px 12px; line-height: 1.25; text-align: center; }
.cs-card-t { flex-direction: column; align-items: flex-start; gap: 2px; }
.cs-card-t b { max-width: 100%; white-space: normal; overflow: visible; }
.cs-step-v { white-space: normal; overflow: visible; }
.cs-main-note { font-weight: 600; color: var(--text); }
.cs-btns .btn, .cs-cmp .btn, .cs-confirm .btn { white-space: normal; height: auto; min-height: 32px; line-height: 1.2; padding-top: 4px; padding-bottom: 4px; }
.cs-redo { white-space: normal; height: auto; min-height: 32px; line-height: 1.2; }

/* set run 3: no black bars beside the picture: a neutral matte that matches the frame */
.cs-well { background: var(--bg-2); }
.cs-foot { gap: 4px; }
.cs-main-note { font-size: 12.5px; }
.cs-btns .btn { flex: 1 1 0; min-width: 0; font-size: 13px; padding-left: 8px; padding-right: 8px; }
