/* GrabCast Studio (studio.html; assets/studio-ui.js). Theme tokens come from theme.css (light + html.dark). */
.st *{box-sizing:border-box}
.st [hidden],.st-dlg [hidden]{display:none!important}
.st-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.st{--gw:112px;--st-acc:#6366f1;--st-clip-v:#4f46e5;--st-clip-a:#0d9488;--st-clip-t:#d97706;--st-clip-o:#db2777;--st-clip-c:#7c3aed;--st-play:#ef4444;--st-snap:#f59e0b;color:var(--text)}
.st-wrap{max-width:1180px;margin:0 auto;padding:0 16px}
.st-pad{padding:16px}
.st-crumb{font-size:13px;color:var(--muted);margin:18px 0 0}.st-crumb a{color:inherit}
.st-home h1{font-size:clamp(28px,4.6vw,44px);line-height:1.08;font-weight:800;letter-spacing:-.02em;margin:10px 0}
.st-grad{background:linear-gradient(135deg,#4f46e5,#9333ea 60%,#db2777);-webkit-background-clip:text;background-clip:text;color:transparent}
html.dark .st-grad{background:linear-gradient(135deg,#a5b4fc,#d8b4fe 60%,#f9a8d4);-webkit-background-clip:text;background-clip:text}
.st-lead{font-size:16.5px;line-height:1.6;color:var(--muted);max-width:720px;margin:0}
.st-cta{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 8px}
.st-h2{font-size:20px;font-weight:800;margin:26px 0 12px}
.st-seo{padding-bottom:30px;color:var(--muted);font-size:15px;line-height:1.6}.st-seo p{margin:0 0 10px;max-width:760px}
.st-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 14px;border-radius:12px;font-weight:700;font-size:14px;border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;text-decoration:none;font-family:inherit;white-space:nowrap}
.st-btn:hover{border-color:#818cf8}
.st-btn.pri{border:0;color:#fff;background:linear-gradient(135deg,#4f46e5,#7c3aed 55%,#9333ea)}
.st-btn.danger{color:#b91c1c;border-color:#fca5a5}html.dark .st-btn.danger{color:#fca5a5}
.st-btn.sm{min-height:32px;padding:4px 10px;font-size:13px;border-radius:9px}
.st-btn.ib{min-width:36px;padding:4px 8px}
.st-btn[disabled],.st-btn[aria-disabled=true]{opacity:.45;cursor:not-allowed}
.st-btn[aria-pressed=true]{background:rgba(99,102,241,.16);border-color:#818cf8;color:var(--gc-ink-accent)}
.st button:focus-visible,.st a:focus-visible,.st input:focus-visible,.st select:focus-visible,.st textarea:focus-visible,.st [tabindex]:focus-visible,.st-dlg button:focus-visible,.st-dlg input:focus-visible,.st-dlg select:focus-visible{outline:2px solid #6366f1;outline-offset:2px}
.st-in{font:inherit;font-size:14px;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:6px 8px;min-height:34px;max-width:100%;width:100%}
/* projects grid */
.st-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.st-card{border:1px solid var(--border);border-radius:14px;background:var(--surface);overflow:hidden;display:flex;flex-direction:column}
.st-card .th{display:grid;place-items:center;height:140px;background:var(--surface2);border:0;width:100%;cursor:pointer;color:var(--muted);font-size:34px;background-size:cover;background-position:center}
.st-card .th i{display:block;border:2px solid var(--border);border-radius:5px;background:var(--surface)}
.st-card .meta{padding:10px 12px 6px}.st-card .meta b{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.st-card .meta span{font-size:12px;color:var(--muted)}
.st-card .acts{display:flex;gap:6px;padding:4px 12px 12px}
.st-empty{color:var(--muted)}
/* editor shell */
.st-ed{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:calc(100dvh - 64px);min-height:600px;background:var(--bg);border-top:1px solid var(--border)}
.st-top{display:flex;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid var(--border);background:var(--surface);flex-wrap:wrap}
.st-top .name{font:inherit;font-weight:700;font-size:15px;min-width:0;width:200px;max-width:34vw;background:transparent;border:1px solid transparent;border-radius:8px;padding:5px 8px;color:var(--text)}
.st-top .name:hover,.st-top .name:focus{border-color:var(--border);background:var(--bg)}
.st-top .sp{flex:1}
.st-save{font-size:12px;color:var(--muted);min-width:90px}
.st-seg{display:inline-flex;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.st-seg button{border:0;border-right:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:12.5px;font-weight:700;padding:5px 9px;min-height:32px;cursor:pointer}
.st-seg button:last-child{border-right:0}.st-seg button[aria-pressed=true]{background:rgba(99,102,241,.2);color:var(--gc-ink-accent)}
.st-main{display:grid;grid-template-columns:250px minmax(0,1fr) 290px;min-height:0}
.st-panel{background:var(--surface);overflow:auto;min-height:0;padding:10px}
.st-bin{border-right:1px solid var(--border)}.st-insp{border-left:1px solid var(--border)}
.st-panel h2{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 8px;font-weight:800}
.st-drop{border:2px dashed var(--border);border-radius:12px;padding:12px;text-align:center;font-size:13px;color:var(--muted);margin-bottom:10px}
.st-drop.over,.st-ed.over .st-drop{border-color:#6366f1;background:rgba(99,102,241,.08)}
.st-assets{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.st-asset{position:relative;border:1px solid var(--border);border-radius:10px;overflow:hidden;background:var(--surface2);cursor:grab}
.st-asset .im{height:62px;background-size:cover;background-position:center;display:grid;place-items:center;font-size:22px;color:var(--muted)}
.st-asset b{display:block;font-size:11.5px;padding:3px 6px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-asset small{display:block;font-size:11px;color:var(--muted);padding:0 6px 4px}
.st-asset .add{position:absolute;right:4px;top:4px;min-height:26px;min-width:26px;padding:0 6px;border-radius:8px;border:0;background:rgba(15,23,42,.7);color:#fff;font-weight:800;cursor:pointer}
/* preview */
.st-prev{display:grid;grid-template-rows:minmax(0,1fr) auto;min-width:0;min-height:0;background:#0b0f1a}
.st-stage{display:grid;place-items:center;min-height:0;overflow:auto;padding:10px}
.st-stage canvas{max-width:100%;max-height:100%;background:#000;border-radius:6px;box-shadow:0 8px 30px rgba(0,0,0,.5);object-fit:contain}
.st-stage.z25 canvas{max-height:none;width:25%}.st-stage.z50 canvas{max-height:none;width:50%}.st-stage.z100 canvas{max-height:none;width:100%}
.st-trans{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px;background:var(--surface);border-top:1px solid var(--border);flex-wrap:wrap}
.st-time{font-variant-numeric:tabular-nums;font-weight:700;font-size:13px;min-width:130px;text-align:center}
.st-trans select{width:auto;min-height:32px}
/* inspector */
.st-fld{display:grid;grid-template-columns:86px minmax(0,1fr) auto;align-items:center;gap:6px;margin:0 0 8px;font-size:13px}
.st-fld>label{color:var(--muted)}
.st-fld input[type=range]{width:100%;min-width:0}
.st-fld .num{width:62px;min-height:30px;padding:3px 5px;font-size:13px}
.st-kf{border:1px solid var(--border);background:var(--surface);color:var(--muted);border-radius:7px;width:28px;height:28px;cursor:pointer;font-size:13px;line-height:1}
.st-kf[aria-pressed=true]{background:#f59e0b;color:#fff;border-color:#f59e0b}
.st-sec{border-top:1px solid var(--border);padding-top:10px;margin-top:10px}
.st-hint{font-size:12.5px;color:var(--muted);line-height:1.5}
/* timeline */
.st-tl{background:var(--surface);border-top:1px solid var(--border);display:grid;grid-template-rows:auto 250px;min-width:0}
.st-tlbar{display:flex;gap:6px;align-items:center;padding:6px 10px;border-bottom:1px solid var(--border);overflow-x:auto;scrollbar-width:thin}
.st-tlbar .sp{flex:1;min-width:6px}
.st-scroll{position:relative;overflow:auto;min-width:0;background:var(--bg)}
.st-tlin{position:relative;min-height:100%}
.st-ruler{position:sticky;top:0;z-index:5;height:24px;background:var(--surface2);border-bottom:1px solid var(--border);cursor:col-resize;touch-action:none}
.st-tick{position:absolute;top:0;height:100%;border-left:1px solid var(--border);font-size:10.5px;color:var(--muted);padding-left:3px;pointer-events:none;user-select:none}
.st-mk{position:absolute;top:10px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:9px solid #0ea5e9;transform:translateX(-5px);cursor:pointer;z-index:6;background:none;padding:0}
.st-track{position:relative;height:58px;border-bottom:1px solid var(--border)}
.st-track.sel{background:rgba(99,102,241,.05)}
.st-th{position:sticky;left:0;z-index:4;width:var(--gw);height:100%;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;justify-content:center;gap:3px;padding:3px 6px}
.st-th b{font-size:11.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-th .tb{display:flex;gap:3px}
.st-th .tb button{border:1px solid var(--border);background:var(--surface2);color:var(--muted);border-radius:6px;width:24px;height:22px;font-size:11px;cursor:pointer;padding:0;line-height:1}
.st-th .tb button[aria-pressed=true]{background:rgba(99,102,241,.2);color:var(--gc-ink-accent);border-color:#818cf8}
.st-tr-body{position:absolute;top:0;bottom:0;left:var(--gw);right:0}
.st-clip{position:absolute;top:5px;bottom:5px;border-radius:8px;overflow:hidden;border:2px solid transparent;color:#fff;font-size:11px;font-weight:700;cursor:grab;user-select:none;-webkit-user-select:none;min-width:6px;background:var(--st-clip-v)}
.st-clip.k-audio{background:var(--st-clip-a)}.st-clip.k-text{background:var(--st-clip-t)}.st-clip.k-overlay{background:var(--st-clip-o)}.st-clip.k-caption{background:var(--st-clip-c)}
.st-clip.sel{border-color:#fff;box-shadow:0 0 0 2px #6366f1;touch-action:none;z-index:3}
.st-clip.drag{opacity:.85;z-index:9;cursor:grabbing}
.st-clip .strip{position:absolute;inset:0;display:flex;opacity:.65;pointer-events:none}
.st-clip .strip img{height:100%;flex:0 0 auto;object-fit:cover;width:72px}
.st-clip canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.st-clip .lb{position:absolute;left:8px;top:2px;right:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px rgba(0,0,0,.7);pointer-events:none}
.st-clip .tr{position:absolute;left:0;top:0;bottom:0;width:0;border-right:14px solid transparent;border-top:0;border-bottom:0;background:linear-gradient(90deg,rgba(255,255,255,.5),transparent);pointer-events:none}
.st-clip .h{position:absolute;top:0;bottom:0;width:12px;cursor:ew-resize;touch-action:none;background:rgba(255,255,255,.0)}
.st-clip .h::after{content:"";position:absolute;top:30%;bottom:30%;width:3px;border-radius:2px;background:rgba(255,255,255,.75)}
.st-clip .h.l{left:0}.st-clip .h.l::after{left:3px}.st-clip .h.r{right:0}.st-clip .h.r::after{right:3px}
@media(pointer:coarse){.st-clip .h{width:20px}.st-th .tb button{width:30px;height:28px}}
.st-play{position:absolute;top:0;bottom:0;width:0;border-left:2px solid var(--st-play);z-index:7;pointer-events:none}
.st-play::before{content:"";position:absolute;top:0;left:-7px;border:6px solid transparent;border-top:9px solid var(--st-play);border-bottom:0}
.st-guide{position:absolute;top:0;bottom:0;width:0;border-left:1px dashed var(--st-snap);z-index:8;pointer-events:none}
/* dialogs, drawer, sheets */
.st-dlg-bg{position:fixed;inset:0;z-index:100;background:rgba(2,6,23,.55);display:grid;place-items:center;padding:12px}
.st-dlg{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:16px;max-width:520px;width:100%;max-height:92dvh;overflow:auto;padding:18px;box-shadow:0 20px 60px rgba(0,0,0,.4)}
.st-dlg h2{margin:0 0 10px;font-size:18px;font-weight:800}
.st-dlg .row{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0;justify-content:flex-end}
.st-dlg label{display:block;font-size:13px;font-weight:600;margin:10px 0 4px}
.st-dlg .st-in{width:100%}
.st-asp{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:6px}
.st-asp label{margin:0;border:1px solid var(--border);border-radius:10px;padding:8px 4px;text-align:center;cursor:pointer;font-weight:700;font-size:13px}
.st-asp input{position:absolute;opacity:0;pointer-events:none}.st-asp label:has(input:checked){border-color:#6366f1;background:rgba(99,102,241,.14)}
.st-asp label:has(input:focus-visible){outline:2px solid #6366f1}
.st-prog{height:10px;border-radius:99px;background:var(--surface2);overflow:hidden;margin:10px 0 4px;border:1px solid var(--border)}
.st-prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,#4f46e5,#db2777);transition:width .15s}
.st-drawer{position:fixed;top:0;right:0;bottom:0;width:min(360px,100vw);z-index:90;background:var(--surface);border-left:1px solid var(--border);box-shadow:-10px 0 40px rgba(0,0,0,.3);padding:14px;overflow:auto}
.st-vlist{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px}
.st-vlist li{display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:10px;padding:8px 10px;font-size:13px}.st-vlist li span{flex:1;min-width:0}
.st-keys{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:13.5px}.st-keys kbd{font:inherit;font-size:12px;font-weight:700;border:1px solid var(--border);border-bottom-width:2px;border-radius:6px;padding:1px 6px;background:var(--surface2);white-space:nowrap}
.st-toast{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:120;background:#0f172a;color:#fff;padding:9px 14px;border-radius:10px;font-size:13px;max-width:92vw}
.st-sheet-bar{display:none}
/* mobile (<= 760px): preview, compact toolbar, scrollable timeline, bottom-sheet panels */
@media(max-width:760px){
  .st-ed{height:auto;min-height:0;grid-template-rows:auto auto auto}
  .st-main{display:block}
  .st-prev{grid-template-rows:auto auto}
  .st-stage{height:38dvh;padding:6px}
  .st-top .name{width:140px}.st-top .opt{display:none}
  .st-top{gap:6px}
  .st-bin,.st-insp{position:fixed;left:0;right:0;bottom:0;z-index:80;max-height:62dvh;border:1px solid var(--border);border-bottom:0;border-radius:16px 16px 0 0;box-shadow:0 -10px 40px rgba(0,0,0,.35);transform:translateY(105%);visibility:hidden;transition:transform .2s,visibility 0s .2s}
  .st-bin.open,.st-insp.open{transform:none;visibility:visible;transition:transform .2s}
  .st-sheet-bar{display:flex;gap:6px;padding:6px 10px;background:var(--surface);border-top:1px solid var(--border)}
  .st-tl{grid-template-rows:auto 220px}
  .st{--gw:78px}.st-th b{font-size:10.5px}
  .st-time{min-width:110px}
  .st-fld{grid-template-columns:78px minmax(0,1fr) auto}
}
@media(max-width:1100px) and (min-width:761px){.st-main{grid-template-columns:200px minmax(0,1fr) 250px}}
@media(prefers-reduced-motion:reduce){.st *{transition:none!important}}

.st-close{display:none}@media(max-width:760px){.st-close{display:inline-flex;float:right}}
.st-ticks{position:absolute;left:var(--gw);top:0;bottom:0;right:0}

.st-btn.lg{min-height:46px;padding:10px 20px;font-size:15px}
.st-trustline{display:flex;flex-wrap:wrap;gap:4px 16px;margin:6px 0 0;font-size:13px;font-weight:600;color:var(--muted)}
.st-trustline span::before{content:"✓ ";color:#16a34a;font-weight:900}
.st-banner{margin:14px 0 0;padding:10px 12px;border:1px dashed #818cf8;border-radius:12px;background:var(--surface);font-size:14px;display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center}
.st-why{margin:16px 0 0;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.st-why>summary{cursor:pointer;padding:12px 14px;font-weight:800;font-size:15px;list-style:none;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
.st-why>summary::-webkit-details-marker{display:none}.st-why>summary::before{content:"▸";margin-right:2px}.st-why[open]>summary::before{content:"▾"}
.st-why>summary:focus-visible{outline:2px solid #6366f1;outline-offset:2px;border-radius:10px}
.st-whyin{padding:0 14px 14px;font-size:14.5px;line-height:1.6;color:var(--muted)}.st-whyin p{margin:0 0 10px;max-width:760px}
.st-tbl-wrap{overflow-x:auto;margin:0 0 8px}
.st-tbl{border-collapse:collapse;width:100%;min-width:520px;font-size:13.5px}
.st-tbl th,.st-tbl td{border:1px solid var(--border);padding:7px 9px;text-align:left;vertical-align:top;color:var(--text)}
.st-tbl thead th{background:var(--surface2);font-weight:800}.st-tbl tbody th{font-weight:700;background:var(--surface2);width:26%}
.st-trust{font-size:11.5px;color:var(--muted);white-space:nowrap}
@media(max-width:1280px){.st-trust{display:none}}
.st-prev{position:relative}
.st-emptystage{position:absolute;inset:0 0 56px 0;display:grid;place-content:center;justify-items:center;gap:10px;text-align:center;pointer-events:none;color:#cbd5e1;font-size:14px;padding:12px}
.st-emptystage .st-btn{pointer-events:auto}
.st-dlg .st-trust{display:block;white-space:normal;margin-top:6px}

/* UI wave B (2026-10-05) */
/* Home: projects first, CapCut comparison collapsed; on phones the table becomes stacked cards (Feature / Studio / CapCut) */
.st-why{margin:22px 0 0}
@media(max-width:640px){
  .st-tbl-wrap{overflow:visible}
  .st-tbl{min-width:0;font-size:13.5px}
  .st-tbl thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .st-tbl,.st-tbl tbody,.st-tbl tr,.st-tbl th,.st-tbl td{display:block;width:auto}
  .st-tbl tr{border:1px solid var(--border);border-radius:12px;overflow:hidden;margin:0 0 10px;background:var(--surface)}
  .st-tbl th,.st-tbl td{border:0}
  .st-tbl tbody th{width:auto;padding:8px 10px;border-bottom:1px solid var(--border)}
  .st-tbl td{padding:6px 10px 8px}
  .st-tbl td+td{border-top:1px dashed var(--border)}
  .st-tbl td::before{display:block;font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:1px}
  .st-tbl td:nth-of-type(1)::before{content:"GrabCast Studio";color:var(--gc-ink-accent,#4f46e5)}
  .st-tbl td:nth-of-type(2)::before{content:"CapCut"}
}
/* Editor toolbar panels (Captions, Audio, Auto edit, Coach, AI Director, Repurpose): placed in the editor grid BELOW the top bar,
   so Export, the aspect buttons, History and .gcproj stay visible and clickable. Desktop = right side drawer; phone = bottom sheet. */
.st-ed{position:relative}
.st-ed>.cap-panel,.st-ed>.au-panel,.st-ed>.br-panel,.st-ed>.co-panel,.st-ed>.dr-panel,.st-ed>.rp-panel{position:absolute;grid-row:2/-1;grid-column:1/-1;top:8px;right:12px;bottom:12px;left:auto;height:auto;max-height:none;z-index:60;overflow:auto;overscroll-behavior:contain}
@media(max-width:760px){
  .st-ed>.cap-panel,.st-ed>.au-panel,.st-ed>.br-panel,.st-ed>.co-panel,.st-ed>.dr-panel,.st-ed>.rp-panel{left:0;right:0;top:auto;bottom:0;width:auto;height:min(72dvh,100%);border-bottom:0;border-radius:16px 16px 0 0;box-shadow:0 -10px 40px rgba(0,0,0,.35);padding-bottom:calc(64px + env(safe-area-inset-bottom))}
  .st-ed>.st-panel>.br-head,.st-ed>.st-panel>.co-head,.st-ed>.st-panel>.cap-head,.st-ed>.st-panel>.au-head{position:sticky;top:-12px;z-index:2;margin:-12px -12px 8px;padding:10px 12px;background:inherit;border-bottom:1px solid var(--border)}
}
/* Mobile editor: full-height app layout (site header hidden while editing; ← Projects goes back), bigger timeline, scrollable toolbar,
   Media/Inspector bar at the bottom with room on the left for the Report button */
@media(max-width:760px){
  body.st-editing #gc-header{display:none}
  .st-ed{height:100dvh;min-height:560px;grid-template-rows:auto auto minmax(0,1fr) auto;border-top:0}
  .st-top{padding:6px 8px}
  .st-top .st-btn.ib{min-width:40px;font-size:16px}
  .st-stage{height:min(34dvh,45vh)}
  .st-trans{padding:4px 6px}
  .st-sheet-bar{order:4;min-height:56px;align-items:center;justify-content:flex-end;padding:6px 10px 6px calc(64px + env(safe-area-inset-left));padding-bottom:calc(6px + env(safe-area-inset-bottom))}
  .st-sheet-bar .st-btn{min-height:40px;flex:0 1 130px}
  .st-tl{grid-template-rows:auto minmax(220px,1fr);min-height:0}
  .st-tlbar{gap:6px;padding:6px 8px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);padding-right:28px}
  .st-tlbar>*{flex:none;scroll-snap-align:start}
  .st-tlbar .st-btn.sm{min-height:38px}
  .st-scroll{overflow:auto;overscroll-behavior-x:contain}
  .st-track{height:66px}
}
/* room under the last track so the bottom-left Report button never hides a track header or clip */
@media(min-width:761px){.st-tlin{padding-bottom:52px}}
.st-home .st-empty{margin:16px 0 0}
