/* v7: the cut card in Edit, the Publish screen, the timeline sheet, and the phone layout of the steps.
   Only Pravah's own tokens (var(--p1), --line, --ink, --ok, --warn ...) and classes; no second font. */

/* ---------- Edit: the cut card ---------- */
.cut,.cutload,.pubgate{display:block}
.cutload{display:flex;gap:10px;align-items:center;color:var(--ink2);padding:22px 16px}
.cut-h{display:flex;align-items:center;gap:10px;margin-bottom:6px;flex-wrap:wrap}
.cut-h h2{margin:0;flex:1}
.cut>p,.pubgate>p{margin:4px 0 10px}
.cut-opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px 18px;margin:12px 0 4px}
.cut-opt{display:flex;flex-direction:column;gap:6px;margin-top:12px;min-width:0}
.cut-opts .cut-opt{margin-top:0}
.cut-opt>label{font-size:12px;font-weight:600;color:var(--ink2)}
.cut-opt .faint{margin:0}
.chipb.lk{display:inline-flex;align-items:center;gap:6px}
.chipb.lk i{width:11px;height:11px;border-radius:50%;border:1px solid rgba(0,0,0,.2);display:inline-block}
.chipb.pg{display:inline-flex;align-items:center;gap:4px;padding-right:4px;max-width:100%}
.chipb.pg .x{border:0;background:transparent;color:var(--ink3);font-size:15px;line-height:1;width:20px;height:20px;border-radius:50%;cursor:pointer}
.chipb.pg .x:hover{background:var(--p3);color:var(--ink)}
.cut-add{gap:8px}
.cut-add .f{flex:1;min-width:0}
.cut textarea.f{width:100%;resize:vertical}
.cut-bar{height:10px;border-radius:5px;background:var(--p3);overflow:hidden;margin:10px 0 8px}
.cut-bar i{display:block;height:100%;background:var(--vio,#7457d0);border-radius:5px;transition:width .6s ease}
.cut-msg{gap:10px;align-items:baseline;flex-wrap:wrap}
.cut-stages{list-style:none;margin:12px 0 6px;padding:0;display:flex;flex-direction:column;gap:6px}
.cut-stages li{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--ink3)}
.cut-stages li .mark{width:20px;height:20px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;flex:none}
.cut-stages li .mark .ic{width:12px;height:12px}
.cut-stages li.done{color:var(--ink2)}
.cut-stages li.done .mark{background:var(--ok);border-color:var(--ok);color:#fff}
.cut-stages li.now{color:var(--ink);font-weight:600}
.cut-stages li.now .mark{border-color:var(--vio,#7457d0)}
.cut-ready{display:grid;grid-template-columns:minmax(0,600px) minmax(200px,280px);gap:18px;align-items:start;margin-top:10px}
.cut-player{background:#000;border-radius:12px;overflow:hidden;margin:10px 0 12px}
.cut-ready .cut-player{margin:0}
.cut-player video{display:block;width:100%;aspect-ratio:16/9;max-height:56vh;object-fit:contain;background:#000}
.cut-side{display:flex;flex-direction:column;gap:10px}
.cut-side p{margin:0}
.cut-acts{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.cut-side .cut-acts{flex-direction:column;align-items:stretch}
.cut-acts .btn{white-space:nowrap}
a.btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.cut-again{margin-top:14px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--p2);display:flex;flex-direction:column;gap:8px}
.cut-again label{font-size:12px;font-weight:600;color:var(--ink2)}
.pill.good{color:var(--ok);background:color-mix(in srgb,var(--ok) 13%,transparent)}
.pvtake video,.pvtake-up,.pvtake-bad{aspect-ratio:16/9}

/* ---------- Publish ---------- */
.pubg{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:auto auto 1fr;grid-template-areas:"video chan" "pics chan" "res chan";gap:12px 14px;align-items:start}
.pa-video{grid-area:video}.pa-chan{grid-area:chan}.pa-pics{grid-area:pics}.pa-res{grid-area:res}
.pubg>.card{min-width:0}
.pubgate{max-width:640px;margin:24px auto;text-align:left;border-left:3px solid var(--warn)}
.pubgate h2{margin:0 0 4px;font-size:18px;text-transform:none;letter-spacing:0;color:var(--ink);font-weight:600}
.pubframes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.pubframe{position:relative;border:2px solid var(--line);border-radius:10px;overflow:hidden;padding:0;background:#000;cursor:pointer;aspect-ratio:16/9}
.pubframe.on{border-color:var(--blue,#2563eb)}
.pubframe img{display:block;width:100%;height:100%;object-fit:cover}
.pubframe span{position:absolute;right:6px;bottom:6px;font-size:11px;background:rgba(0,0,0,.65);color:#fff;border-radius:6px;padding:1px 6px}
details.chrow{border-top:1px solid var(--line);padding:2px 0}
details.chrow:first-of-type{border-top:0}
details.chrow>summary{display:flex;align-items:center;gap:10px;padding:10px 0;cursor:pointer;list-style:none;min-height:48px}
details.chrow>summary::-webkit-details-marker{display:none}
details.chrow>summary::after{content:'';width:7px;height:7px;border-right:2px solid var(--ink3);border-bottom:2px solid var(--ink3);transform:rotate(45deg);margin:0 4px 3px 2px;flex:none;transition:transform .15s}
details.chrow[open]>summary::after{transform:rotate(-135deg);margin-bottom:-2px}
details.chrow .chk{width:22px;flex:none;display:grid;place-items:center}
details.chrow .chk input{width:18px;height:18px;margin:0}
details.chrow .chn{flex:1;min-width:0;display:flex;flex-direction:column}
details.chrow .chn small{color:var(--ink3);font-size:12px;white-space:normal}
details.chrow .chlogo{flex:none}
details.chrow .chbody{padding:0 0 14px 32px}
details.chrow .chbody .f{width:100%}
.pubadd{margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}
.pubadd h3{margin:0 0 2px;font-size:14px}
.pubadd .row{gap:8px;flex-wrap:wrap}
.pubadd select.f{width:auto;max-width:180px}

/* ---------- the timeline sheet: a full window inside Pravah ---------- */
#cutsheet{position:fixed;inset:0;z-index:95;background:var(--bg,#f7f6f3);display:flex;flex-direction:column}
#cutsheet .cs-bar{display:flex;align-items:center;gap:12px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--p1);flex:none}
#cutsheet .cs-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#cutsheet .cs-host{flex:1;min-height:0;position:relative;height:auto}
body.cs-on{overflow:hidden}
body.cs-on .fbfab,body.cs-on #pvup{display:none}

/* ---------- the phone: all five steps reachable, nothing under the round button ---------- */
@media (max-width:760px){
  .steps{overflow:visible;gap:0;padding:3px}
  .steps a{flex:1 1 0;min-width:0;flex-direction:column;gap:2px;padding:6px 2px;font-size:11.5px;justify-content:center;text-align:center}
  .steps .n{width:18px;height:18px}
  .pubg{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:"video" "chan" "pics" "res"}
  .cut-opts{grid-template-columns:minmax(0,1fr)}
  .cut-ready{grid-template-columns:minmax(0,1fr)}
  .cut-side .cut-acts{flex-direction:row}
  .cut-acts .btn{flex:1 1 calc(50% - 8px)}
  details.chrow .chbody{padding-left:0}
  .foot{padding-right:64px}
  #cutsheet .cs-bar{padding:8px 10px}
  #cutsheet .cs-t{display:none}
  .pubframes{gap:6px}
}
/* room under the cut card so its last button never sits against the bottom bar */
#pvcut{margin-bottom:96px}
.cut-opts+.card,.cut>.row:last-child{margin-bottom:6px}
/* while the prompter band sits at the top edge (camera on), the step tabs and the phone header move clear of it */
body:has(#lensband.top) .steps{margin-top:54px}
@media (max-width:760px){body:has(#lensband.top) .steps{margin-top:0}body:has(#lensband.top) #main{padding-top:136px}}
