/* Screenplay font: Courier Prime (SIL OFL, fonts/OFL.txt), bundled so every Mac shows the same industry-standard page.
   Without it the page fell back to thin Courier New. export.js points the PDF at the same files (Exporter.fontCSS). */
@font-face{font-family:'Courier Prime';src:url('fonts/CourierPrime-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:block}
@font-face{font-family:'Courier Prime';src:url('fonts/CourierPrime-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:block}
@font-face{font-family:'Courier Prime';src:url('fonts/CourierPrime-Italic.ttf') format('truetype');font-weight:400;font-style:italic;font-display:block}
@font-face{font-family:'Courier Prime';src:url('fonts/CourierPrime-BoldItalic.ttf') format('truetype');font-weight:700;font-style:italic;font-display:block}
/* Material-inspired light design: white floating cards, soft shadows, blue accents */
:root{--link:#5f9b74;--link-ink:#2f5a3e;--link-bg:rgba(95,155,116,.13);--link-bg2:rgba(95,155,116,.24); /* board ↔ script text links (links.js) */

  --bg:#f1f3f4; --bg2:#ffffff; --bg3:#f8f9fa; --bg4:#e8eaed; --line:#e3e5e8;
  --fg:#202124; --fg2:#5f6368; --fg3:#9aa0a6; --accent:#1a73e8; --accent2:#1a73e8; --tint:#e8f0fe; --tintfg:#1967d2;
  --ok:#188038; --warn:#e37400; --err:#d93025; --shot:#6a86a6; /* muted (shot colours: script.js SIZE_COLORS) */ --scene:#e37400;
  --page:#ffffff; --pagefg:#202124; --canvas:#fbfbfc; --gridline:rgba(0,0,0,.07);
  --sh1:0 1px 2px rgba(60,64,67,.12),0 1px 3px 1px rgba(60,64,67,.08);
  --sh2:0 2px 6px rgba(60,64,67,.15),0 8px 24px rgba(60,64,67,.12);
  --r:16px; --ease:cubic-bezier(.2,.8,.2,1);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Google Sans","Roboto",system-ui,sans-serif;
}
:root[data-theme=dark]{
  --bg:#1f1f1f; --bg2:#2a2a2b; --bg3:#323234; --bg4:#3c3c3f; --line:#3f4045;
  --fg:#e8eaed; --fg2:#bdc1c6; --fg3:#80868b; --accent:#8ab4f8; --accent2:#1a73e8; --tint:#2c3a51; --tintfg:#a8c7fa;
  --page:#2a2a2b; --pagefg:#e8eaed; --canvas:#232325; --gridline:rgba(255,255,255,.06);
  --sh1:0 1px 3px rgba(0,0,0,.4); --sh2:0 8px 24px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--fg);font-size:13px;overflow:hidden;user-select:none;-webkit-font-smoothing:antialiased}
button{font:inherit;font-weight:500;color:var(--fg);background:var(--bg2);border:1px solid var(--line);border-radius:999px;padding:6px 14px;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s,transform .1s}
button:hover{background:var(--bg3);box-shadow:var(--sh1)} button:active{transform:scale(.97)}
button.primary{background:var(--accent2);border-color:var(--accent2);color:#fff}
button.primary:hover{background:#1765cc}
button.danger{color:var(--err)}
button.icon{width:32px;height:32px;padding:0;display:inline-grid;place-items:center;border-color:transparent;background:transparent;font-size:15px;box-shadow:none}
button.icon:hover{background:var(--bg4)} button.icon.sm{width:24px;height:24px;font-size:12px}
button.on,.tool.on{background:var(--tint);border-color:transparent;color:var(--tintfg)}
input,select,textarea{font:inherit;color:var(--fg);background:var(--bg3);border:1px solid var(--line);border-radius:10px;padding:7px 10px;outline:none;transition:border-color .15s,box-shadow .15s;user-select:text}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}
input[type=color]{padding:0;width:32px;height:28px;border-radius:8px;border:none;background:none}
input[type=checkbox]{accent-color:var(--accent);width:16px;height:16px}
input[type=range]{accent-color:var(--accent);padding:0;border:none;background:none;box-shadow:none}
label.f{display:flex;flex-direction:column;gap:4px;color:var(--fg2);font-size:11px;font-weight:500;margin-bottom:10px}
label.row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0;color:var(--fg)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
.hidden{display:none!important}
.pill{font-size:11px;padding:3px 10px;border-radius:999px;background:var(--bg4);color:var(--fg2);transition:color .3s}
.pill.dirty{color:var(--warn)}
.card-f{background:var(--bg2);border-radius:var(--r);box-shadow:var(--sh1)}

#app{display:grid;grid-template-rows:46px 1fr 62px;height:100vh}
#titlebar{display:flex;align-items:center;padding:0 12px 0 88px;background:var(--bg2);box-shadow:var(--sh1);-webkit-app-region:drag;gap:12px;z-index:5}
#projname{font-weight:600;flex:1;color:var(--fg);display:flex;align-items:center;gap:8px;font-size:14px}
#projname::before{content:"";width:22px;height:22px;background:url(icon.png) center/contain no-repeat}
.tb-right{display:flex;gap:6px;align-items:center;-webkit-app-region:no-drag}
#main{display:flex;min-height:0;padding:10px;gap:10px}
#sidebar{width:250px;background:var(--bg2);border-radius:var(--r);box-shadow:var(--sh1);display:flex;flex-direction:column;transition:margin-left .3s var(--ease),opacity .3s;overflow:hidden}
#sidebar.collapsed{margin-left:-260px;opacity:0}
.sb-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px 6px;color:var(--fg2);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em}
#tree{overflow:auto;flex:1;padding:4px 8px 20px}
.tn{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background .12s}
.tn:hover{background:var(--bg3)} .tn.active{background:var(--tint);color:var(--tintfg);font-weight:500}
.tn.drop{outline:2px dashed var(--accent)}
.tn .ic{width:16px;text-align:center;opacity:.75;flex:none;color:var(--accent)} .tn .nm{flex:1;overflow:hidden;text-overflow:ellipsis}
.tn .add{opacity:0;font-size:15px;padding:0 6px;border-radius:999px} .tn:hover .add{opacity:.7} .tn .add:hover{opacity:1;background:var(--bg4)}
.tsec{margin-top:4px} .tkids{padding-left:12px;overflow:hidden}
.tsec>.tn{font-weight:600}
/* Keep pinned timeline controls and workspace popovers below app-level dialogs such as Settings. */
#workspace{flex:1;position:relative;isolation:isolate;min-width:0;border-radius:var(--r);overflow:hidden;background:var(--bg2);box-shadow:var(--sh1)}
.module{position:absolute;inset:0;display:flex;opacity:0;pointer-events:none;visibility:hidden;transform:translateY(6px);transition:opacity .22s var(--ease),transform .22s var(--ease),visibility 0s linear .22s}
.module.active{opacity:1;pointer-events:auto;visibility:visible;transform:none;transition-delay:0s}
/* an inactive tool must not catch clicks: some children turn pointer-events back on (Set Plan's floating cards,
   .rightcol>.card-f), which made invisible Set Plan panels swallow clicks over Write. visibility:hidden (after the
   fade) and this rule stop that for every tool. */
.module:not(.active) *{pointer-events:none!important}
#dock{display:flex;justify-content:center;align-items:center;gap:4px;padding-bottom:8px}
#dock .dock-in{display:flex;align-items:center;gap:2px;background:var(--bg2);border-radius:999px;box-shadow:var(--sh1);padding:4px}
.dock-btn{display:flex;align-items:center;gap:7px;border:none;background:transparent;border-radius:999px;padding:9px 16px;color:var(--fg2);font-size:12px;box-shadow:none!important}
.dock-btn .di{font-size:15px;line-height:1} .dock-btn.active{color:var(--tintfg);background:var(--tint)}
.dock-sep{width:1px;height:24px;background:var(--line);margin:0 6px}
body.focus #titlebar,body.focus #dock,body.focus #sidebar{display:none} body.focus #app{grid-template-rows:1fr} body.focus #main{padding:0} body.focus #workspace{border-radius:0}

#overlay{position:fixed;inset:0;background:rgba(32,33,36,.35);display:grid;place-items:center;z-index:50;animation:fade .2s;backdrop-filter:blur(2px)}
.dialog{background:var(--bg2);border-radius:24px;padding:24px;width:min(540px,92vw);max-height:88vh;overflow:auto;box-shadow:var(--sh2);animation:pop .25s var(--ease)}
.dialog.wide{width:min(860px,94vw)}
.dialog h2{margin:0 0 4px;font-weight:500;font-size:20px} .dialog p{color:var(--fg2);margin:0 0 16px;line-height:1.5}
.dialog .actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.dialog h3{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--fg2);margin:18px 0 6px}
.pathrow{display:flex;gap:8px;align-items:center;margin-bottom:10px}.pathrow code{flex:1;background:var(--bg3);padding:8px 12px;border-radius:10px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg2)}
@keyframes fade{from{opacity:0}} @keyframes pop{from{opacity:0;transform:scale(.96) translateY(8px)}}
#ctxmenu{position:fixed;z-index:60;background:var(--bg2);border-radius:12px;padding:6px;min-width:170px;box-shadow:var(--sh2);animation:pop .12s}
#ctxmenu div{padding:8px 12px;border-radius:8px;cursor:pointer} #ctxmenu div:hover{background:var(--bg3)}
#toast{position:fixed;bottom:80px;left:50%;transform:translateX(-50%) translateY(20px);background:#323232;color:#fff;padding:10px 18px;border-radius:8px;opacity:0;transition:.25s var(--ease);pointer-events:none;z-index:70;box-shadow:var(--sh2)}
#toast.show{opacity:1;transform:translateX(-50%)}
.empty{margin:auto;text-align:center;color:var(--fg2)} .empty .big{font-size:42px;color:var(--accent);opacity:.5;margin-bottom:8px}
.empty button{margin-top:14px}

.toolbar{display:flex;align-items:center;gap:4px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--bg2);flex-wrap:wrap;min-height:50px}
.toolbar .sep{width:1px;height:20px;background:var(--line);margin:0 6px}
.toolbar .grow{flex:1}
.tool{border-radius:999px;padding:6px 12px;border:1px solid transparent;background:transparent;box-shadow:none!important}
.tool:hover{background:var(--bg4)}
.panel{width:280px;background:var(--bg2);border-left:1px solid var(--line);overflow:auto;padding:16px;transition:margin-right .3s var(--ease)}
.panel.collapsed{margin-right:-280px}
.panel h4,.fl-h{margin:0 0 10px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--fg2)}
.col{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0}

/* ---------- SCRIPT ---------- */
.sc-outline{width:220px;background:var(--bg2);border-right:1px solid var(--line);overflow:auto;padding:10px;transition:margin-left .3s var(--ease)}
.sc-outline.collapsed{margin-left:-220px}
.ol{padding:7px 10px;border-radius:999px;cursor:pointer;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ol:hover{background:var(--bg3)} .ol.sec{font-weight:600;color:var(--accent)} .ol .n{color:var(--fg3);margin-right:6px}
.sc-scroll{flex:1;overflow:auto;background:var(--bg);scroll-behavior:smooth}
.page{width:8.5in;min-height:11in;margin:30px auto 120px;background:var(--page);color:var(--pagefg);padding:1in 1in 1in 1.5in;border-radius:6px;box-shadow:var(--sh1);position:relative}
#editor{font-family:"Courier Prime","Courier New",Courier,monospace;font-size:12pt;line-height:1.0;outline:none;user-select:text;caret-color:var(--accent);min-height:8in}
#editor ::selection{background:color-mix(in srgb,var(--accent) 25%,transparent)}
#editor>div{min-height:1em;white-space:pre-wrap;word-wrap:break-word;position:relative;transition:color .15s,background .2s}
#editor .scene{text-transform:uppercase;font-weight:700;margin-top:1em}
#editor .character{margin-left:2.2in;text-transform:uppercase} /* = 3.7in from the page edge (page padding is 1.5in) */
#editor .dialogue{margin-left:1.0in;margin-right:1.5in}
#editor .parenthetical{margin-left:1.6in;margin-right:2.1in}
#editor .transition{text-align:right;text-transform:uppercase}
#editor .centered{text-align:center}
#editor .section{color:var(--accent);font-family:-apple-system,system-ui;font-weight:600}
#editor .synopsis{color:var(--fg2);font-style:italic}
#editor .note{color:var(--ok)} #editor .lyrics{font-style:italic}
#editor .title{color:var(--fg2)}
/* Fountain emphasis (Emphasis in script.js): **bold** *italic* _underline_. The markers stay in the text, dimmed, so what you type is what is saved */
#editor .em.b{font-weight:700} #editor .em.i{font-style:italic} #editor .em.u{text-decoration:underline;text-underline-offset:2px} #editor .em.k{color:var(--fg3);font-weight:400;font-style:normal;text-decoration:none}
#editor>div.hl-shot{background:color-mix(in srgb,var(--shot) 9%,transparent)}
#editor>div.hl-scene{background:color-mix(in srgb,var(--scene) 7%,transparent)}
body.tabmode #editor .scene,body.tabmode #editor .action,body.tabmode #editor .transition,body.tabmode #editor .character{margin-top:1em}
#editor>div.cur::before{content:attr(data-label);position:absolute;left:-1.35in;width:1.0in;text-align:right;font:10px -apple-system,system-ui;color:var(--fg3);top:2px;text-transform:uppercase;letter-spacing:.05em}
#editor .scene[data-num]::after{content:attr(data-num);position:absolute;left:-.45in;color:var(--fg3);font-weight:400}
.marks{position:absolute;inset:0;pointer-events:none}
.mark{position:absolute;width:6px;border-radius:4px;pointer-events:auto;cursor:pointer;transition:width .15s,opacity .2s;opacity:.85}
.mark:hover,.mark.on{width:9px;opacity:1}
.mark.mk-shot{background:var(--shot)} .mark.mk-scene{background:var(--scene)}
.mark span{position:absolute;top:0;font:600 10px -apple-system,system-ui;color:#fff;padding:2px 7px;border-radius:999px;white-space:nowrap;box-shadow:var(--sh1)}
.mark.mk-shot span{left:12px;background:var(--shot)} .mark.mk-scene span{right:12px;background:var(--scene)}
#selpop{position:fixed;z-index:45;display:flex;gap:4px;background:var(--bg2);border-radius:999px;box-shadow:var(--sh2);padding:4px;animation:pop .15s var(--ease)}
#selpop button{border:none;box-shadow:none;padding:6px 12px;font-size:12px}
#selpop .s{color:var(--shot)} #selpop .c{color:var(--scene)}
.sc-status{display:flex;gap:14px;color:var(--fg2);font-size:11px;padding:0 10px}
#ac{position:fixed;background:var(--bg2);border-radius:10px;padding:4px;z-index:40;font-family:"Courier Prime",Courier,monospace;box-shadow:var(--sh2)}
#ac div{padding:4px 10px;border-radius:6px;cursor:pointer} #ac div.sel{background:var(--accent2);color:#fff}
.cards{flex:1;overflow:auto;padding:24px;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;align-content:start;background:var(--bg)}
.card{background:var(--bg2);border-radius:14px;padding:14px;min-height:140px;cursor:grab;box-shadow:var(--sh1);transition:transform .2s var(--ease),box-shadow .2s,opacity .2s;border:2px solid transparent}
.card:hover{transform:translateY(-2px);box-shadow:var(--sh2)}
.card.dragging{opacity:.4} .card.over{border-color:var(--accent)}
.card .ch{font-weight:700;font-size:12px;margin-bottom:8px;text-transform:uppercase} .card .cn{color:var(--fg3);font-size:11px}
.card .cs{color:var(--fg2);font-size:12px;line-height:1.4}
.card .cb{display:flex;gap:4px;margin-top:10px;flex-wrap:wrap} .card .cb img{width:56px;border-radius:4px;background:#fff}
.shotlist-row{display:flex;gap:8px;align-items:center;padding:8px 10px;border-radius:12px;cursor:pointer;margin-bottom:4px}
.shotlist-row:hover{background:var(--bg3)} .shotlist-row .tag{font:600 10px -apple-system;color:#fff;border-radius:999px;padding:2px 8px;flex:none}
.shotlist-row .d{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg2)}
.refs{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-bottom:10px}
.refs .ref{position:relative;border-radius:10px;overflow:hidden;aspect-ratio:16/10;background:var(--bg4)}
.refs .ref img{width:100%;height:100%;object-fit:cover;display:block;cursor:zoom-in}
.refs .ref button{position:absolute;top:4px;right:4px;width:20px;height:20px;padding:0;font-size:10px;opacity:0}
.refs .ref:hover button{opacity:1}
.dropzone{border:2px dashed var(--line);border-radius:12px;padding:14px;text-align:center;color:var(--fg2);font-size:12px;cursor:pointer;transition:border-color .15s,background .15s;margin-bottom:12px}
.dropzone.over,.dropzone:hover{border-color:var(--accent);background:var(--tint)}
.lightbox{max-width:90vw;max-height:85vh;border-radius:12px;box-shadow:var(--sh2)}
@media print{body *{visibility:hidden}.page,.page *{visibility:visible}.page{position:absolute;left:0;top:0;margin:0;box-shadow:none;background:#fff;color:#000}.marks,#editor>div.cur::before,#editor .scene::after{display:none}}

/* ---------- STORYBOARD ---------- */
.bd-stage{flex:1;display:grid;place-items:center;overflow:hidden;position:relative;background:var(--bg)}
.bd-canvaswrap{position:relative;box-shadow:var(--sh2);border-radius:6px;overflow:hidden;background:#fff;touch-action:none}
.bd-canvaswrap canvas{position:absolute;inset:0;width:100%;height:100%}
.bd-strip{height:136px;border-top:1px solid var(--line);background:var(--bg2);display:flex;gap:10px;overflow-x:auto;padding:12px;align-items:flex-start}
.thumb{flex:none;position:relative;cursor:pointer;transition:transform .2s var(--ease)}
.thumb:hover{transform:translateY(-2px)}
.thumb img{display:block;height:80px;border-radius:8px;background:#fff;border:2px solid var(--line);transition:border-color .15s}
.thumb.active img{border-color:var(--accent)} .thumb .tl{font-size:11px;color:var(--fg2);margin-top:4px;display:flex;justify-content:space-between}
.thumb.dragging{opacity:.35} .thumb.over img{border-color:var(--warn)}
.thumb.add{height:80px;width:80px;border:2px dashed var(--line);border-radius:8px;display:grid;place-items:center;font-size:24px;color:var(--fg2)}
.swatch{width:22px;height:22px;border-radius:50%;border:2px solid var(--line);cursor:pointer;display:inline-block}
.swatch.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--tint)}
.layers div{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:10px;cursor:pointer}
.layers div.on{background:var(--tint)} .layers input[type=range]{width:70px}

/* ---------- SET PLAN ---------- */
.lt-stage{flex:1;position:relative;overflow:hidden;background:var(--canvas)}
.lt-stage svg.main{width:100%;height:100%;display:block}
.rail{position:absolute;left:12px;top:12px;bottom:12px;display:flex;flex-direction:column;gap:6px;background:var(--bg2);border-radius:18px;box-shadow:var(--sh2);padding:8px;z-index:3;overflow-y:auto;align-self:flex-start;max-height:calc(100% - 24px);height:max-content}
.rail button{width:40px;height:40px;padding:0;border-radius:12px;border:none;background:var(--tint);color:var(--tintfg);font-size:16px;display:grid;place-items:center;box-shadow:var(--sh1);flex:none}
.rail button.plain{background:transparent;box-shadow:none;color:var(--fg2)}
.rail button.on{background:var(--accent2);color:#fff}
.rail .rsep{height:1px;background:var(--line);margin:4px 2px;flex:none}
.flyout{position:absolute;left:72px;top:12px;width:250px;max-height:calc(100% - 24px);overflow:auto;background:var(--bg2);border-radius:18px;box-shadow:var(--sh2);padding:14px;z-index:3;animation:pop .18s var(--ease)}
.lib-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.lib-item{background:var(--bg3);border-radius:12px;padding:8px 2px 6px;text-align:center;cursor:grab;font-size:10px;color:var(--fg2);transition:transform .15s,box-shadow .15s;position:relative;overflow:hidden;text-overflow:ellipsis}
.lib-item:hover{transform:translateY(-1px);box-shadow:var(--sh1);background:var(--bg2)} .lib-item svg{width:44px;height:36px;display:block;margin:0 auto 3px}
.lib-item.addnew{display:grid;place-items:center;font-size:22px;color:var(--accent);border:2px dashed var(--line);background:transparent;min-height:66px}
.lib-item .qty{position:absolute;top:4px;right:6px;font-size:9px;color:var(--fg3)}
.rightcol{position:absolute;right:12px;top:12px;bottom:60px;width:270px;display:flex;flex-direction:column;gap:10px;z-index:3;pointer-events:none;transition:transform .3s var(--ease),opacity .3s}
.rightcol.collapsed{transform:translateX(290px);opacity:0}
.rightcol>.card-f{pointer-events:auto;overflow:auto;box-shadow:var(--sh2)}
.layerlist{max-height:40%;flex:none;padding:6px}
.layerlist .lh{display:flex;align-items:center;gap:8px;padding:8px 10px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--fg2);cursor:pointer}
.layerlist .lh .cnt{margin-left:auto;background:var(--bg4);border-radius:999px;padding:1px 8px;font-size:10px}
.lrow{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:10px;cursor:pointer;font-size:12px}
.lrow:hover{background:var(--bg3)} .lrow.on{background:var(--tint);color:var(--tintfg)}
.lrow .li{width:16px;text-align:center;color:var(--fg2)} .lrow .ln{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lrow .lb{opacity:0;font-size:11px;padding:0 3px;border-radius:4px} .lrow:hover .lb,.lrow .lb.act{opacity:.7}
.lrow.off .ln{opacity:.4}
.inspector{flex:1;padding:16px;min-height:120px}
.zoombar{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;gap:8px;background:var(--bg2);border-radius:999px;box-shadow:var(--sh2);padding:4px 12px;z-index:3;font-size:11px;color:var(--fg2)}
.zoombar input{width:110px}
.lt-shots{height:112px;border-top:1px solid var(--line);background:var(--bg2);display:flex;gap:10px;overflow-x:auto;padding:12px;align-items:flex-start}
.shot{flex:none;width:160px;height:86px;background:var(--bg3);border-radius:14px;padding:10px 12px;cursor:pointer;border:2px solid transparent;transition:border-color .15s,transform .15s,box-shadow .15s}
.shot:hover{transform:translateY(-1px);box-shadow:var(--sh1)} .shot.active{border-color:var(--accent);background:var(--bg2)}
.shot b{display:block;font-size:13px;font-weight:600} .shot span{color:var(--fg2);font-size:11px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.obj{cursor:move}
.gear{padding-left:18px;margin:0} .gear li{margin:3px 0;color:var(--fg2)} .gear li.over{color:var(--err)}

/* prop editor */
.pe-wrap{display:flex;gap:16px}
.pe-canvas{width:420px;height:420px;border-radius:14px;background:var(--canvas);box-shadow:inset 0 0 0 1px var(--line);cursor:crosshair;flex:none}
.pe-side{flex:1;display:flex;flex-direction:column;gap:8px}
.pe-shapes{flex:1;overflow:auto;max-height:180px}
.pe-shapes div{display:flex;gap:8px;align-items:center;padding:5px 8px;border-radius:8px;cursor:pointer}
.pe-shapes div.on{background:var(--tint)}

/* ---------- MOOD BOARD ---------- */
.mb-stage{flex:1;position:relative;overflow:hidden;background:var(--canvas);background-image:radial-gradient(var(--gridline) 1px,transparent 1px);background-size:24px 24px}
.mb-world{position:absolute;left:0;top:0;transform-origin:0 0}
.mb-item{position:absolute;border-radius:10px;box-shadow:var(--sh1);cursor:move;background:var(--bg2)}
.mb-item.sel{outline:2px solid var(--accent);outline-offset:2px}
.mb-item img{width:100%;height:100%;object-fit:cover;display:block;border-radius:10px;pointer-events:none}
.mb-item .rs{position:absolute;right:-6px;bottom:-6px;width:14px;height:14px;border-radius:50%;background:var(--accent);cursor:nwse-resize;display:none}
.mb-item.sel .rs{display:block}
.mb-item.note{padding:14px;font-size:15px;line-height:1.4;white-space:pre-wrap;overflow:hidden}
.mb-item.note[contenteditable=true]{cursor:text;user-select:text}
.mb-item.swatchi{border-radius:14px;display:flex;align-items:flex-end;padding:8px;font:600 11px ui-monospace,monospace;color:#fff;text-shadow:0 1px 2px #0006}
.mb-item.label{background:transparent;box-shadow:none;font-size:28px;font-weight:600;padding:4px}
.mb-empty{position:absolute;inset:0;display:grid;place-items:center;color:var(--fg2);pointer-events:none;text-align:center}

/* ---------- GEAR ---------- */
.gear-wrap{flex:1;overflow:auto;padding:24px 32px;background:var(--bg)}
.gear-head{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.gear-head h2{margin:0;font-weight:500;font-size:22px;flex:1}
.gear-cat{margin-bottom:22px}
.gear-cat h5{margin:0 0 10px;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--fg2)}
.gear-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.gcard{background:var(--bg2);border-radius:16px;box-shadow:var(--sh1);padding:14px;display:flex;gap:12px;align-items:center;cursor:pointer;transition:transform .15s var(--ease),box-shadow .15s}
.gcard:hover{transform:translateY(-2px);box-shadow:var(--sh2)}
.gcard svg{width:48px;height:40px;flex:none;background:var(--bg3);border-radius:10px;padding:4px}
.gcard b{display:block;font-weight:600} .gcard span{color:var(--fg2);font-size:11px}
.gcard .q{margin-left:auto;background:var(--tint);color:var(--tintfg);border-radius:999px;padding:2px 10px;font-weight:600;font-size:12px}

/* ---------- NOTES ---------- */
#notes-ed{flex:1;margin:0;border:none;border-radius:0;background:var(--page);color:var(--pagefg);padding:50px max(40px,calc(50% - 360px));font:15px/1.7 -apple-system,"Iowan Old Style",Georgia,serif;resize:none;box-shadow:none}

/* export */
.exp-list{columns:2;column-gap:24px}
.exp-sec{break-inside:avoid;margin-bottom:14px}
.exp-sec>label{font-weight:600}
.exp-sec .files{padding-left:24px}
.exp-sec label{display:flex;gap:8px;align-items:center;padding:3px 0;cursor:pointer}
.exp-sec .files label{color:var(--fg2);font-size:12px}
::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--bg4);border-radius:10px;border:2px solid transparent;background-clip:padding-box}
.grid2>label>*{min-width:0;width:100%}
.rail{gap:4px;padding:6px}
.rail button{width:36px;height:36px;font-size:15px}
.flyout{left:62px}
.mark.mk-shot span{left:auto;right:12px}
.tn.before{outline:none;box-shadow:inset 0 2px 0 var(--accent)}
.media-body{flex:1;display:grid;place-items:center;overflow:auto;background:var(--bg);padding:24px;min-height:0}
.media-body img,.media-body video{max-width:100%;max-height:100%;border-radius:12px;box-shadow:var(--sh2);background:#000}
.media-body iframe{width:100%;height:100%;border:none;border-radius:12px;background:#fff}
.audio-card{background:var(--bg2);border-radius:20px;box-shadow:var(--sh2);padding:30px 40px;display:flex;flex-direction:column;align-items:center;gap:12px}
.audio-card .big{font-size:48px;color:var(--accent)} .audio-card audio{width:360px}
.char-wrap{flex:1;overflow:auto;background:var(--bg);padding:24px}
.char-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px;align-content:start}
.char-h{grid-column:1/-1;margin:14px 0 0;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--fg2)}
.char-card{background:var(--bg2);border-radius:16px;box-shadow:var(--sh1);padding:12px;display:flex;gap:12px;align-items:center;cursor:pointer;border:2px solid transparent;transition:transform .15s var(--ease),box-shadow .15s}
.char-card:hover{transform:translateY(-2px);box-shadow:var(--sh2)} .char-card.on{border-color:var(--accent)} .char-card.ghost{cursor:default;box-shadow:none;border:2px dashed var(--line);background:transparent}
.char-photo{width:56px;height:56px;border-radius:50%;flex:none;display:grid;place-items:center;color:#fff;font-size:22px;font-weight:600;background-size:cover!important;background-position:center!important}
.char-photo.big{width:120px;height:120px;font-size:44px;margin:4px auto 0;cursor:pointer}
.char-photo.big.over{outline:3px dashed var(--accent)}
.cc-body{display:flex;flex-direction:column;min-width:0;flex:1} .cc-body b{font-size:14px} .cc-body span{color:var(--fg2);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .cc-body .cc-st{color:var(--fg3);font-size:11px}
/* storyboard shots, timeline, script sidebar */
.bd-strip{align-items:stretch;height:150px}
.shotgrp{flex:none;display:flex;flex-direction:column;gap:6px;padding:0 6px 4px;border-radius:12px;background:color-mix(in srgb,var(--shot) 6%,transparent)}
.shotgrp.none{background:transparent}
.sg-h{font:600 10px -apple-system,system-ui;color:#fff;background:var(--shot);border-radius:0 0 8px 8px;padding:3px 10px;align-self:stretch;letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shotgrp.none .sg-h{background:var(--bg4);color:var(--fg3)}
.sg-row{display:flex;gap:8px}
.shotbox{background:var(--bg3);border-radius:14px;padding:12px;margin-bottom:16px}
.inspector-section-head{margin-bottom:12px}
.panel .inspector-section-head h4{margin:0 0 4px;font-size:12px;color:var(--fg)}
.inspector-section-head p{margin:0;font-size:11px;line-height:1.4;color:var(--fg2)}
.panel-settings{border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:16px}
.panel-settings .insp-h h4{font-size:10px;color:var(--fg3)}
.panel-settings>.f:last-child{margin-bottom:0}
.panel-settings .sp-picks{grid-template-columns:1fr;margin-bottom:12px}
.panel-settings .sp-quote{border-radius:0 0 10px 10px}
.panel-settings .sp-picks.has-quote>button.on{border-radius:10px 10px 0 0}
.shotbox .tag{color:#fff;border-radius:999px;padding:3px 10px;font:600 10px -apple-system,system-ui}
.tline{height:340px;border-top:1px solid var(--line);background:var(--bg2);display:flex;flex-direction:column}
.tl-bar{display:flex;align-items:center;gap:12px;padding:8px 14px;border-bottom:1px solid var(--line)}
.tl-scroll{flex:1;overflow-x:auto;overflow-y:hidden;position:relative}
.tl-inner{position:relative;height:100%;padding:0 20px}
.tl-ruler{position:relative;height:24px;border-bottom:1px solid var(--line);cursor:pointer}
.tl-ruler span{position:absolute;top:5px;font-size:10px;color:var(--fg3);padding-left:4px;border-left:1px solid var(--line);height:19px}
.tl-lane{position:relative}
.tl-lane.shots{height:30px;margin-top:8px}
.tl-shot{position:absolute;top:0;height:24px;border-radius:8px;background:var(--shot);color:#fff;font:600 10px -apple-system,system-ui;padding:5px 9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:var(--sh1)}
.tl-shot.none{background:var(--bg4);color:var(--fg3);box-shadow:none}
.tl-lane.panels{height:120px;margin-top:4px}
.tl-block{position:absolute;top:0;height:110px;border-radius:10px;background:#fff center/cover no-repeat;box-shadow:var(--sh1);border:2px solid transparent;cursor:grab;overflow:hidden;transition:border-color .15s}
.tl-block.on{border-color:var(--accent)}
.tl-block span{position:absolute;left:4px;bottom:4px;background:#000a;color:#fff;font-size:10px;border-radius:6px;padding:1px 6px;white-space:nowrap}
.tl-rs{position:absolute;right:0;top:0;bottom:0;width:10px;cursor:ew-resize;background:linear-gradient(90deg,transparent,#1a73e855)}
.tl-rs:hover{background:#1a73e8aa}
.tl-ph{position:absolute;top:0;bottom:0;width:2px;background:var(--err);pointer-events:none;margin-left:20px}
.bd-script{width:330px;background:var(--bg2);border-right:1px solid var(--line);display:flex;flex-direction:column;transition:margin-left .3s var(--ease);min-height:0}
.bd-script.collapsed{margin-left:-330px}
.ss-h{display:flex;align-items:center;gap:6px;padding:12px 14px;font-weight:600;border-bottom:1px solid var(--line)}
.ss-body{flex:1;min-width:0;overflow:auto;padding:12px 18px 60px 40px;font:11px/1.35 "Courier Prime","Courier New",monospace;user-select:text}
.ss-l{position:relative;white-space:pre-wrap;padding:0 4px;border-radius:3px;min-height:1.35em}
.ss-l.scene{font-weight:700;margin-top:6px} .ss-l.character{padding-left:30%} .ss-l.dialogue{padding-left:15%;padding-right:10%} .ss-l.parenthetical{padding-left:22%}
.ss-l.other{background:color-mix(in srgb,var(--shot) 7%,transparent);cursor:pointer}
.ss-l.cur{background:color-mix(in srgb,var(--shot) 18%,transparent)}
.ss-tag{position:absolute;left:-34px;top:0;font:600 9px -apple-system,system-ui;background:var(--bg4);color:var(--fg2);border-radius:6px;padding:1px 5px}
.ss-tag.cur{background:var(--shot);color:#fff}
.ss-hd{position:absolute;left:0;right:0;height:8px;cursor:ns-resize;z-index:2}
.ss-hd::after{content:"";position:absolute;left:40%;right:40%;top:3px;height:3px;border-radius:2px;background:var(--shot)}
.ss-hd.top{top:-5px} .ss-hd.bot{bottom:-5px}
body.bd-full #m-board .bd-strip,body.bd-full #m-board .tline,body.bd-full #m-board .panel,body.bd-full #m-board .bd-script{display:none}
body.bd-full #workspace{border-radius:0}
.mark span,.mark.mk-shot span,.mark.mk-scene span{left:50%;right:auto;transform:translateX(-50%);top:-4px;padding:2px 6px}
.setups{display:flex;align-items:center;gap:6px;padding:8px 12px 0;background:var(--bg2);border-top:1px solid var(--line);overflow-x:auto;flex:none}
.setup-chip{display:flex;align-items:center;gap:6px;border-radius:999px;padding:5px 12px;font-size:12px;white-space:nowrap;box-shadow:none}
.setup-chip span{background:var(--bg4);border-radius:999px;padding:0 7px;font-size:10px;color:var(--fg2)}
.setup-chip.on{background:var(--tint);color:var(--tintfg);border-color:transparent} .setup-chip.on span{background:#fff8}
.setup-chip.add{border-style:dashed;color:var(--accent)}
.lt-shots{border-top:none}
.setup-tag{color:var(--scene)!important;font-weight:600}
.adot{position:absolute;width:13px;height:13px;margin-left:0;border-radius:50%;color:#fff;font:700 8px/13px -apple-system,system-ui;text-align:center;pointer-events:auto;cursor:grab;box-shadow:0 0 0 2px var(--page),var(--sh1);z-index:2;transition:transform .12s}
.adot:hover{transform:scale(1.35)} .adot.sw{box-shadow:0 0 0 2px var(--page),0 0 0 4px var(--scene)}
.adot.ghost{background:var(--scene);opacity:.55;pointer-events:none;font-size:11px}
.mark.mk-scene{cursor:copy}
#actpop{position:fixed;z-index:46;width:320px;background:var(--bg2);border-radius:18px;box-shadow:var(--sh2);padding:16px;animation:pop .15s var(--ease)}
#actpop input,#actpop textarea{width:100%}
.kinds{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}
.kchip{font-size:11px;padding:4px 9px;border-radius:999px;box-shadow:none}
.kchip.on{background:var(--c);border-color:var(--c);color:#fff}
.gear-path{background:var(--bg2);border-radius:8px;padding:6px 10px;font-size:11px;color:var(--fg2);box-shadow:var(--sh1)}
.gcard .owner{color:var(--accent);font-size:11px;display:block}
.camchecks{background:var(--bg3);border-radius:12px;padding:4px 12px 10px}
.customrow{display:flex;gap:6px;margin-bottom:6px} .customrow input{flex:1;min-width:0}
.seg{display:flex;background:var(--bg3);border-radius:999px;padding:3px;gap:2px}
.seg .tool{padding:5px 14px}
.seg .tool.on{background:var(--bg2);color:var(--fg);box-shadow:var(--sh1)!important}
.aud-board{display:grid;grid-template-columns:repeat(5,minmax(190px,1fr));gap:12px;align-items:start;min-width:980px}
.aud-col{background:var(--bg3);border-radius:16px;padding:10px;min-height:300px;transition:background .15s}
.aud-col.over{background:var(--tint)}
.aud-h{display:flex;justify-content:space-between;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--fg2);padding:2px 4px 10px}
.aud-h span{background:var(--bg4);border-radius:999px;padding:0 8px}
.aud-card{background:var(--bg2);border-radius:14px;box-shadow:var(--sh1);padding:10px;display:flex;gap:10px;align-items:center;margin-bottom:8px;cursor:grab;border:2px solid transparent}
.aud-card.on{border-color:var(--accent)} .aud-card .char-photo{width:42px;height:42px;font-size:16px}
.stars{color:#f9ab00;letter-spacing:1px;font-size:12px} .stars.big{font-size:26px;margin-bottom:10px;cursor:pointer;user-select:none}
.take{width:100%;border-radius:10px;background:#000;margin-bottom:4px}
.dialog.recorder{width:min(1200px,96vw);height:min(820px,92vh);display:flex;flex-direction:column}
.rec-wrap{flex:1;display:flex;gap:16px;min-height:0}
.rec-left{width:46%;display:flex;flex-direction:column}
.rec-cam{width:100%;aspect-ratio:16/9;background:#000;border-radius:14px;object-fit:cover;transform:scaleX(-1)}
.rec-sides{flex:1;overflow:auto;background:var(--page);border-radius:14px;box-shadow:inset 0 0 0 1px var(--line);padding:20px 24px;font:14px/1.35 "Courier Prime","Courier New",monospace;user-select:text}
.rec-sides .side{margin-bottom:30px} .rec-sides .sh2{font:600 10px -apple-system;color:var(--fg2);text-transform:uppercase;margin-bottom:8px}
.rec-sides>div>div{white-space:pre-wrap;min-height:1.35em} .rec-sides .scene{font-weight:700} .rec-sides .character{padding-left:35%} .rec-sides .dialogue{padding-left:18%;padding-right:12%} .rec-sides .parenthetical{padding-left:26%} .rec-sides .transition{text-align:right}
.rec-sides .me{background:#fff59d;color:#202124}
.rec-time{font:600 14px ui-monospace,monospace;color:var(--fg2)}
.rec-btn.on{background:var(--err);border-color:var(--err);animation:pulse 1.2s infinite}
@keyframes pulse{50%{opacity:.7}}
.char-wrap{overflow:auto}
.lib-side{width:340px;padding:0} .lib-side.collapsed{margin-right:-340px}
.lib-panel{display:flex;flex-direction:column;gap:8px;padding:16px;height:100%}
.lib-note{font-size:11px;color:var(--fg3);margin-top:-4px}
.lib-results{flex:1;overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:6px;align-content:start;min-height:120px}
.lib-res{position:relative;border-radius:10px;overflow:hidden;background:var(--bg4);aspect-ratio:1;cursor:grab}
.lib-res img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .2s}
.lib-res:hover img{transform:scale(1.05)}
.lib-res span{position:absolute;left:0;right:0;bottom:0;font-size:9px;color:#fff;background:linear-gradient(transparent,#000a);padding:10px 6px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transition:opacity .15s}
.lib-res:hover span{opacity:1}
.lib-msg{grid-column:1/-1;color:var(--fg2);font-size:12px}
.lib-web{display:flex;flex-wrap:wrap;gap:4px;align-items:center;font-size:11px;color:var(--fg2);border-top:1px solid var(--line);padding-top:10px}
.lib-web span{width:100%}
.mb-credit{position:absolute;left:6px;bottom:6px;font-size:9px;color:#fff;background:#0008;border-radius:6px;padding:1px 6px;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
.snd-list{max-height:52vh;overflow:auto}
.snd-row{display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px} .snd-row:hover{background:var(--bg3)}
.snd-t{flex:1;min-width:0;display:flex;flex-direction:column} .snd-t b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .snd-t span{font-size:11px;color:var(--fg2)}
.cheats{display:grid;grid-template-columns:1fr 1fr;gap:6px 18px}
.cheats div{display:flex;gap:10px;align-items:center;font-size:12px}
.cheats kbd{min-width:92px;font:600 11px ui-monospace,monospace;background:var(--bg3);border:1px solid var(--line);border-bottom-width:2px;border-radius:6px;padding:3px 6px;text-align:center}
#m-board .toolbar .tool{padding:6px 10px;font-size:14px}
.mh{position:absolute;left:-4px;right:-4px;height:8px;cursor:ns-resize;opacity:0;transition:opacity .15s}
.mh.top{top:-3px} .mh.bot{bottom:-3px}
.mh::after{content:"";position:absolute;left:0;right:0;top:3px;height:3px;border-radius:2px;background:inherit;filter:brightness(.8)}
.mark:hover .mh{opacity:1}
.mark.mk-shot .mh::after{background:var(--shot)} .mark.mk-scene .mh::after{background:var(--scene)}
body.resizing,body.resizing *{cursor:ns-resize!important}
.bd-foot{display:flex;justify-content:center;padding:6px 0 8px;background:var(--bg2)}
.bd-foot .tool{font-size:12px!important;padding:5px 16px!important}
body.bd-full #m-board .bd-foot{display:none}
.prod-find{background:var(--tint);border-radius:14px;padding:10px;margin-bottom:14px;position:relative}
.prod-res{background:var(--bg2);border-radius:10px;box-shadow:var(--sh2);margin-top:4px;overflow:hidden}
.prod-res:empty{display:none}
.prod-res div{padding:7px 12px;cursor:pointer;display:flex;flex-direction:column} .prod-res div:hover{background:var(--bg3)}
.prod-res span{font-size:11px;color:var(--fg2)} .prod-res .none{color:var(--fg2);cursor:default}
/* locations */
.loc-list{width:270px;overflow:auto;padding:12px;border-right:1px solid var(--line);background:var(--bg2);display:flex;flex-direction:column;gap:8px}
.loc-card{display:flex;gap:10px;align-items:center;padding:8px;border-radius:14px;cursor:pointer;border:2px solid transparent;transition:background .15s}
.loc-card:hover{background:var(--bg3)} .loc-card.on{border-color:var(--accent);background:var(--bg2)}
.loc-thumb{width:64px;height:48px;border-radius:10px;background:var(--bg4) center/cover;flex:none}
.loc-st{font-size:10px!important;font-weight:600;border-radius:999px;padding:1px 8px;align-self:flex-start;background:var(--bg4);color:var(--fg2)!important}
.st-confirmed{background:#e6f4ea!important;color:#188038!important} .st-option{background:var(--tint)!important;color:var(--tintfg)!important} .st-scouting{background:#fef7e0!important;color:#e37400!important} .st-rejected{opacity:.6}
.loc-detail{flex:1;overflow:auto;padding:18px 22px;background:var(--bg);min-width:0}
.loc-head{display:flex;align-items:center;gap:8px;margin-bottom:12px} .loc-head h2{margin:0;font-weight:500;font-size:20px}
.loc-map{width:100%;height:340px;border:none;border-radius:16px;box-shadow:var(--sh1);background:var(--bg4)}
.loc-hint{color:var(--fg2);font-size:12px}
.sunbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px;background:var(--bg2);border-radius:16px;padding:12px;box-shadow:var(--sh1)}
.sun{display:flex;flex-direction:column;padding:4px 10px;border-left:1px solid var(--line)} .sun span{font-size:10px;color:var(--fg2);text-transform:uppercase;letter-spacing:.05em} .sun b{font-size:14px} .sun small{font-size:10px;color:var(--fg3)}
.loc-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;margin-bottom:10px}
.loc-ph{position:relative;border-radius:12px;overflow:hidden;aspect-ratio:16/10;background:var(--bg4);border:3px solid transparent} .loc-ph.cover{border-color:var(--accent)}
.loc-ph img{width:100%;height:100%;object-fit:cover;cursor:zoom-in;display:block}
.ph-actions{position:absolute;top:6px;right:6px;display:flex;gap:4px;opacity:0;transition:opacity .15s} .loc-ph:hover .ph-actions{opacity:1}
.ph-actions button{width:26px;height:26px;padding:0;font-size:12px}
.scene-chips{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
.scene-chips span{background:var(--tint);color:var(--tintfg);border-radius:999px;padding:3px 4px 3px 10px;font-size:11px;display:flex;gap:4px;align-items:center}
.scene-chips b{cursor:pointer;padding:0 5px;border-radius:999px} .scene-chips b:hover{background:#fff8}
.angle-note{color:var(--fg2);font-size:11px;line-height:1.5;margin:0 0 8px}
.angle-row{display:flex;gap:8px;align-items:center;padding:7px 10px;border-radius:12px;cursor:pointer;margin-bottom:2px}
.angle-row:hover{background:var(--bg3)} .angle-row .tag,.cut-row .tag{color:#fff;font:600 10px -apple-system;border-radius:999px;padding:2px 8px;flex:none;cursor:pointer}
.angle-row .d{flex:1;min-width:0;display:flex;flex-direction:column} .angle-row .d span{font-size:11px;color:var(--fg2)}
.angle-row .cnt{font-size:11px;color:var(--fg3)}
.cut-row{display:flex;gap:6px;align-items:center;margin-bottom:5px} .cut-row .d{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--fg2)}
.cut-row select{width:118px;padding:4px 6px;font-size:11px}
.so-h{font-size:11px;font-weight:600;color:var(--scene);margin:6px 0 2px}
.so-row{display:flex;gap:8px;align-items:baseline;padding:3px 10px;font-size:12px} .so-row b{color:var(--shot);min-width:34px} .so-row small{color:var(--fg3);margin-left:auto}
.achips{display:flex;gap:3px;border-left:1px solid var(--line);padding-left:4px}
.achips:empty{display:none}
.achip{--ac:var(--shot);font-size:11px!important;padding:5px 10px!important;background:color-mix(in srgb,var(--ac) 16%,transparent)!important;color:color-mix(in srgb,var(--ac) 70%,#000)!important;border-radius:999px!important} /* each angle in its shot colour (script.js angleColor) */
.achip:hover{background:color-mix(in srgb,var(--ac) 26%,transparent)!important} .achip{white-space:nowrap}
.mk-conn{position:absolute;width:0;border-left:2px dashed color-mix(in srgb,var(--shot) 55%,transparent);pointer-events:none}
.ss-pick{background:var(--tint);color:var(--tintfg);padding:10px 14px;font-size:12px;display:flex;flex-direction:column;gap:6px}
.ss-pick .tool{align-self:flex-start;background:var(--bg2)}
.ss-l.pl{box-shadow:inset 3px 0 0 var(--accent);background:color-mix(in srgb,var(--accent) 26%,transparent)}
.sb-head{gap:2px}
.sb-foot{padding:8px;border-top:1px solid var(--line)} .sb-foot .tool{width:100%;font-size:11px;color:var(--fg2)}
.sb-empty{color:var(--fg3);font-size:12px;padding:10px}
.mh{height:14px;left:-6px;right:-6px}
.mh.top{top:-7px} .mh.bot{bottom:-7px}
.mh::after{top:5px;height:4px;left:2px;right:2px}
.mark.dragging{opacity:1;width:9px;transition:none}
.mark.dragging .mh{opacity:1}

#editor>div.hl-shot{background:color-mix(in srgb,var(--shot) 16%,transparent);box-shadow:-6px 0 0 color-mix(in srgb,var(--shot) 16%,transparent),6px 0 0 color-mix(in srgb,var(--shot) 16%,transparent)}
#editor>div.hl-scene{background:color-mix(in srgb,var(--scene) 15%,transparent);box-shadow:-6px 0 0 color-mix(in srgb,var(--scene) 15%,transparent),6px 0 0 color-mix(in srgb,var(--scene) 15%,transparent)}
#editor>div.hl-scene.hl-shot{background:color-mix(in srgb,var(--shot) 16%,color-mix(in srgb,var(--scene) 12%,transparent))}
#editor>div{transition:background .12s,box-shadow .12s}

.tl-lab{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--fg3);margin:6px 0 2px}
.tl-lane.audio{height:62px;background:repeating-linear-gradient(90deg,transparent 0 19px,var(--gridline) 19px 20px);border-radius:8px}
.tl-clip{position:absolute;top:2px;height:56px;border-radius:8px;background:#7c4dff;cursor:grab;overflow:hidden;box-shadow:var(--sh1);border:2px solid transparent}
.tl-clip.on{border-color:#fff;box-shadow:0 0 0 2px #7c4dff}
.tl-clip canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.tl-clip span{position:absolute;left:6px;top:3px;font:600 10px -apple-system;color:#fff;text-shadow:0 1px 2px #0006;white-space:nowrap;pointer-events:none}
.tl-clip.rec{background:var(--err);animation:pulse 1.2s infinite}
.tl-trim{position:absolute;top:0;bottom:0;width:8px;cursor:ew-resize;z-index:1} .tl-trim.l{left:0} .tl-trim.r{right:0}
.tl-trim:hover{background:#fff5}
.tl-bar .mic{width:170px;padding:4px 8px;font-size:11px}
.tl-bar .rec{color:var(--err)} .tl-bar .rec.on{background:var(--err);color:#fff}
.bd-strip{height:auto;min-height:150px;overflow-y:hidden;padding-top:6px}
.tl-bar{flex-wrap:nowrap;overflow-x:auto} .tl-bar .tool{white-space:nowrap} .tl-bar>span:nth-child(n){white-space:nowrap}
.tline{height:auto;min-height:340px;max-height:52vh} .tl-scroll{overflow-y:auto}

/* ================= polish pass: one visual language ================= */
:root{--r-sm:10px;--btn-h:32px}
.ico{display:block;flex:none}
button{display:inline-flex;align-items:center;justify-content:center;gap:6px;line-height:1.2}
button>span{pointer-events:none}
/* icon buttons are always round, quiet until hovered */
button.icon{width:var(--btn-h);height:var(--btn-h);border-radius:50%;color:var(--fg2)}
button.icon:hover{color:var(--fg);background:var(--bg4)}
button.icon.sm{width:26px;height:26px}
button.icon.on,.toolbar button.icon.on{color:var(--tintfg);background:var(--tint)}
button:disabled{opacity:.4;cursor:default;transform:none!important}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tool{height:var(--btn-h);padding:0 12px;color:var(--fg)}
.tool .ico{color:var(--fg2)} .tool.on .ico{color:inherit}
.primary .ico{color:#fff}
.toolbar{gap:2px;min-height:52px;padding:8px 12px}
.toolbar .sep{height:22px;margin:0 8px}
.tb-title{font-weight:600;font-size:15px;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px;letter-spacing:-.01em}
.toolbar select{height:var(--btn-h);padding:0 28px 0 12px;border-radius:999px;background-color:var(--bg3)}
/* titlebar */
#titlebar{box-shadow:none;border-bottom:1px solid var(--line)}
#projname{font-size:13px;font-weight:600;color:var(--fg2)}
#savestate{font-size:11px;background:none;color:var(--fg3)} #savestate.dirty{color:var(--warn)}
/* dock */
#dock .dock-in{box-shadow:0 1px 2px rgba(60,64,67,.15),0 2px 8px rgba(60,64,67,.08);padding:5px;gap:2px}
.dock-btn{padding:8px 14px;gap:8px;font-weight:500}
.dock-btn .di{display:grid;place-items:center;color:var(--fg3)}
.dock-btn:hover{background:var(--bg3)!important;color:var(--fg)}
.dock-btn.active .di{color:var(--tintfg)}
/* sidebar & tree */
.sb-head{padding:14px 10px 8px 16px}
#sb-title{font-size:11px;letter-spacing:.08em}
.tn{padding:7px 10px;gap:10px;border-radius:10px}
.tn .ic{width:16px;height:16px;color:var(--fg3);display:grid;place-items:center}
.tn.active .ic{color:var(--tintfg)}
.tn .ic.fold svg{transition:transform .15s var(--ease)} .tn .ic.fold.open svg{transform:rotate(90deg)}
.tn .add{display:grid;place-items:center;width:22px;height:22px;padding:0}
/* floating rails (Storyboard + Set Plan) share one look: quiet buttons, accent when active */
.rail{background:var(--bg2);border-radius:16px;box-shadow:0 1px 3px rgba(60,64,67,.18),0 4px 14px rgba(60,64,67,.1);padding:6px;gap:2px;bottom:auto}
.rail button,.rail button.plain{width:38px;height:38px;border-radius:10px;background:transparent;box-shadow:none;color:var(--fg2)}
.rail button:hover{background:var(--bg3);color:var(--fg)}
.rail button.on{background:var(--tint);color:var(--tintfg)}
.rail .rsep{margin:4px 6px}
.bd-rail{left:12px;top:50%;transform:translateY(-50%)}
.bd-stage{position:relative}
.flyout{left:66px;border-radius:16px;box-shadow:0 1px 3px rgba(60,64,67,.18),0 8px 24px rgba(60,64,67,.14)}
.lib-item{border-radius:10px;background:var(--bg3)}
/* cards & panels */
.panel{padding:18px}
.panel h4,.fl-h{font-size:11px;letter-spacing:.07em;color:var(--fg3);margin-bottom:10px}
label.f{font-size:11.5px;color:var(--fg2);margin-bottom:12px}
input,select,textarea{border-radius:10px;background:var(--bg3);border-color:transparent}
input:hover,select:hover,textarea:hover{border-color:var(--line)}
input:focus,select:focus,textarea:focus{background:var(--bg2)}
.shotlist-row,.angle-row{border-radius:10px}
.tag{font-variant-numeric:tabular-nums}
.dropzone{border-radius:12px;border-width:1.5px}
.empty{max-width:340px;line-height:1.5}
.empty .big{display:grid;place-items:center;font-size:0;margin-bottom:12px}
.empty .big svg{width:44px;height:44px;color:var(--fg3)}
/* storyboard footer + timeline */
.bd-foot .seg .tool{gap:6px}
.tl-bar{gap:6px;padding:8px 12px}
.tl-bar b{font-size:13px;margin-right:6px}
.recbtn{width:32px;height:32px;padding:0;border-radius:50%;border:1.5px solid var(--line);background:var(--bg2);color:var(--err)}
.recbtn:hover{background:#fce8e6;border-color:#f6aea9}
.recbtn.on{background:var(--err);border-color:var(--err);color:#fff;animation:pulse 1.2s infinite}
.tl-bar .mic{border-radius:999px;height:30px}
/* selection popup */
#selpop{padding:4px;gap:2px}
#selpop button{height:30px;padding:0 14px;font-weight:600}
#selpop .s{color:var(--shot)} #selpop .c{color:var(--scene)}
/* toasts sit above the dock, never over content controls */
#toast{bottom:84px;font-size:12.5px;border-radius:10px;padding:10px 16px}
/* dark theme: keep shadows subtle */
:root[data-theme=dark] .rail,:root[data-theme=dark] .flyout{box-shadow:0 0 0 1px var(--line)}
/* schedule / stripboard */
.tb-sub{color:var(--fg3);font-size:12px;margin-left:4px}
.sb-pool{width:300px;overflow:auto;padding:14px;border-right:1px solid var(--line);background:var(--bg2);display:flex;flex-direction:column;gap:4px}
.sb-pool.over{background:var(--tint)}
.sb-board{flex:1;overflow:auto;padding:16px 20px;background:var(--bg);display:flex;flex-direction:column;gap:14px}
.sb-day{background:var(--bg2);border-radius:14px;box-shadow:var(--sh1);padding:6px 6px 8px;display:flex;flex-direction:column;gap:3px;border:2px solid transparent}
.sb-day.on{border-color:var(--accent)} .sb-day.over{background:var(--tint)}
.sb-dayh{display:flex;gap:12px;align-items:center;padding:6px 8px 8px;cursor:pointer;font-size:12px;color:var(--fg2)}
.sb-dayh b{color:var(--fg);font-size:13px} .sb-pg{font-variant-numeric:tabular-nums;color:var(--fg)}
.sb-strip{display:grid;grid-template-columns:34px 92px 1fr 48px 90px;gap:8px;align-items:center;height:30px;padding:0 10px;border-radius:7px;background:var(--strip);color:#202124;font-size:12px;cursor:grab;border:1px solid rgba(0,0,0,.08);transition:transform .12s,box-shadow .12s}
.sb-strip:hover{box-shadow:var(--sh1)} .sb-strip.dragging{opacity:.4} .sb-strip.over{box-shadow:inset 0 3px 0 var(--accent)}
.sb-strip .sn{font-weight:700} .sb-strip .ie{font-size:10px;letter-spacing:.04em;color:#5f6368} .sb-strip .set{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-strip .pg{text-align:right;font-variant-numeric:tabular-nums} .sb-strip .ids{color:#5f6368;font-size:11px;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-pool .sb-strip{grid-template-columns:30px 1fr 40px}.sb-pool .sb-strip .ie,.sb-pool .sb-strip .ids{display:none}
.sb-strip.gone{background:var(--bg3);color:var(--fg3);display:flex;justify-content:space-between}
.sb-hint{color:var(--fg3);font-size:12px;padding:10px;text-align:center;border:1.5px dashed var(--line);border-radius:8px}
.legend{display:flex;flex-direction:column;gap:6px;font-size:11px;color:var(--fg2)} .legend span{display:flex;gap:8px;align-items:center} .legend i{width:28px;height:12px;border-radius:3px;border:1px solid rgba(0,0,0,.12)}
.callrow{display:flex;gap:10px;align-items:center;padding:6px 4px;border-bottom:1px solid var(--line)}
.callrow .cid{width:22px;height:22px;border-radius:50%;background:var(--tint);color:var(--tintfg);display:grid;place-items:center;font-size:11px;font-weight:600;flex:none}
.callrow div{flex:1;min-width:0;display:flex;flex-direction:column} .callrow div span{font-size:11px;color:var(--fg2)}
input.mini{width:96px;padding:4px 6px}
.sunline{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--fg2);background:var(--bg3);border-radius:10px;padding:8px 10px;margin-bottom:12px}
.crew-wrap{display:block}
.crew-wrap .char-grid{margin-bottom:18px}
/* short canvas (timeline open): the drawing rail lies along the top instead */
.bd-tlmode .bd-rail{flex-direction:row;top:8px;left:50%;transform:translateX(-50%);overflow:visible}
.bd-tlmode .bd-rail .rsep{width:1px;height:auto;margin:6px 4px}
.shotbox button{white-space:normal;line-height:1.3;height:auto;min-height:32px;padding:6px 12px}

/* the element type already shows in the toolbar; no label in the margin */
#editor>div.cur::before{display:none}
/* set plan rail fits without scrolling */
.lt-stage .rail{gap:0;padding:5px;overflow:visible;max-height:none}
.lt-stage .rail button{width:34px;height:34px}
.layerlist .lh .ic{display:grid;place-items:center;color:var(--fg3)}
.layerlist .lh .ic svg{transition:transform .15s} .layerlist .lh .ic.open svg{transform:rotate(90deg)}
.lrow .li{display:grid;place-items:center}
.shot b{display:block}
.lrow .lb{display:grid;place-items:center;width:22px;height:22px;border-radius:6px;padding:0} .lrow .lb:hover{background:var(--bg4)}
.ico.ms{display:block}
.bd-rail{gap:0;padding:5px;overflow:visible;max-height:none} .bd-rail button{width:34px!important;height:34px!important}

/* welcome & find */
.dialog.welcome{width:min(640px,94vw);padding:28px}
.wl-head{display:flex;gap:16px;align-items:center;margin-bottom:22px} .wl-head img{width:64px;height:64px} .wl-head h2{font-size:24px;margin:0 0 2px} .wl-head p{margin:0}
.wl-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.wl-card{flex-direction:column;align-items:flex-start;gap:4px;height:auto;padding:16px;border-radius:16px;text-align:left;background:var(--bg3);border-color:transparent}
.wl-card:hover{background:var(--tint);box-shadow:none} .wl-card span{color:var(--accent)} .wl-card small{color:var(--fg2);font-weight:400;font-size:11.5px}
.recent{display:flex;flex-direction:column;gap:2px;max-height:240px;overflow:auto}
.recent-row{display:flex;gap:12px;align-items:center;padding:8px 10px;border-radius:12px;cursor:pointer} .recent-row:hover{background:var(--bg3)} .recent-row.on{background:var(--tint)}
.recent-row .ri{color:var(--fg3)} .recent-row div{flex:1;min-width:0;display:flex;flex-direction:column} .recent-row div span{font-size:11px;color:var(--fg3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.recent-row .icon{opacity:0} .recent-row:hover .icon{opacity:1}
.dialog.find{width:min(560px,94vw);padding:14px} .find-res{margin-top:8px;max-height:50vh;overflow:auto}
.find-row{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:10px;cursor:pointer} .find-row:hover,.find-row.on{background:var(--bg3)} .find-row span{color:var(--fg3)} .find-row .sub{margin-left:auto;font-size:11px}
.cheats.one{grid-template-columns:1fr} .cheats.one kbd{min-width:110px}

.upd{background:var(--bg3);border-radius:12px;padding:12px 14px}
.upd-row{display:flex;align-items:center;gap:12px;justify-content:space-between}
.upd-bar{height:6px;border-radius:3px;background:var(--bg4);margin-top:10px;overflow:hidden} .upd-bar i{display:block;height:100%;background:var(--accent);transition:width .3s}

/* beta labelling */
.beta-tag{display:inline-block;vertical-align:middle;font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#b06000;background:#fef7e0;border:1px solid #fbd38d;border-radius:999px;padding:1px 8px;margin-left:8px}
#titlebar .beta-tag{-webkit-app-region:no-drag}
.welcome .beta-tag{font-size:11px;margin-left:4px}
.beta-note{font-size:12.5px;color:#8a5300!important;background:#fef7e0;border-radius:10px;padding:8px 12px;margin:16px 0 0!important}
:root[data-theme=dark] .beta-tag,:root[data-theme=dark] .beta-note{background:#3d2e10;border-color:#6b4e16;color:#fdd663!important}

/* support card */
.support{display:flex;gap:14px;align-items:center;margin-top:18px;padding:14px 16px;border-radius:14px;background:#fff8d6;border:1px solid #f6e27a}
.support b{display:block;font-size:13.5px;color:#5c4400}
.support p{margin:2px 0 0!important;font-size:12px;line-height:1.45;color:#6b5512!important}
.support .coffee{flex:none;background:#ffdd00;border-color:#f0cc00;color:#3d2c00;font-weight:600;white-space:nowrap}
.support .coffee:hover{background:#ffe433}
:root[data-theme=dark] .support{background:#2f2a14;border-color:#5a4d17} :root[data-theme=dark] .support b,:root[data-theme=dark] .support p{color:#f6e27a!important}

/* export dialog with live preview */
.dialog.export{width:min(1240px,96vw);height:min(860px,92vh);display:grid;grid-template-columns:360px 1fr;gap:20px;padding:22px}
.exp-opts{display:flex;flex-direction:column;min-height:0;overflow:auto;padding-right:4px}
.exp-opts .exp-list{columns:1;flex:1}
.exp-opts .actions{position:sticky;bottom:0;background:var(--bg2);padding-top:12px;margin-top:8px}
.exp-prev{display:flex;flex-direction:column;min-height:0;border-radius:14px;overflow:hidden;background:#e3e5e8;box-shadow:inset 0 0 0 1px var(--line)}
.exp-bar{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--bg2);border-bottom:1px solid var(--line)}
.exp-bar select{height:28px;padding:0 24px 0 10px;font-size:12px}
.exp-status{font-size:12px;color:var(--fg3)}
.exp-frame{flex:1;width:100%;border:none;background:#e3e5e8}
/* inline icons inside text spots */
.with-ic{display:inline-flex!important;align-items:center;gap:4px}
.stars{display:inline-flex;gap:1px;color:#f9ab00} .stars.big{gap:2px} .stars.big span{display:grid;cursor:pointer}
.adot{display:grid;place-items:center} .adot svg{width:9px;height:9px}
.kchip{gap:4px} .tag svg{display:block}
.pe-act{display:grid;place-items:center;width:24px;height:24px;border-radius:6px;cursor:pointer;color:var(--fg2)} .pe-act:hover{background:var(--bg4)}
.support .coffee{gap:6px}
.ph-actions button{display:grid;place-items:center}
.so-h svg{color:var(--scene)}

/* brand link (radicallyimpartial.com pink) — used in the support card */
.brand-link{display:inline-block;margin-top:6px;font-size:12px;font-weight:600;color:#f0249b!important;text-decoration:none}
.brand-link:hover{text-decoration:underline}

/* focus mode: only the page, centred, nothing else. #titlebar/#dock are display:none so #main is the only grid row */
body.focus #main{grid-template-columns:1fr!important}
body.focus .marks,body.focus .drawer,body.focus .sc-side{display:none!important}
body.focus .toolbar{opacity:0;transition:opacity .3s} body.focus .toolbar:hover{opacity:1}

/* storyboard script sidebar: smooth highlight changes; several shots on one line show stacked tags */
.ss-l{transition:background-color .18s var(--ease),box-shadow .18s var(--ease)}
.ss-l.multi{background-image:linear-gradient(90deg,color-mix(in srgb,var(--shot) 22%,transparent) 0 3px,transparent 3px)}
.ss-tags{position:absolute;left:-36px;top:0;display:flex;flex-direction:column;gap:2px;align-items:flex-end}
.ss-tags .ss-tag{position:static;cursor:pointer;transition:transform .12s,background .18s}
.ss-tags .ss-tag:hover{transform:scale(1.08)}

/* record button stays a circle even when the script sidebar squeezes the timeline bar */
.recbtn{flex:none;min-width:32px;aspect-ratio:1}
.tl-bar{min-width:0} .tl-bar .mic{min-width:0;flex:0 1 180px}

/* + (and capture) buttons at the end of the storyboard strip: vertically centred with the thumbnails */
.strip-adds{flex:none;display:flex;align-items:center;gap:6px;width:var(--bw,139px);height:80px;margin-top:29px} /* one block wide, centred on the frames (board.js sets --bw) */
.strip-adds .thumb.add{flex:1;min-width:0;width:auto;height:auto;aspect-ratio:1;padding:0;display:grid;place-items:center;line-height:0;border:2px dashed var(--line);border-radius:12px;background:transparent;color:var(--fg2);box-shadow:none}
.strip-adds .thumb.add:hover{border-color:var(--accent);color:var(--accent);background:var(--tint)}
.strip-adds .thumb.add svg{width:18px;height:18px}

/* mood board note text: the span is what's editable */
.mb-item .mb-txt{display:block;width:100%;height:100%;outline:none;white-space:pre-wrap;overflow:hidden}
.mb-item .mb-txt[contenteditable=true]{cursor:text;user-select:text;-webkit-user-select:text}
.mb-item.editing{box-shadow:0 0 0 2px var(--accent)}

.lrow .ln-edit{flex:1;min-width:0;padding:2px 6px;font-size:12px;border-radius:6px}

/* gear cards: name/spec stay on one line each so the owner always sits in the same spot (third line) */
.gcard{min-height:76px}
.gcard>div:nth-child(2){min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.gcard>div:nth-child(2)>b,.gcard>div:nth-child(2)>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gcard .owner{min-height:15px}
/* chip pickers (gear owner, crew positions…) */
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.chip{font-size:11.5px;padding:3px 10px;border-radius:999px;background:var(--bg3);border:1px solid var(--line);color:var(--fg2);box-shadow:none}
.chip.on{background:var(--tint);border-color:transparent;color:var(--tintfg)}
/* nothing square: colour inputs and native pickers get the app's rounding */
input[type=color]{border-radius:10px;overflow:hidden;-webkit-appearance:none;appearance:none;cursor:pointer}
input[type=color]::-webkit-color-swatch-wrapper{padding:0}
input[type=color]::-webkit-color-swatch{border:none;border-radius:10px}
input[type=date],input[type=time],input[type=datetime-local]{border-radius:10px}
::-webkit-calendar-picker-indicator{border-radius:6px;cursor:pointer}

/* Locations: map search bar */
.loc-searchrow{display:flex;align-items:center;gap:8px;margin-bottom:10px;background:var(--bg2);border-radius:999px;padding:4px 6px 4px 14px;box-shadow:var(--sh1)}
.loc-searchrow .si{color:var(--fg3);display:grid}
.loc-searchrow .loc-search{flex:1;border:none;background:transparent;box-shadow:none!important;padding:6px 0}

/* timeline: live drag + resize. Blocks glide while another is dragged (.reordering), the dragged one floats */
.tline .tl-lane.reordering .tl-block:not(.dragging){transition:left .16s var(--ease)}
.tl-block.dragging{z-index:5;cursor:grabbing;box-shadow:var(--sh2);opacity:.92}
/* playhead grab handle: the red triangle on top */
.tl-ph-grip{position:absolute;top:-2px;left:-7px;width:16px;height:14px;pointer-events:auto;cursor:ew-resize;background:var(--err);clip-path:polygon(0 0,100% 0,100% 45%,50% 100%,0 45%);border-radius:3px}
.tl-ruler{cursor:ew-resize}
/* duration chip on blocks */
.thumb .tl .dur{cursor:ew-resize;padding:0 5px;border-radius:6px} .thumb .tl .dur:hover{background:var(--tint);color:var(--tintfg)}
.thumb .tl .dur-in{width:56px;padding:1px 6px;font-size:11px;border-radius:6px}
/* playing: the current block gets the playhead red so it's obvious what's on screen */
.is-playing .thumb.active img{border-color:var(--err);box-shadow:0 0 0 3px color-mix(in srgb,var(--err) 30%,transparent)}
.is-playing .tl-block.on{border-color:var(--err);box-shadow:0 0 0 3px color-mix(in srgb,var(--err) 30%,transparent)}

.rot-reset{position:absolute;right:14px;bottom:14px;z-index:4;display:flex;align-items:center;gap:6px;font-size:12px;box-shadow:var(--sh2)}

/* My Gear list view (toggle in the header) */
.gear-list{display:flex;flex-direction:column;gap:6px}
.gear-list .gcard{min-height:0;padding:8px 14px;border-radius:12px}
.gear-list .gcard>div:nth-child(2){flex-direction:row;align-items:center;gap:14px}
.gear-list .gcard>div:nth-child(2)>b{flex:0 0 32%}
.gear-list .gcard>div:nth-child(2)>span{flex:1}
.gear-list .gcard .owner{flex:0 0 18%!important;text-align:right}
.gear-list .gcard svg{width:36px;height:28px}

/* the card's big icon rule must not hit the little owner icon (this is what pushed the owner around) */
.gcard .owner svg{width:12px;height:12px;background:none;padding:0;border-radius:0;vertical-align:-2px;margin-right:3px}
.gcard .owner{display:flex!important;align-items:center}

.orphan-note{color:var(--warn);font-size:11.5px;margin:10px 0 6px}

/* Set Plan: blocking chips, empty-blocking hint, storyboard strip (planstory.js) */
.setup-chip.blk{border-style:dashed} .setup-chip.blk.on{border-style:solid} .setup-chip.blk.is-empty{opacity:.8}
.plan-hint{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);z-index:3;max-width:460px;display:flex;flex-direction:column;gap:4px;align-items:flex-start;background:var(--bg2);border-radius:14px;box-shadow:var(--sh2);padding:12px 16px;font-size:12px;color:var(--fg2)}
.plan-hint b{color:var(--fg);font-size:13px}
.lp-story{border-top:1px solid var(--line);background:var(--bg2);display:flex;flex-direction:column;min-height:0}
.lp-sh{display:flex;align-items:center;gap:10px;padding:8px 14px}
.lp-empty{color:var(--fg2);padding:0 14px 14px;margin:0;font-size:12px}
.lp-row{display:flex;gap:8px;overflow-x:auto;padding:0 14px 12px;align-items:flex-end}
.lp-card{flex:none;width:150px;display:flex;flex-direction:column;gap:4px;cursor:pointer;border-radius:12px;padding:4px;border:2px solid transparent;transition:border-color .15s,background .15s}
.lp-card:hover{background:var(--bg3)} .lp-card.on{border-color:var(--accent)} .lp-card.playing{border-color:var(--err);background:color-mix(in srgb,var(--err) 8%,transparent)}
.lp-lab{font-size:10.5px;font-weight:700;color:var(--shot);letter-spacing:.03em;min-height:13px}
.lp-plan{height:70px;border-radius:8px;background:var(--canvas);overflow:hidden;display:grid;place-items:center}
.lp-card:not(.first) .lp-plan{background:transparent}
.lp-plan svg{width:100%;height:100%}
.lp-img{position:relative;aspect-ratio:16/9;border-radius:8px;background:#fff center/cover no-repeat;border:1px solid var(--line)}
.lp-img span{position:absolute;left:4px;bottom:4px;background:#000a;color:#fff;font-size:10px;border-radius:6px;padding:1px 6px}
.lp-row.tl{gap:2px}
/* keep the plan roomy: compact storyboard strip, chips packed left */
.lp-story{max-height:34vh;flex:none}
.lp-card{width:118px} .lp-plan{height:52px} .lp-row.tl .lp-card{min-width:60px}
.setups{justify-content:flex-start!important} .setups .setup-chip{flex:none!important}

/* ---- Schedule library + pointer drag (ui-kit.js PDrag) ---- */
.pd-src{cursor:grab;touch-action:none} .pd-dragging{opacity:.35}
.pd-ghost{position:fixed;left:0;top:0;z-index:999;pointer-events:none;box-shadow:var(--sh2);opacity:.95;border-radius:10px}
body.pd-active,body.pd-active *{cursor:grabbing!important}
.pd-zone.pd-over{outline:2px solid var(--accent);outline-offset:2px;background:color-mix(in srgb,var(--accent) 7%,var(--bg2))}
.sb-pool{gap:8px} .sb-tabs{display:flex;flex-wrap:wrap;gap:4px}
.sb-tabs .tool{display:flex;align-items:center;gap:5px;font-size:11.5px;padding:4px 9px}
.sb-search{width:100%}
.sb-plist{display:flex;flex-direction:column;gap:4px;overflow:auto;flex:1;min-height:0;padding-bottom:20px}
.sb-el{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:10px;background:var(--bg3);border:1px solid transparent}
.sb-el:hover{border-color:var(--line);background:var(--bg2)}
.sb-el .ic{color:var(--fg2);display:grid} .sb-el>div{flex:1;min-width:0;display:flex;flex-direction:column}
.sb-el b{font-weight:600;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .sb-el span{font-size:11px;color:var(--fg2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-locmap label.row{margin:4px 0;font-size:12px} .sb-locmap .lm-set{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.sb-locmap select{max-width:150px;font-size:12px;padding:4px 8px}
.sb-strip small{font-weight:400;color:#5f6368}
.sb-chips{display:flex;flex-wrap:wrap;gap:5px;padding:6px 4px 2px}
.sb-chip{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;padding:3px 10px;border-radius:999px;background:var(--bg3);border:1px solid var(--line);cursor:pointer}
.sb-chip i{display:grid;color:var(--fg2)} .sb-chip.has-note{border-color:var(--accent)}
.sb-chip em{font-style:normal;font-size:10.5px;background:var(--tint);color:var(--tintfg);border-radius:999px;padding:0 7px}
.sb-chip.k-crew{background:var(--bg2)}
.sb-item{display:flex;gap:8px;align-items:flex-start;padding:7px 4px;border-bottom:1px solid var(--line)}
.sb-item.focus{background:var(--tint);border-radius:10px}
.sb-item .ic{color:var(--fg2);padding-top:2px} .sb-item>div{flex:1;min-width:0}
.sb-item b{font-size:12.5px} .sb-irow{display:flex;gap:6px;margin-top:4px} .sb-irow .mini{flex:1;min-width:0;font-size:11.5px;padding:4px 8px}
/* mini calendar (replaces the square native date picker) */
.mcal{background:var(--bg3);border-radius:14px;padding:8px;border:1px solid var(--line)}
.mc-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px} .mc-h b{font-size:12.5px;color:var(--fg)}
.mc-g{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;text-align:center}
.mc-g>span{font-size:10px;color:var(--fg3);padding:2px 0}
.mc-d{padding:0;height:28px;border-radius:999px;border:none;background:transparent;font-size:11.5px;color:var(--fg);box-shadow:none}
.mc-d.out{color:var(--fg3)} .mc-d.today{box-shadow:inset 0 0 0 1.5px var(--accent)} .mc-d.on{background:var(--accent2);color:#fff}
.mc-d:hover:not(.on){background:var(--bg4)}
.mc-clear{margin-top:6px;font-size:11px;width:100%}

/* export page: personal export dims the project sections; email picker */
.exp-list.dim{opacity:.4;pointer-events:none}
.mail-list{max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:4px 12px;margin-bottom:12px}
.mail-list label.row{margin:6px 0} .mail-list small{color:var(--fg2)}

/* capture sheet (capture.js) */
.dialog.capture{width:min(820px,92vw)}
.cap-stage{background:#111;border-radius:14px;overflow:hidden;aspect-ratio:16/9;display:grid;place-items:center}
.cap-video{width:100%;height:100%;object-fit:contain} .cap-video.mirror{transform:scaleX(-1)}
.cap-bar{display:flex;gap:10px;align-items:flex-end;margin-top:12px} .cap-bar label.f{flex:1;margin:0} .cap-mirror{margin:0 0 6px!important;gap:8px}
.cap-status{font-size:12px;color:var(--fg2)}
.cap-shutter{width:44px;height:44px;padding:0;border-radius:50%;border:3px solid var(--line);background:#fff;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 20px #dadce0;flex:none}
.cap-shutter.rec{box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 20px var(--err)} .cap-shutter.rec.on{animation:pulse 1.2s infinite;box-shadow:inset 0 0 0 11px #fff,inset 0 0 0 20px var(--err)}
.cap-on-photo{position:absolute;right:4px;bottom:4px;background:var(--bg2)!important;box-shadow:var(--sh1)!important;color:var(--fg)}
.char-photo{position:relative}

/* polish pass: welcome cards line up top-left */
.wl-card{justify-content:flex-start}
/* shared empty state (ui-kit.js emptyState) */
.empty.es{max-width:440px;display:flex;flex-direction:column;align-items:center}
.es-title{margin:0 0 6px;font-size:17px;font-weight:600;color:var(--fg);letter-spacing:0;text-transform:none}
.es-text{margin:0;font-size:13px;line-height:1.55;color:var(--fg2)}
.es-links{margin-top:14px;display:flex;flex-direction:column;gap:6px;text-align:left;background:var(--bg3);border-radius:12px;padding:10px 14px;width:100%;box-sizing:border-box}
.es-link{display:flex;gap:9px;align-items:flex-start;font-size:12.5px;line-height:1.45;color:var(--fg2)} .es-link span:first-child{color:var(--accent);flex:none;margin-top:1px;display:flex}
.es-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:16px} .es-actions button{margin:0}
/* guide (guide.js) */
.dialog.guide{width:min(640px,92vw)}
.guide-head{display:flex;gap:14px;align-items:flex-start} .guide-head h2{margin:0 0 4px} .guide-head p{margin:0;color:var(--fg2);font-size:13px}
.guide-ic{width:46px;height:46px;border-radius:14px;background:var(--tint);color:var(--accent);display:grid;place-items:center;flex:none}
.guide-bar{height:6px;border-radius:3px;background:var(--bg3);margin:18px 0 8px;overflow:hidden} .guide-bar span{display:block;height:100%;background:var(--accent);border-radius:3px;transition:width .4s}
.guide-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.guide-steps li{display:flex;gap:12px;align-items:center;padding:9px 10px;border-radius:12px}
.guide-steps li:hover{background:var(--bg3)}
.gs-num{width:24px;height:24px;border-radius:50%;border:1.5px solid var(--line);display:grid;place-items:center;font-size:11.5px;font-weight:600;color:var(--fg2);flex:none}
.guide-steps li.done .gs-num{background:var(--accent);border-color:var(--accent);color:#fff}
.gs-ic{color:var(--fg3);display:flex;flex:none} .guide-steps li.done .gs-ic{color:var(--accent)}
.gs-body{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0} .gs-body b{font-size:13.5px} .gs-body span{font-size:12px;color:var(--fg2);line-height:1.45}
.guide-steps li.done .gs-body b{color:var(--fg2)}
.guide-steps button{flex:none;min-width:58px}
.guide-foot{font-size:12px;color:var(--fg2);margin:14px 0 0}
/* shortcuts sheet in columns */
.dialog.shortcuts{width:min(860px,94vw)} .cheat-cols{display:grid;grid-template-columns:1fr 1fr;gap:6px 28px} .cheat-grp h3{margin:12px 0 6px}

/* schedule library tabs: even grid, icon over label (sched.js renderPool) */
.sb-tabs{display:grid!important;grid-template-columns:repeat(4,1fr);gap:4px}
.sb-tabs .tool{flex-direction:column;justify-content:center;height:auto!important;gap:3px!important;padding:7px 2px!important;font-size:11px!important;border-radius:10px;min-width:0}
.sb-tabs .tool span{flex:none;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
/* guide: wider + tighter rows so all nine steps fit without scrolling on a laptop screen */
.dialog.guide{width:min(760px,94vw)} .guide-steps li{padding:6px 10px} .gs-body span{font-size:11.5px}
.guide-head p{font-size:12.5px} .guide-bar{margin:14px 0 6px}
/* storyboard shot labels: fully rounded, sitting inside their group instead of hanging off its top edge */
.sg-h{border-radius:8px!important;margin-top:6px}

/* setup chip counts: readable on the tinted 'on' chip in both themes */
.setup-chip.on span{background:color-mix(in srgb,var(--tintfg) 18%,transparent)!important;color:var(--tintfg)!important}
/* find dialog: friendlier rows */
.find-row b{font-weight:500} .find-row .sub{margin-left:auto;font-size:12px} .find-res{max-height:60vh;overflow:auto}
/* links inside dialogs use the app accent (the browser default blue is unreadable in dark mode); brand pink stays */
.dialog a:not(.brand-link){color:var(--accent)}
/* stripboard colours are an industry convention, so keep them — just dim them a touch in dark mode so they don't glare */
:root[data-theme=dark] .sb-strip:not(.gone){filter:brightness(.84);border-color:#0000}
.aud-empty{font-size:12px;line-height:1.5;color:var(--fg2);padding:10px 4px} /* cast.js auditions board, nothing added yet */

/* support cards (app.js supportCard): the Radically Impartial card mirrors the coffee card in brand pink */
.support-cards{display:flex;flex-direction:column;gap:10px;margin-top:18px} .support-cards .support{margin-top:0}
.support.brand{background:#fde7f3;border-color:#f8b4d9} .support.brand b{color:#8a0f55} .support.brand p{color:#9c2766!important}
.support.brand .coffee{background:#f0249b;border-color:#d81b8a;color:#fff} .support.brand .coffee:hover{background:#f43fa9}
:root[data-theme=dark] .support.brand{background:#33142a;border-color:#6b2152} :root[data-theme=dark] .support.brand b,:root[data-theme=dark] .support.brand p{color:#f8b4d9!important}

/* mood board: the note/heading text being edited (mood.js editText) */
.mb-item.editing{cursor:text}.mb-item.editing .mb-txt{display:block;min-height:1.4em;outline:none;user-select:text;-webkit-user-select:text;cursor:text}

/* new script: the empty first scene heading shows a hint (Script.load). Only in tab mode, where line types are explicit */
body.tabmode #editor>div.scene:empty::before{content:'INT. LOCATION - DAY';display:inline!important;position:static;width:auto;font:inherit;letter-spacing:inherit;color:var(--fg3);opacity:.7}

/* empty-state quick picks: Set Plan scenes (light.js renderScenePick), Locations from the script (locations.js renderFromScript) */
.es-scenes{display:flex;flex-direction:column;gap:6px;margin-top:18px;width:min(420px,90%)}
.es-sub{font-size:12px;color:var(--fg3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px}
.es-scene{display:flex;align-items:center;gap:10px;justify-content:flex-start;text-align:left;height:auto;min-height:34px;padding:6px 12px}
.es-scene b{color:var(--scene);min-width:18px} .es-scene span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* export: sections with nothing in them (export.js sec) */
.exp-sec.none label{color:var(--fg3)} .exp-none{margin-left:auto;font-size:11px;color:var(--fg3)}

/* toast with an action (App.toast(msg, [label, fn])) */
#toast.act{pointer-events:auto;display:flex;align-items:center;gap:12px}
.toast-act{background:none;border:none;color:#8ab4f8;font-weight:600;padding:0;height:auto;cursor:pointer} .toast-act:hover{text-decoration:underline}

/* character/crew cards: long names truncate instead of spilling over the next card (stress test) */
.char-card{min-width:0}.char-card .cc-body{min-width:0;flex:1}.char-card .cc-body b,.char-card .cc-body span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.char-photo{flex:none}

/* set plan: scene link in the header (light.js renderSceneLink) */
.plan-scene{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:13px;border:none;background:var(--bg3);color:var(--fg2);font-size:12px;max-width:42%;overflow:hidden;transition:background .15s var(--ease),color .15s}
.plan-scene span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .plan-scene:hover{background:var(--tint);color:var(--tintfg)}
.setups.hidden{display:none!important}
/* instant hover labels for icon rails (data-tip): set plan tools, storyboard tools */
.rail button[data-tip],.b-tools button[data-tip]{position:relative}
.rail button[data-tip]:hover::after,.b-tools button[data-tip]:hover::after{content:attr(data-tip);position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);white-space:nowrap;background:#202124;color:#fff;font-size:11.5px;padding:5px 9px;border-radius:7px;pointer-events:none;z-index:40;box-shadow:var(--sh2);animation:tipIn .12s var(--ease)}
@keyframes tipIn{from{opacity:0;transform:translate(-4px,-50%)}to{opacity:1;transform:translate(0,-50%)}}

/* set plan first-visit explainer (light.js this.tip) */
.plan-tip{display:flex;align-items:center;gap:10px;padding:8px 14px;background:var(--tint);color:var(--tintfg);font-size:12.5px;line-height:1.4;border-bottom:1px solid var(--line);animation:slideDown .25s var(--ease)}
.plan-tip>span:nth-child(2){flex:1} .plan-tip b{font-weight:600}
@keyframes slideDown{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* script outline: hover actions per scene (script.js renderOutline) */
.ol{display:flex;align-items:center;gap:6px} .ol .ol-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ol .ol-act{display:none;gap:0} .ol:hover .ol-act{display:flex;animation:fadeIn .12s var(--ease)} /* hidden actions take no room, so headings aren't cut short */ .ol .ol-act button{width:22px;height:22px}

/* App.ask confirm layer (above #overlay) */
.ask-layer{position:fixed;inset:0;z-index:90;display:grid;place-items:center;background:rgba(0,0,0,.28);animation:fadeIn .14s var(--ease)}
.ask-layer.out{opacity:0;transition:opacity .14s}
.dialog.ask{width:min(420px,92vw);animation:popIn .18s var(--ease)} .dialog.ask p{margin:0 0 4px;line-height:1.45}
@keyframes fadeIn{from{opacity:0}} @keyframes popIn{from{opacity:0;transform:scale(.96) translateY(6px)}}

/* Settings: sub-labels and the collapsed Advanced section (App.settings) */
.set-sub{font-size:12px;color:var(--fg3);margin:6px 0 4px}

/* ---- motion: small, quick and consistent (all use --ease) ----
   .appear: something you just added pops in (ui-kit.js appear()); buttons press in slightly; reduced-motion users
   (macOS › Accessibility › Display › Reduce motion) get no movement at all. */
.appear{animation:appearPop .26s var(--ease) both}
@keyframes appearPop{from{opacity:0;transform:scale(.92) translateY(4px)}to{opacity:1;transform:none}}
.mb-item.appear{animation-name:appearFade} @keyframes appearFade{from{opacity:0}to{opacity:1}} /* mood items are positioned with left/top; scale would jump */
.dock-btn,button.primary,.es-scene,.setup-chip,.wl-card{transition:transform .12s var(--ease),background-color .15s,box-shadow .15s}
.dock-btn:active,button.primary:active,.es-scene:active,.setup-chip:active,.wl-card:active{transform:scale(.96)}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* storyboard layers list (board.js layerPanel) — same rows as the Set Plan layers; opacity slider shows on hover */
.bd-layers{margin-top:14px;padding:4px} .bd-layers .lh{cursor:default}
.bd-layers .lop{width:56px;opacity:0;transition:opacity .12s} .bd-layers .lrow:hover .lop{opacity:1}
.strip-adds .thumb.add[data-tip]{position:relative}
.strip-adds .thumb.add[data-tip]:hover::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);white-space:nowrap;background:#202124;color:#fff;font-size:11.5px;padding:5px 9px;border-radius:7px;pointer-events:none;z-index:40;animation:fadeIn .12s var(--ease)}

/* menu separators (App.menu ['—']) */
#ctxmenu .menu-sep{border:none;border-top:1px solid var(--line);margin:4px 6px}
/* revisions (revisions.js): coloured bar beside changed lines, badge in the toolbar */
#editor>div.revised{box-shadow:4px 0 0 -1px var(--revc,#8ab4f8);border-radius:0}
#editor>div.revised:not(.scene)::after{content:'*';position:absolute;right:-.42in;color:var(--fg3);font-weight:400}
#editor>div.revised{position:relative}
.rev-badge{font-size:11.5px;font-weight:600;padding:3px 9px;border-radius:999px;background:color-mix(in srgb,var(--c) 30%,transparent);color:var(--fg);margin-right:8px}

/* cue popover groups (script.js actionPopover) */
.kinds .kgrp{width:100%;font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--fg3);margin:4px 0 0}

/* on set (onset.js): done shots, takes log, schedule progress */
.mark.done{opacity:.55} .mark.done::after{content:'✓';position:absolute;top:-2px;right:-12px;font-size:11px;color:var(--ok)}
.onset-done{display:flex;align-items:center;gap:8px;margin:2px 0 8px}
.take{display:flex;align-items:center;gap:5px;margin-bottom:5px} .take input{height:28px;font-size:12px;flex:1;min-width:0} .take .tk-roll{flex:none;width:46px}
.tk-n{width:28px;height:28px;border-radius:50%;padding:0;flex:none;font-weight:600;font-size:12px;display:grid;place-items:center}
.tk-n.on{border:2px solid var(--danger,#d93025);color:var(--danger,#d93025)}
.sb-prog{font-size:11px;color:var(--ok);margin-right:8px}
.thumb .done-badge{position:absolute;top:6px;right:6px;width:18px;height:18px;border-radius:50%;background:var(--ok);color:#fff;display:grid;place-items:center;font-size:11px}

/* ---- Budget (budget.js): top sheet on the left, category sheets on the right ---- */
.bg-body{flex:1;display:flex;min-height:0;overflow:hidden}
.bg-top{width:260px;flex:none;padding:16px;border-right:1px solid var(--line);overflow:auto;background:var(--bg2)}
.bg-top h4{margin:0 0 10px}
.bg-tl{display:grid;grid-template-columns:1fr auto;gap:2px 8px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line);font-size:12.5px}
.bg-tl b{text-align:right;font-variant-numeric:tabular-nums} .bg-tl .bg-act{grid-column:2;text-align:right;font-size:11px;color:var(--fg3)}
.bg-tl.tot{font-size:14px;border-bottom:none} .bg-tl .mini{width:52px;height:24px}
.bg-bar{height:8px;border-radius:4px;background:var(--bg4);overflow:hidden;margin-top:6px} .bg-bar span{display:block;height:100%;background:var(--ok);border-radius:4px;transition:width .3s var(--ease)} .bg-bar span.over{background:var(--danger,#d93025)}
.bg-note{font-size:12px;color:var(--fg3);margin:6px 0}
.bg-sheet{flex:1;overflow:auto;padding:8px 20px 40px}
.bg-grp{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--fg3);margin:18px 0 6px}
.bg-cat{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;cursor:pointer;font-size:13px}
.bg-cat:hover{background:var(--bg3)} .bg-cat .grow{flex:1} .bg-cat.none b{font-weight:500;color:var(--fg2)} .bg-cat .ic{display:grid;color:var(--fg3)} .bg-cat .ic.open svg{transform:rotate(90deg)} .bg-cat .ic svg{transition:transform .15s var(--ease)}
.bg-amt{font-variant-numeric:tabular-nums;font-weight:600}
.bg-lines{padding:2px 0 10px 28px;animation:slideDown .18s var(--ease)}
.bg-row{display:grid;grid-template-columns:minmax(140px,1fr) 56px 76px 56px 86px 96px 86px 26px;gap:6px;align-items:center;margin-bottom:5px}
.bg-row input,.bg-row select{height:30px;font-size:12.5px;min-width:0;width:100%} .bg-row.hd span{font-size:11px;color:var(--fg3)}
.bg-row .bg-est{text-align:right;font-variant-numeric:tabular-nums;font-weight:500}
.bg-row.auto input:first-child{background:color-mix(in srgb,var(--tint) 50%,var(--bg3))}
.bg-add{margin-top:2px}
/* paperwork tab */
.pp-wrap{flex:1;overflow:auto;padding:8px 24px 40px;max-width:980px}
.pp-tbl{display:flex;flex-direction:column;gap:5px}
.pp-row{display:grid;grid-template-columns:minmax(160px,1fr) 150px 150px 90px 26px;gap:8px;align-items:center}
.pp-row.hd span{font-size:11px;color:var(--fg3)} .pp-row b{display:block;font-size:13px} .pp-row small{color:var(--fg3);font-size:11.5px}
.pp-row input,.pp-row select{height:30px;font-size:12.5px;min-width:0}
.pp-st.st-0{color:var(--fg2)} .pp-st.st-1{color:#b06000} .pp-st.st-2{color:var(--ok);font-weight:600}
.pp-rate{font-size:12px;color:var(--fg2)} .pp-file{height:30px}

/* export page: Production heading and 'Also save as' links (export.js) */
.exp-h{margin:14px 0 4px;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--fg3)}
.exp-more{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;margin:10px 0 0;color:var(--fg3)} .exp-more a{color:var(--accent);text-decoration:none} .exp-more a:hover{text-decoration:underline}

/* Settings (App.settings): side menu + search on the left, one page on the right */
.dialog.settings{width:min(820px,94vw);height:min(620px,86vh);padding:0;display:flex;overflow:hidden}
.set-side{width:210px;flex-shrink:0;background:var(--bg3);padding:22px 12px;display:flex;flex-direction:column;gap:10px;border-right:1px solid var(--line)}
.set-side h2{padding:0 8px}
.set-sw{display:flex;align-items:center;gap:6px;background:var(--bg2);border-radius:10px;padding:0 10px;box-shadow:inset 0 0 0 1px var(--line);color:var(--fg3)}
.set-sw:focus-within{box-shadow:inset 0 0 0 2px var(--accent)}
.set-search,.set-search:focus{border:0!important;background:none!important;box-shadow:none!important;outline:none!important;padding:8px 0!important;width:100%;font:inherit;color:var(--fg)}
.set-nav{display:flex;flex-direction:column;gap:2px;overflow:auto}
.set-nb{display:flex;align-items:center;justify-content:flex-start;width:100%;gap:10px;text-align:left;border:0;background:none;border-radius:10px;padding:8px 10px;color:var(--fg);font:inherit;cursor:pointer;transition:background .12s var(--ease),color .12s var(--ease)}
.set-nb span{display:flex;color:var(--fg2)} .set-nb:hover{background:var(--bg4)} .set-nb.on{background:var(--tint);color:var(--tintfg)} .set-nb.on span{color:var(--tintfg)}
.set-main{flex:1;display:flex;flex-direction:column;min-width:0}
.set-body{flex:1;overflow:auto;padding:22px 26px 10px}
.set-main .actions{margin:0;padding:12px 20px;border-top:1px solid var(--line)}
.set-pane{animation:fadein .16s var(--ease)} .set-body.searching .set-pane+.set-pane{margin-top:18px}
.dialog .set-title{margin:0 0 12px;font-size:15px;text-transform:none;letter-spacing:0;color:var(--fg);font-weight:600}
.set-h{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--fg2);margin:18px 0 6px;font-weight:600}
.dialog p.set-note{font-size:12px;margin:0 0 8px}
.set-item+.set-item{margin-top:2px}
.set-btns{display:flex;gap:6px;flex-wrap:wrap}
.set-empty{color:var(--fg3);text-align:center;padding:40px 0}
.tool-row .tr-name{display:flex;align-items:center;gap:10px} .tool-row .tr-name span{display:flex;color:var(--fg2)} .tool-row small{color:var(--fg3);font-size:11px}
@keyframes fadein{from{opacity:0}to{opacity:1}}
@media (max-width:640px){.dialog.settings{flex-direction:column}.set-side{width:auto;border-right:0;border-bottom:1px solid var(--line)}.set-nav{flex-direction:row;flex-wrap:wrap}}

/* Split view (split.js): the script tool's panes in .sp-left, a divider, and a second document in .sp-side.
   --sp is the left side's share of the width. Opening and closing animate the width; dragging doesn't. */
/* .sp-host is the .module itself, already position:absolute — the drop target positions against it */
.sp-left{flex:0 0 100%;transition:flex-basis .26s var(--ease)}
.sp-side{flex:1 1 0;min-width:0;overflow:hidden;opacity:0;transition:opacity .2s var(--ease);background:var(--bg2)}
.sp-div{flex:0 0 0;position:relative;outline:none;z-index:3}
.sp-host.split .sp-left{flex-basis:calc(var(--sp) * 100% - 6px)}
.sp-host.split .sp-side{opacity:1}
.sp-host.split .sp-div{flex-basis:12px;cursor:col-resize}
/* Storyboard panels sit before the script. --sp remains the script width, and the divider reverses its maths in
   split.js. Other reference documents keep the shared viewer's original right-hand placement. */
.sp-host.storyboard-left .sp-side{order:-2}
.sp-host.storyboard-left .sp-div{order:-1}
.sp-host.storyboard-left .sp-left{overflow:hidden} /* contain the outline's negative-margin collapse inside the script column */
.sp-body>.story-scene-action{padding:10px 12px;border-bottom:1px solid var(--line);flex:none}
.story-scene-action button{width:100%}
.sp-host.sp-dragging .sp-left{transition:none} .sp-host.sp-dragging{user-select:none}
.sp-host.sp-dragging iframe,.sp-host.sp-dragging video{pointer-events:none}
.sp-div::before{content:'';position:absolute;top:0;bottom:0;left:50%;width:1px;background:var(--line);transition:background .15s var(--ease)}
.sp-grip{position:absolute;left:50%;top:50%;width:4px;height:36px;margin:-18px 0 0 -2px;border-radius:4px;background:var(--fg3);opacity:0;transition:height .18s var(--ease),margin .18s var(--ease),background .15s var(--ease),opacity .15s var(--ease)}
.sp-host.split .sp-grip{opacity:.55}
.sp-div:hover .sp-grip,.sp-div:focus-visible .sp-grip,.sp-dragging .sp-grip{opacity:1;height:56px;margin-top:-28px;background:var(--accent)}
.sp-div:hover::before,.sp-dragging .sp-div::before{background:color-mix(in srgb,var(--accent) 45%,transparent)}
.sp-side>.toolbar{flex-shrink:0}
.sp-title{display:flex;align-items:center;gap:6px;font-weight:600;max-width:70%;overflow:hidden}
.sp-title span{display:flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .sp-title .chev{color:var(--fg3);transform:rotate(90deg)}
.sp-body{flex:1;min-height:0;display:flex;flex-direction:column}
.sp-body>*{flex:1;min-height:0}
.sp-note{margin:0;border:none;border-radius:0;background:var(--page);color:var(--pagefg);padding:36px max(28px,calc(50% - 320px));font:15px/1.7 -apple-system,"Iowan Old Style",Georgia,serif;resize:none;box-shadow:none;outline:none}
.sp-scroll{overflow:auto;background:var(--bg);padding:24px}
.sp-script{background:var(--page);color:var(--pagefg);max-width:7in;margin:0 auto;padding:.7in .6in .7in 1in;border-radius:6px;box-shadow:var(--sh1);font:12pt/1 "Courier Prime","Courier New",monospace}
.sp-script>div{white-space:pre-wrap;min-height:1em} .sp-script .bl{height:1em}
.sp-script .scene{font-weight:700;text-transform:uppercase} .sp-script .character{margin-left:2.2in;text-transform:uppercase}
.sp-script .dialogue{margin-left:1in;margin-right:1.2in} .sp-script .parenthetical{margin-left:1.6in;margin-right:1.8in}
.sp-script .transition{text-align:right;text-transform:uppercase} .sp-script .centered{text-align:center}
.sp-media{display:grid;place-items:center;overflow:auto;background:var(--bg);padding:18px}
.sp-media img,.sp-media video{max-width:100%;max-height:100%;border-radius:12px;box-shadow:var(--sh2);background:#000}
.sp-media.pdf{padding:0} .sp-media iframe{width:100%;height:100%;border:none;background:#fff}
.sp-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:30px;text-align:center;color:var(--fg2);overflow:auto}
.sp-empty .big{color:var(--fg3);margin-bottom:6px} .sp-empty b{color:var(--fg)} .sp-empty p{margin:0 0 12px;font-size:13px;max-width:300px}
.sp-list{display:flex;flex-direction:column;gap:2px;width:min(340px,100%)}
.sp-list button{display:grid;grid-template-columns:20px 1fr;grid-template-rows:auto auto;column-gap:8px;text-align:left;border:0;background:none;border-radius:10px;padding:7px 10px;cursor:pointer;color:var(--fg);font:inherit;transition:background .12s var(--ease)}
.sp-list button:hover{background:var(--bg3)} .sp-list button>span:first-child{grid-row:span 2;display:flex;align-items:center;color:var(--fg2)}
.sp-list small{color:var(--fg3);font-size:11px}
/* drag a file from the sidebar: a soft target on the right half (or over the open side) */
.sp-drop{position:absolute;top:10px;bottom:10px;right:10px;width:calc(50% - 15px);border-radius:16px;border:2px dashed color-mix(in srgb,var(--accent) 60%,transparent);background:color-mix(in srgb,var(--accent) 8%,transparent);display:grid;place-items:center;color:var(--accent);font-weight:600;pointer-events:none;opacity:0;transform:scale(.98);transition:opacity .16s var(--ease),transform .16s var(--ease);z-index:5}
.sp-drop>div{display:flex;flex-direction:column;align-items:center;gap:8px;background:var(--bg2);padding:14px 20px;border-radius:14px;box-shadow:var(--sh2)}
.sp-drop span{display:flex}
.sp-host.split .sp-drop{width:calc((1 - var(--sp)) * 100% - 16px)}
.sp-host.sp-over .sp-drop{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.sp-left,.sp-side,.sp-grip,.sp-drop{transition:none}}
/* narrow script column (split view): the page/word count is the first thing to go so the toolbar stays on one line */
.sp-left{container-type:inline-size}
@container (max-width:780px){.sc-status{display:none}}
@container (max-width:680px){.sp-left .toolbar button.tool>svg+span{display:none}} /* Draft / Shots (lbtn) go icon-only; their title says what they are */

/* Comments (comments.js): yellow highlight on the commented text, a panel of cards on the right */
/* notes in Write: a yellow underline (user request; was a yellow wash), the open one thicker with a faint wash */
::highlight(rb-comment){text-decoration:underline 2px #f2b400;text-underline-offset:4px;text-decoration-skip-ink:none}
::highlight(rb-comment-on){text-decoration:underline 3px #f2b400;text-underline-offset:4px;text-decoration-skip-ink:none;background-color:rgba(251,188,4,.16)}
.cm-btn{position:relative}
.cm-count{position:absolute;top:1px;right:0;min-width:15px;height:15px;padding:0 4px;border-radius:8px;background:#f9ab00;color:#202124;font:600 10px/15px -apple-system,system-ui;text-align:center;pointer-events:none}
#selpop .s.cm{display:inline-flex;align-items:center;gap:5px} #selpop .s.cm span{display:flex}
.cm-panel{width:300px;flex-shrink:0;display:flex;flex-direction:column;background:var(--bg3);border-left:1px solid var(--line);overflow:hidden;transition:width .24s var(--ease),opacity .2s var(--ease)}
.cm-panel.collapsed{width:0;opacity:0;border-left:0}
.cm-head{display:flex;align-items:center;padding:10px 10px 6px 16px;font-size:14px;flex-shrink:0} .cm-head .grow,.cm-meta .grow{flex:1}
.cm-list{flex:1;overflow:auto;padding:4px 10px 20px;display:flex;flex-direction:column;gap:8px}
.cm-card{background:var(--bg2);border-radius:12px;padding:10px 12px 6px;box-shadow:var(--sh1);cursor:pointer;border:1px solid transparent;transition:border-color .15s var(--ease),box-shadow .15s var(--ease);animation:pop .2s var(--ease)}
.cm-card.on{border-color:#f9ab00;box-shadow:var(--sh2)}
.cm-quote{font:12px/1.4 "Courier Prime","Courier New",monospace;color:var(--fg2);border-left:3px solid #f9ab00;padding-left:8px;margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cm-card.lost .cm-quote{text-decoration:line-through;border-left-color:var(--fg3)}
.cm-card textarea{width:100%;border:0;background:none;box-shadow:none;resize:none;padding:2px 0;font:13px/1.45 -apple-system,system-ui;color:var(--fg);outline:none;overflow:hidden;min-height:22px}
.cm-meta{display:flex;align-items:center;gap:2px;font-size:11px;color:var(--fg3)}
.cm-none{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;color:var(--fg3);font-size:12px;padding:40px 16px} .cm-none span:first-child{display:flex;opacity:.6;margin-bottom:4px} .cm-none b{color:var(--fg2);font-size:13px}
.cm-done{margin-top:6px} .cm-done>summary{cursor:pointer;font-size:12px;color:var(--fg2);padding:4px 2px;list-style:none} .cm-done>summary::before{content:'› ';display:inline-block;transition:transform .15s var(--ease)} .cm-done[open]>summary::before{transform:rotate(90deg)}
.cm-done .cm-card{opacity:.7;margin-top:8px}
/* Write's sidebar: mood boards listed under the scripts and notes (app.js renderTree) */
.sb-group{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--fg3);padding:14px 12px 4px}
/* mood board description (mood.js) */
.mb-desc{flex-shrink:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:var(--bg2);box-shadow:none;resize:none;padding:10px 18px;font:14px/1.5 -apple-system,system-ui;color:var(--fg);outline:none;overflow:hidden;min-height:40px}
.mb-desc::placeholder{color:var(--fg3)}

/* Projects screen (projects.js): the start page. Covers the window below the title bar's drag strip. */
#projects{position:fixed;inset:0;z-index:45;background:var(--bg);overflow:auto;animation:pj-in .26s var(--ease)}
#projects.out{opacity:0;transform:scale(1.01);transition:opacity .2s var(--ease),transform .2s var(--ease);pointer-events:none}
@keyframes pj-in{from{opacity:0;transform:scale(.985)}to{opacity:1;transform:none}}
.pj-drag{position:fixed;top:0;left:0;right:0;height:40px;-webkit-app-region:drag;z-index:1} /* move the window from the top strip, like the title bar */
.pj-wrap{max-width:1120px;margin:0 auto;padding:40px 32px 32px;position:relative}
.pj-back{position:fixed;top:6px;right:14px;z-index:3;-webkit-app-region:no-drag} /* in the top strip, clear of the welcome cards */
/* welcome: intro on the left, support on the right */
.pj-hero{display:grid;grid-template-columns:1.5fr 1fr;gap:16px;margin-bottom:26px;align-items:stretch;-webkit-app-region:no-drag}
.pj-intro{position:relative;padding:22px 24px;border-radius:26px;background:radial-gradient(120% 140% at 0% 0%,color-mix(in srgb,var(--accent) 12%,var(--bg2)) 0%,var(--bg2) 55%);box-shadow:var(--sh1);overflow:hidden;animation:pop .35s var(--ease) both}
.pj-brand{display:flex;align-items:center;gap:10px;margin-bottom:10px} .pj-brand img{width:40px;height:40px;filter:drop-shadow(0 4px 10px rgba(0,0,0,.15))}
.pj-intro h1{margin:0 0 6px;font-size:24px;font-weight:650;letter-spacing:-.02em;line-height:1.1}
.pj-lede{margin:0 0 14px;font-size:13.5px;line-height:1.55;color:var(--fg2);max-width:520px}
.pj-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:4px 12px}
.pj-tool{display:flex;gap:10px;align-items:flex-start;padding:6px 0}
.pj-tool>span{display:flex;flex:none;width:28px;height:28px;border-radius:10px;place-items:center;justify-content:center;align-items:center;background:var(--tint);color:var(--tintfg)}
.pj-tool b{display:block;font-size:13px} .pj-tool small{display:block;font-size:11px;color:var(--fg2);line-height:1.35;margin-top:1px}
.pj-love{position:relative;display:flex;flex-direction:column;justify-content:center;padding:22px 22px 20px;border-radius:26px;overflow:hidden;color:#4a1233;background:linear-gradient(150deg,#fff3c4 0%,#ffe0ef 55%,#fcd0ea 100%);box-shadow:var(--sh1);animation:pop .35s .06s var(--ease) both}
.pj-love::after{content:'';position:absolute;right:-60px;bottom:-60px;width:200px;height:200px;border-radius:50%;background:radial-gradient(circle,rgba(240,36,155,.18),transparent 70%);pointer-events:none}
.pj-love-top{display:flex;align-items:center;gap:10px;margin-bottom:10px} .pj-love-top b{font-size:15px;letter-spacing:-.01em}
.pj-heart{display:flex;width:36px;height:36px;border-radius:12px;align-items:center;justify-content:center;background:#ffdd00;color:#3d2c00;box-shadow:0 3px 10px rgba(240,180,0,.35)}
.pj-love p{margin:0 0 16px;font-size:12.5px;line-height:1.55;color:#6d2a4f}
.pj-love-btns{display:flex;flex-wrap:wrap;gap:8px;position:relative;z-index:1}
.pj-love-btns button{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:9px 16px;font-weight:600;font-size:13px;border:0;cursor:pointer;transition:transform .15s var(--ease),box-shadow .15s var(--ease),filter .15s}
.pj-love-btns button span{display:flex}
.pj-love-btns button:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(0,0,0,.12)} .pj-love-btns button:active{transform:none}
.pj-coffee{background:#ffdd00;color:#3d2c00} .pj-coffee:hover{filter:brightness(1.04)}
.pj-site{background:#f0249b;color:#fff} .pj-site:hover{filter:brightness(1.06)}
.pj-head{display:flex;align-items:center;gap:10px;margin-bottom:14px;-webkit-app-region:no-drag}
.pj-head h2{margin:0;font-size:18px;font-weight:600}
.pj-head button{display:inline-flex;align-items:center;gap:6px} .pj-head button span{display:flex}
.pj-head .grow{flex:1}
@media (max-width:860px){.pj-hero{grid-template-columns:1fr}.pj-tools{grid-template-columns:repeat(2,1fr)}}
.pj-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px}
.pj-card{position:relative;background:var(--bg2);border-radius:18px;overflow:hidden;box-shadow:var(--sh1);cursor:pointer;outline:none;transition:transform .18s var(--ease),box-shadow .18s var(--ease);animation:pop .3s var(--ease) both}
.pj-card:hover,.pj-card:focus-visible{transform:translateY(-3px);box-shadow:var(--sh2)}
.pj-card:active{transform:translateY(-1px) scale(.99)}
.pj-thumb{aspect-ratio:16/10;background:linear-gradient(135deg,var(--tint),var(--bg3));display:grid;place-items:center;position:relative;overflow:hidden}
.pj-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fff;opacity:0;transition:opacity .45s var(--ease)}
.pj-thumb img.on{opacity:1} /* storyboard loop: two images crossfade (Projects.play) */ .pj-ph{display:flex;color:var(--tintfg);opacity:.5}
.pj-meta{padding:12px 14px 14px;display:flex;flex-direction:column;gap:3px;min-width:0}
.pj-meta b{font-size:14px;display:flex;align-items:center;gap:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-meta small{color:var(--fg2);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-badge{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;background:#fce8f3;color:#c2185b;border-radius:6px;padding:2px 6px}
.pj-x{position:absolute;top:8px;right:8px;background:var(--bg2)!important;box-shadow:var(--sh1);opacity:0;transition:opacity .15s var(--ease)}
.pj-card:hover .pj-x{opacity:1}
.pj-card.missing{opacity:.6} .pj-card.missing .pj-thumb{filter:grayscale(1)}
.pj-hint{color:var(--fg3);font-size:13px;margin:18px 2px 0}
.pj-foot{margin:36px 0 0;text-align:center;font-size:12px;color:var(--fg3)}
.pj-busy{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:color-mix(in srgb,var(--bg) 80%,transparent);backdrop-filter:blur(4px);font-weight:600;color:var(--fg2);z-index:2}
.spin{width:28px;height:28px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
#projname{cursor:pointer} #projname:hover{color:var(--accent)}
body.on-projects #dock{visibility:hidden}

/* typed focal lengths (Focal, gear.js) */
.focal-in{width:100%}

/* comment suggestion (comments.js suggestComment): the selected passage and its ready-to-type card */
::highlight(rb-comment-draft){background-color:rgba(26,115,232,.18)}
.cm-card.draft{border:1.5px dashed var(--accent);box-shadow:none;background:var(--bg2)} .cm-card.draft .cm-quote{border-left-color:var(--accent)} .cm-card.draft .cm-meta{color:var(--accent)}

/* Settings › About (app.js settings) */
.about-card{display:flex;gap:16px;align-items:flex-start;padding:16px;border-radius:16px;background:var(--bg3)}
.about-card img{width:64px;height:64px;flex:none;filter:drop-shadow(0 3px 8px rgba(0,0,0,.15))}
.about-card b{font-size:17px;display:flex;align-items:center;gap:8px} .about-ver{color:var(--fg2);font-size:13px;margin:2px 0 8px}
.dialog .about-card p{font-size:12.5px;margin:0;line-height:1.5}
.about-upd{display:flex;align-items:center;gap:10px;font-size:13px} .about-upd .grow{flex:1}
.about-upd+.upd{margin-top:8px}

/* Beta tag sits on the left, right after the app icon and project name (user request) */
#titlebar #projname{flex:none} #titlebar .beta-tag{margin-right:auto}

/* shot colour row in the shot panel (script.js shotColor) */
.shot-col{display:flex;align-items:center;gap:8px} .shot-col input[type=color]{width:34px;height:26px;padding:0;border:0;border-radius:8px;background:none} .shot-col span{flex:1;font-size:12px;color:var(--fg2)}
.size-cols{display:grid;grid-template-columns:repeat(2,1fr);gap:6px 14px;align-items:center} .size-cols label{display:flex;align-items:center;gap:8px;font-size:12px} .size-cols input[type=color]{width:26px;height:22px;padding:0;border:0;background:none} .size-cols button{grid-column:1/-1;justify-self:start}

/* Write: show/hide toggles in the Shots panel (Script.applyHide) and the + beside cue dots */
.eye-row{display:flex;gap:4px;margin:-2px 0 12px;flex-wrap:wrap}
.eye-t{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;padding:4px 9px;border-radius:999px;border:0;background:var(--bg3,#f1f3f4);color:var(--fg3);cursor:pointer;transition:background .15s,color .15s}
.eye-t span{display:flex} .eye-t.on{background:var(--tint);color:var(--tintfg)}
.sc-scroll.hide-shots .mark.mk-shot,.sc-scroll.hide-shots .mk-conn{opacity:0;pointer-events:none} .sc-scroll.hide-shots #editor>div.hl-shot{background:none;box-shadow:none}
.sc-scroll.hide-cues .adot{opacity:0;pointer-events:none}
.sc-scroll.hide-comments *::highlight(rb-comment),.sc-scroll.hide-comments *::highlight(rb-comment-on){background-color:transparent;text-decoration:none}
.mark,.adot,.mk-conn{transition:opacity .2s var(--ease)}

/* Write: grey formatting hint after the caret (Script.ghostFor); → accepts it */
#editor>div[data-ghost]::after{content:attr(data-ghost);color:#b0b4ba;pointer-events:none;white-space:pre}

/* ---- storyboard extras (boardplus.js) ---- */
.crop-bar{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:8px 8px 8px 16px;border-radius:999px;background:var(--bg2);box-shadow:var(--sh2);z-index:60;font-size:12.5px;color:var(--fg2);animation:pop .2s var(--ease) both}
.bd-canvaswrap.cropping{cursor:default}
.bd-grid{position:absolute;inset:0;width:100%;height:100%;z-index:45;pointer-events:none}
.bd-grid line,.bd-grid circle{stroke:rgba(26,115,232,.55);stroke-width:1.5;fill:none;vector-effect:non-scaling-stroke}
.bd-grid rect{fill:none;stroke-width:1.2;vector-effect:non-scaling-stroke} .bd-grid rect.act{stroke:rgba(26,115,232,.5);stroke-dasharray:6 4} .bd-grid rect.ttl{stroke:rgba(217,48,37,.5);stroke-dasharray:3 4}
.thumb.sel{transform:translateY(-2px)} .thumb.sel img{outline:2.5px solid var(--accent);outline-offset:2px} /* rounded ring on the picture, not a square box round the whole tile */ .thumb{transition:transform .15s var(--ease),box-shadow .15s var(--ease)}
.insp-h{display:flex;align-items:center;gap:2px} .insp-h h4{flex:1;margin:0}
.panel .insp-h{margin-bottom:10px}
.imp-bar{position:absolute;left:50%;top:14px;transform:translateX(-50%);min-width:260px;padding:10px 14px;border-radius:14px;background:var(--bg2);box-shadow:var(--sh2);z-index:60;font-size:12.5px;color:var(--fg2);transition:opacity .4s}
.imp-bar i{display:block;height:4px;border-radius:2px;background:var(--line);margin-top:7px;overflow:hidden} .imp-bar b{display:block;height:100%;width:0;background:var(--accent);transition:width .25s var(--ease)} .imp-bar.done{opacity:0}
.sbx{flex:none;width:10px;height:10px;border-radius:3px;border:1.5px solid var(--fg3);margin-left:auto} .sbx.full{background:var(--accent);border-color:var(--accent)}
.tn.virt .nm{color:var(--fg3);font-style:italic}
/* inspector text boxes grow downwards only, inside the panel (bug report: they could be dragged as wide as you liked) */
#m-board textarea{resize:vertical;max-width:100%;min-height:44px;max-height:320px}
/* strip add buttons: the hover label floats above everything instead of being clipped by the strip (it looked off) */
.strip-adds .thumb.add[data-tip]:hover::after{display:none}
.fixtip{position:fixed;z-index:200;background:#202124;color:#fff;font-size:11.5px;padding:5px 9px;border-radius:7px;pointer-events:none;white-space:nowrap;animation:fadeIn .12s;transform:translate(-50%,-100%)}

/* ---- board ↔ script text links (links.js) ---- */
.lk-layer{position:absolute;inset:0;pointer-events:none;z-index:1}
/* a linked passage (links.js): just a soft green highlight, no outline; --link is the one place to change the colour */
.lk-box{--lk:var(--link);position:absolute;border-radius:5px;background:color-mix(in srgb,var(--lk) 18%,transparent);animation:fadeIn .25s}
.lk-pop{position:fixed;z-index:120;width:200px;padding:6px;border-radius:12px;background:var(--bg2);box-shadow:var(--sh2);cursor:pointer;animation:pop .18s var(--ease) both}
.lk-pop img{display:block;width:100%;border-radius:7px;background:#fff;aspect-ratio:16/9;object-fit:contain} .lk-pop.blank img{display:none}
.lk-pop span{display:block;font-size:11px;color:var(--link);margin:5px 2px 0;font-weight:600}
#selpop .bd{color:var(--link)} #selpop .bd span{display:inline-flex;vertical-align:middle;margin-right:3px}
.lk-tb{margin-bottom:10px;padding:8px;border-radius:12px;transition:background .3s,box-shadow .3s}
.lk-tb .lk-h{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--fg2);margin-bottom:5px} .lk-tb .lk-h .grow{flex:1} .lk-tb .lk-h button{font-size:11px;padding:3px 8px}
.lk-tb textarea{width:100%;font-family:'Courier Prime',Courier,monospace;font-size:12.5px}
.lk-tb.linked{background:color-mix(in srgb,var(--link) 6%,transparent)} .lk-tb.linked textarea{border-color:color-mix(in srgb,var(--link) 35%,transparent)}
.lk-tb.empty textarea{border:1.5px dashed color-mix(in srgb,var(--link) 45%,transparent);background:transparent}
.lk-tb .lk-note{font-size:11px;color:var(--fg3);margin-top:4px}
.lk-tb.pulse{animation:lkPulse .7s var(--ease)} @keyframes lkPulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--link) 45%,transparent)}100%{box-shadow:0 0 0 10px transparent}}
.thumb.lk-on{transform:translateY(-2px)} .thumb.lk-on img{outline:2.5px solid var(--shot,var(--link));outline-offset:2px} /* hovering its words in the sidebar: a rounded ring in its shot colour */
.thumb img{transition:border-color .15s,outline-color .15s}

/* Write split view: drop zones while a sidebar file is being dragged (split.js initDrop), and previews */
.sp-zones{position:absolute;inset:10px;z-index:30;display:none;gap:10px;pointer-events:auto}
.sp-zones.on{display:flex;animation:fadeIn .15s}
.sp-zone{flex:1;border-radius:16px;border:2px dashed color-mix(in srgb,var(--accent) 45%,transparent);background:color-mix(in srgb,var(--bg) 70%,transparent);backdrop-filter:blur(2px);display:grid;place-items:center;color:var(--accent);font-weight:600;transition:background .15s,border-color .15s,transform .15s var(--ease)}
.sp-zone>div{display:flex;flex-direction:column;align-items:center;gap:8px;background:var(--bg2);padding:14px 20px;border-radius:14px;box-shadow:var(--sh2);pointer-events:none} .sp-zone span{display:flex}
.sp-zone.over{background:color-mix(in srgb,var(--accent) 12%,var(--bg));border-color:var(--accent);transform:scale(1.01)}
.sp-zones.no-here .here{display:none}
.sp-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;padding:12px}
.sp-bp{cursor:pointer;border-radius:10px;overflow:hidden;background:var(--bg2);box-shadow:var(--sh1);transition:transform .15s var(--ease)} .sp-bp:hover{transform:translateY(-2px)}
.sp-bp img{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;background:#fff} .sp-bp.blank img{visibility:hidden}
.sp-bp span{display:block;font-size:11px;color:var(--fg2);padding:5px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-mood{columns:2 160px;column-gap:10px;padding:12px} .sp-mood .mi{break-inside:avoid;margin-bottom:10px;border-radius:10px;overflow:hidden}
.sp-mood .mi img{display:block;width:100%} .sp-mood .note{padding:10px 12px;font-size:12.5px;white-space:pre-wrap;background:#fff59d;color:#202124} .sp-mood .note.lab{background:none;font-weight:700;font-size:15px;padding:4px 2px}
.sp-mood .sw{height:60px;display:flex;align-items:flex-end;padding:6px} .sp-mood .sw span{font-size:10px;background:rgba(255,255,255,.8);padding:1px 5px;border-radius:4px}
.sp-mdesc{margin:12px 14px 0;font-size:13px;color:var(--fg2);line-height:1.5}

/* My Gear: shown when the open project has its own list (gear.js projectGearPath) */
.gear-own{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:8px 12px;border-radius:10px;background:var(--tint);color:var(--tintfg);font-size:12.5px} .gear-own span{display:flex}
.lk-pickbar{position:absolute;left:50%;top:14px;transform:translateX(-50%);display:flex;align-items:center;gap:10px;padding:7px 8px 7px 14px;border-radius:999px;background:var(--bg2);box-shadow:var(--sh2);z-index:60;font-size:12.5px;color:var(--link-ink);animation:pop .2s var(--ease) both} .lk-pickbar span{display:flex}
#selpop .cue span{display:inline-flex;vertical-align:middle;margin-right:3px}

/* Projects: an older example offers the new one (projects.js exOld) */
.pj-newex{margin-top:6px;border:0;border-radius:999px;padding:4px 10px;font-size:11.5px;font-weight:600;background:var(--tint);color:var(--tintfg);cursor:pointer} .pj-newex:hover{filter:brightness(.97)}

/* the linked passages' underlines and the selected panel's wash are coloured per shot in <style id="lk-colours">
   (links.js paintLinkSide); here: a pointer over clickable linked words */
.lk-hot, .lk-hot *{cursor:pointer}

/* Board menu from the selection bar (links.js boardMenu): a new panel, or link to one already on the storyboard */
.lk-menu{position:fixed;z-index:46;width:340px;max-height:min(420px,70vh);display:flex;flex-direction:column;padding:6px;border-radius:14px;background:var(--bg2);box-shadow:var(--sh2);animation:pop .15s var(--ease) both}
.lk-new{display:flex;align-items:center;gap:7px;border:0;box-shadow:none;background:color-mix(in srgb,var(--link) 10%,transparent);color:var(--link-ink);font-weight:600;font-size:12.5px;padding:9px 12px;border-radius:9px;cursor:pointer;text-align:left}
.lk-new:hover{background:color-mix(in srgb,var(--link) 18%,transparent)} .lk-new span{display:flex}
.lk-mh{font-size:11px;color:var(--fg3);margin:10px 6px 6px}
.lk-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;overflow-y:auto;padding:2px}
.lk-tile{display:flex;flex-direction:column;gap:3px;border:0;box-shadow:none;background:none;padding:3px;border-radius:8px;cursor:pointer;text-align:left}
.lk-tile:hover{background:var(--bg3)} .lk-tile img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:5px;background:#fff;box-shadow:0 0 0 1px var(--line)}
.lk-tile:hover img{box-shadow:0 0 0 2px var(--link)}
.lk-tile span{font-size:10.5px;color:var(--fg2);display:flex;gap:4px;align-items:center;white-space:nowrap;overflow:hidden}
.lk-tile i{font-style:normal;font-size:9.5px;color:var(--link-ink);background:var(--link-bg);padding:0 5px;border-radius:6px}

/* link ends you can drag to resize the linked words (links.js showLinkHandles / sideHandles): a thin bar in the shot
   colour with a dot, at the start (dot on top) and the end (dot below) */
.ss-body{position:relative}
.lk-hds{position:absolute;inset:0;pointer-events:none;z-index:2}
.lk-hd{--lk:var(--link);position:absolute;width:12px;margin-left:-6px;pointer-events:auto;cursor:col-resize;z-index:3;touch-action:none}
.lk-hd::before{content:'';position:absolute;left:5px;top:0;bottom:0;width:2px;border-radius:1px;background:var(--lk)}
.lk-hd::after{content:'';position:absolute;left:2px;width:8px;height:8px;border-radius:50%;background:var(--lk);box-shadow:0 0 0 2px var(--bg2)}
.lk-hd.a::after{top:-6px} .lk-hd.b::after{bottom:-6px}
.lk-hd:hover::after{transform:scale(1.25)}
/* Pick text previews and committed links share the shot colour. Preview handles become draggable on mouse-up. */
.bd-script .ss-body::selection,.bd-script .ss-body *::selection{background:color-mix(in srgb,var(--pick-col,var(--link)) 30%,transparent);color:inherit}
.ss-body .lk-hd::after{left:1px;width:10px;height:10px}
.ss-body .lk-pick-preview{pointer-events:none}
body.lk-dragging, body.lk-dragging *{cursor:col-resize !important;user-select:none}
.lk-pa{display:flex;align-items:center;gap:6px;margin:5px 2px 0} .lk-pa span{margin:0 !important;flex:1}
.lk-un{border:0;box-shadow:none;background:var(--bg3);color:var(--fg2);font-size:11px;font-weight:600;padding:3px 9px;border-radius:999px;cursor:pointer} .lk-un:hover{background:var(--bg4);color:var(--fg)}

/* "Reset example" beside the Beta tag, only while the example project is open (app.js openProject, projects.js resetExample) */
#ex-reset{-webkit-app-region:no-drag;margin-right:auto;border:0;box-shadow:none;background:var(--bg3);color:var(--fg2);font-size:11.5px;font-weight:600;padding:4px 11px;border-radius:999px;cursor:pointer}
#ex-reset:hover{background:var(--bg4);color:var(--fg)}
#titlebar:has(#ex-reset:not(.hidden)) .beta-tag{margin-right:0}

/* strip: the shot tag is a dropdown (board.js shotTag) — looks like the tag with a small chevron; an invisible native
   select over it gives the list */
.sg-pick{position:relative;display:flex;align-items:center;gap:4px;cursor:pointer}
.sg-pick .sg-lab{flex:1;overflow:hidden;text-overflow:ellipsis}
.sg-pick .sg-chev{display:flex;opacity:.75;transform:rotate(90deg)}
.sg-pick:hover{filter:brightness(1.06)} .sg-pick:hover .sg-chev{opacity:1}
.sg-sel{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;padding:0;margin:0;-webkit-appearance:none;appearance:none}

/* several panels on the same words (links.js): the Write preview shows each panel's picture; panels in the strip that
   share their words carry a small chain badge with how many share them */
.lk-pts{display:flex;gap:5px}
.lk-pt{position:relative;flex:1;min-width:0;cursor:pointer;border-radius:7px}
.lk-pt img{display:block;width:100%;border-radius:7px;background:#fff;aspect-ratio:16/9;object-fit:cover}
.lk-pt.blank img{visibility:hidden}
.lk-pt:hover img{outline:2px solid var(--accent);outline-offset:1px}
.lk-pt b{position:absolute;left:4px;top:4px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:rgba(0,0,0,.6);color:#fff;font:700 9.5px/16px -apple-system,system-ui;text-align:center}
.lk-pop.many{width:auto;max-width:440px} .lk-pop.many .lk-pt{width:130px;flex:none}
.lk-share{position:absolute;left:6px;top:6px;display:flex;align-items:center;gap:2px;height:18px;padding:0 6px 0 5px;border-radius:9px;background:var(--lk,var(--link));color:#fff;font:700 10px/1 -apple-system,system-ui;box-shadow:0 0 0 2px var(--bg2);cursor:default}
.lk-share i{font-style:normal} .lk-share svg{display:block}

/* storyboard inspector: the shot as a wide coloured dropdown, and Pick lines / Pick text side by side (board.js shotBox) */
.shot-pick{position:relative;flex:1;min-width:0;display:flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;background:var(--shot);color:#fff;font:700 11.5px -apple-system,system-ui;letter-spacing:.03em;cursor:pointer}
.shot-pick:hover{filter:brightness(1.06)}
.shot-pick .sp-lab{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shot-pick .sp-chev{display:flex;transform:rotate(90deg);opacity:.85}
.shot-pick .sp-sel{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;padding:0;margin:0}
.sp-picks{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
.sp-picks button{display:flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 10px;font-size:12.5px;white-space:nowrap}
.sp-picks button span{overflow:hidden;text-overflow:ellipsis}
.lk-pickbar{white-space:nowrap} /* the pick prompt stays on one line */

/* between two panels in the strip (board.js insertBtns): an invisible strip of the gap that, on hover, shows a small
   vertical pill with + / camera / files to start a panel right there */
.thumb .ins{position:absolute;top:0;right:-15px;width:22px;height:80px;z-index:4;display:flex;align-items:center;justify-content:center}
.thumb .ins-pill{display:flex;flex-direction:column;gap:2px;padding:3px;border-radius:999px;background:var(--bg2);box-shadow:var(--sh2);opacity:0;transform:scale(.85);pointer-events:none;transition:opacity .12s var(--ease),transform .12s var(--ease)}
.thumb .ins:hover .ins-pill{opacity:1;transform:none;pointer-events:auto}
.thumb .ins::before{content:'';position:absolute;top:6px;bottom:6px;left:50%;width:2px;margin-left:-1px;border-radius:1px;background:var(--accent);opacity:0;transition:opacity .12s}
.thumb .ins:hover::before{opacity:.5}
.thumb .ins button{width:24px;height:24px;padding:0;border:0;box-shadow:none;border-radius:50%;display:grid;place-items:center;background:transparent;color:var(--fg2);position:relative;z-index:1}
.thumb .ins button:hover{background:var(--tint);color:var(--accent)}
.thumb .ins-pill{position:relative;z-index:1} /* above the guide line */

/* strip reordering (boardplus.js stripDrag): the copy under the pointer, the panels being moved, and the drop line */
.drag-ghost{position:fixed;left:0;top:0;z-index:300;pointer-events:none;width:110px;border-radius:9px;box-shadow:0 10px 30px rgba(0,0,0,.28);opacity:.92}
.drag-ghost img{display:block;width:100%;border-radius:9px;background:#fff;aspect-ratio:16/9;object-fit:cover}
.drag-ghost b{position:absolute;right:-7px;top:-7px;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--accent);color:#fff;font:700 11px/20px -apple-system,system-ui;text-align:center;box-shadow:0 0 0 2px var(--bg2)}
.thumb.drag-src{opacity:.3;transform:scale(.96)}
.drop-line{position:fixed;z-index:299;width:4px;border-radius:2px;pointer-events:none;box-shadow:0 0 0 2px var(--bg2);transition:left .08s var(--ease),top .08s var(--ease)}
body.strip-dragging, body.strip-dragging *{cursor:grabbing !important;user-select:none}
body.strip-dragging .thumb .ins{display:none}
.thumb img{-webkit-user-drag:none}

/* the in-between buttons: tiny, and only there while the pointer is in the gap */
.thumb .ins{right:-12px;width:16px}
.thumb .ins-pill{gap:1px;padding:2px}
.thumb .ins button{width:18px;height:18px}
.thumb .ins button svg{width:11px;height:11px}
.merge-prev svg{transform:rotate(-90deg)} /* the merge arrow points left: into the previous frame */

/* the in-between buttons sit in the middle of the gap (--half / --base from boardplus.js centreInserts). Hovering the
   gap slides the two panels apart a little so the buttons have room, even between two panels of the same shot. */
.thumb{transition:transform .15s var(--ease),box-shadow .15s var(--ease),margin .16s var(--ease)}
.thumb .ins{left:auto;right:calc(-1 * var(--half, 4px) - var(--base, 0px) - 8px)}
/* hovering a gap: the two panels slide apart with transforms only, so nothing is re-laid out — the shot's coloured tag
   above keeps its size — and the hover zone itself is held still (counter-moved), so the pointer never falls out of it
   mid-slide (that was the flicker). The zone is also wider than the gap, to be forgiving. */
.thumb .ins{width:26px;right:calc(-1 * var(--half, 4px) - var(--base, 0px) - 13px)}
.thumb:has(> .ins:hover){z-index:6} /* above the next panel */
.shotgrp:has(.ins:hover){position:relative;z-index:6}
/* hovering a gap: EVERYTHING after it slides right together (board.js gapShift adds .gap-shift), rather than the two
   neighbours parting (user request). The panel the zone belongs to stays put, so the pointer never falls out of it. */
.bd-strip .shotgrp,.bd-strip .scene-run,.bd-strip .scene-break,.bd-strip .strip-adds{transition:transform .16s var(--ease)}
.bd-strip .gap-shift{transform:translateX(22px)}
.thumb .ins:hover .ins-pill{transform:translateX(var(--dx,11px))}
.thumb .ins:hover::before{transform:translateX(var(--dx,11px))}
#selpop .s.cm{color:#b98500} #selpop .s.cm span{color:#f9ab00} #selpop .s.cm:hover{background:rgba(251,188,4,.16)} /* Comment in the comment yellow (icon in the highlight yellow, text a shade darker so it reads on white) */
#selpop .s.cue{color:#7e4fc4} #selpop .s.cue span{color:#9b6bdf} #selpop .s.cue:hover{background:rgba(147,52,230,.10)} /* Cue in purple (user request) */

/* storyboard strip: a black line where the scene changes, the scene title in black under it (board.js renderStrip) */
.scene-break{flex:none;position:relative;width:2px;margin:0 4px;border-radius:1px;background:#111;align-self:stretch}
.scene-break span{position:absolute;left:0;top:calc(100% + 4px);white-space:nowrap;font:700 10.5px/1 -apple-system,system-ui;letter-spacing:.03em;color:#111;max-width:320px;overflow:hidden;text-overflow:ellipsis}
.bd-strip.has-scenes{padding-bottom:22px}
.scene-break .sb-tr{top:calc(100% + 18px);font-weight:600;font-size:9.5px;letter-spacing:.06em} /* the transition into the scene, under its title */
.bd-strip.has-scenes{padding-bottom:36px}

/* timeline scenes (board.js renderTimeline): a grey bar per scene under the ruler, the transition as a small dark tag at
   its front, and a thin dark line down the timeline where each scene starts */
.tl-lane.scenes{height:22px;margin-top:6px}
.tl-scene{position:absolute;top:0;height:20px;display:flex;align-items:center;gap:6px;padding:0 8px 0 4px;border-radius:6px;background:var(--bg4);color:#111;font:700 9.5px -apple-system,system-ui;letter-spacing:.04em;white-space:nowrap;overflow:hidden}
.tl-scene span{overflow:hidden;text-overflow:ellipsis}
.tl-scene b{flex:none;padding:2px 6px;border-radius:4px;background:#111;color:#fff;font-size:8.5px;letter-spacing:.06em}
.tl-scene-line{position:absolute;top:24px;bottom:0;width:2px;background:#111;opacity:.55;pointer-events:none;z-index:2}
.tline{height:370px}

/* timeline: the scene title and shot label stick to the left edge of the view while you scroll through a long scene or
   shot (user request), and ride off with the bar once it ends. overflow:clip (not hidden) on the bars so the sticky label
   sticks to the timeline's scroller, not to the bar itself (board.js renderTimeline, .tl-stick). */
.tl-shot,.tl-scene{overflow:clip}
.tl-stick{position:sticky;left:6px;display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tl-shot .tl-stick{display:inline-block;vertical-align:top} /* shrink to the text, so it has room to slide along the bar */

/* storyboard strip (blocks view): each scene's shot groups sit in one run with the scene title under them, and both the
   title and each "SHOT 1A" label stick to the strip's left edge while you scroll through (user request; board.js
   renderStrip / shotTag). They ride off with their scene or shot once it ends. */
.scene-run{flex:none;display:flex;flex-direction:column;gap:6px}
.sr-groups{display:flex;gap:10px;flex:1}
.sr-title{position:sticky;left:4px;width:max-content;max-width:100%;height:24px;flex:none;display:flex;flex-direction:column;gap:3px;white-space:nowrap} /* fixed height: titles line up whether or not a transition sits under them */
.sr-title span{font:700 10.5px/1 -apple-system,system-ui;letter-spacing:.03em;color:#111;overflow:hidden;text-overflow:ellipsis}
.sr-title .sb-tr{font-weight:600;font-size:9.5px;letter-spacing:.06em}
.bd-strip.has-scenes{padding-bottom:12px}
.sg-h{overflow:clip}
.sg-stick{position:sticky;left:4px;display:inline-flex;align-items:center;gap:4px;max-width:100%;min-width:0}
.sg-pick .sg-lab{flex:0 1 auto}

/* next scene chip (boardplus.js nextScene): pinned at the right edge of the scene title row in Blocks and of the scene
   lane in the timeline, naming the scene after the one you're in. Left-hand sticky titles are capped at about half the
   width (--stick-max, set from the scroller's width) and the chip at about 40%, so the two can never meet. */
.next-scene{position:absolute;z-index:8;display:none;align-items:center;gap:6px;height:22px;padding:0 6px 0 4px;border:0;border-radius:6px;background:var(--bg4);color:#111;font:700 9.5px -apple-system,system-ui;letter-spacing:.04em;white-space:nowrap;cursor:pointer;box-shadow:-10px 0 10px -4px var(--bg2)}
.next-scene.on{display:flex}
.next-scene:hover{filter:brightness(.96)}
.next-scene .ns-k{flex:none;padding:2px 6px;border-radius:4px;background:#111;color:#fff;font-size:8.5px;letter-spacing:.06em}
.next-scene .ns-t{min-width:0;overflow:hidden;text-overflow:ellipsis}
.next-scene .ns-ic{flex:none;display:flex;opacity:.7}
.sr-title{max-width:min(100%,var(--stick-max,100%))}
.tl-scene .tl-stick{max-width:min(100%,var(--stick-max,100%))}
/* the app's default button tint was turning the chip blue: match the scene titles it sits beside instead. Timeline:
   the grey scene-bar look; Blocks: plain black text on the strip, like the title at the left. */
button.next-scene.next-scene{background:var(--bg4);color:#111}
button.next-scene.next-scene[data-kind="strip"]{background:var(--bg2);font-size:10.5px;letter-spacing:.03em;padding-right:2px}
button.next-scene.next-scene:hover{background:var(--bg3, var(--bg4));color:#111}

/* storyboard script sidebar: shots as coloured bars down the left margin, like Write (board.js paintShotBars). The old
   grey line boxes and grey tags are gone; the current shot's lines get a light wash of its colour. */
.ss-l.other{background:none}
.ss-l.multi{background-image:none}
.ss-l.cur{background:color-mix(in srgb,var(--shot) 14%,transparent)}
.ss-bars{position:absolute;left:0;top:0;width:0;height:0;z-index:3}
.ss-bar{position:absolute;width:6px;border-radius:4px;background:var(--shot);opacity:.8;cursor:pointer;transition:opacity .15s,width .15s,margin .15s}
.ss-bar:hover,.ss-bar.cur,.ss-bar.drag{opacity:1;width:8px;margin-left:-1px}
.ss-pill{position:absolute;left:50%;top:-4px;transform:translateX(-50%);font:600 9.5px/1 -apple-system,system-ui;color:#fff;background:var(--shot);padding:3px 5px;border-radius:999px;white-space:nowrap;box-shadow:var(--sh1);pointer-events:none}
.ss-bar.cur .ss-pill{outline:2px solid color-mix(in srgb,var(--shot) 35%,transparent)}
.ss-end{position:absolute;left:-6px;right:-6px;height:10px;cursor:ns-resize}
.ss-end.top{top:-2px} .ss-end.bot{bottom:-5px}
.ss-bar:hover .ss-end.bot::after,.ss-bar.cur .ss-end.bot::after{content:"";position:absolute;left:3px;right:3px;bottom:3px;height:3px;border-radius:2px;background:#fff;opacity:.9}

/* placing scene cuts by hand (boardplus.js dividerDown / sceneMenu / cutSceneAt) */
.scene-break{cursor:ew-resize;transition:width .12s,background .12s}
.scene-break::before{content:'';position:absolute;top:0;bottom:0;left:-7px;right:-7px} /* a wider grab zone than the 2px line */
.scene-break:not(:first-child):hover,.scene-break.drag{width:4px;margin:0 3px;background:#111}
.scene-break:first-child{cursor:default}
.scene-break:not(:first-child):hover::after{content:'';position:absolute;top:50%;left:50%;width:10px;height:22px;transform:translate(-50%,-50%);border-radius:5px;background:#111;box-shadow:0 0 0 2px var(--bg2)}
.sr-title{cursor:pointer;border-radius:4px}
.sr-title:hover span:first-child{text-decoration:underline;text-underline-offset:2px}
.tl-scene{cursor:pointer} .tl-scene:hover{filter:brightness(.97)}
body.cutting, body.cutting *{cursor:ew-resize!important;user-select:none}
.cut-ghost{position:fixed;z-index:60;width:3px;border-radius:2px;background:#111;pointer-events:none;box-shadow:0 0 0 2px var(--bg2)}
.cut-ghost span{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);white-space:nowrap;background:#111;color:#fff;font:600 10.5px -apple-system,system-ui;padding:4px 8px;border-radius:6px;box-shadow:var(--sh2)}
.thumb .ins-sep{display:block;height:1px;width:12px;margin:2px auto;background:var(--line)}
.thumb .ins button.ins-cut{color:#111}
.thumb .ins button.ins-cut:hover{background:#111;color:#fff}
/* drawing toolbar folded into columns (or rows, in timeline mode) when it's longer than the canvas (boardplus.js fitRail) */
.bd-rail.cols2,.bd-rail.cols3{display:grid;grid-template-columns:repeat(2,34px);align-content:start}
.bd-rail.cols3{grid-template-columns:repeat(3,34px)}
.bd-rail.cols4{display:grid;grid-template-columns:repeat(4,34px);align-content:start}
.bd-rail.cols2 .rsep,.bd-rail.cols3 .rsep,.bd-rail.cols4 .rsep{display:none} /* folded: no separators, as compact as it gets */
.bd-rail.rows2,.bd-rail.rows3{display:grid;grid-template-rows:repeat(2,34px);grid-auto-flow:column}
.bd-rail.rows3{grid-template-rows:repeat(3,34px)}
.bd-rail.rows2 .rsep,.bd-rail.rows3 .rsep{grid-row:1/-1;width:1px;height:auto;margin:6px 4px}
/* the pick pin on the right of the script sidebar while picking a panel's lines (boardplus.js paintPickPin) */
.ss-body.picking-lines{padding-right:40px!important}
.ss-pin{position:absolute;width:8px;border-radius:5px;background:var(--shot);cursor:grab;z-index:4;box-shadow:0 0 0 3px color-mix(in srgb,var(--shot) 22%,transparent)}
.ss-pin.drag,body.pinning,body.pinning *{cursor:grabbing!important;user-select:none}
.ss-pin .ss-end{left:-8px;right:-8px;height:12px;cursor:ns-resize}
.ss-pin .ss-end.top{top:-4px} .ss-pin .ss-end.bot{bottom:-6px}
.ss-pin .ss-end.bot::after{content:"";position:absolute;left:4px;right:4px;bottom:4px;height:3px;border-radius:2px;background:#fff}
.ss-l.pk{background:color-mix(in srgb,var(--accent) 12%,transparent)!important}
button.next-scene.next-scene[data-kind="tl"]{box-shadow:-12px 0 8px -2px var(--bg4)} /* fades into the grey scene bar it sits on */

/* the "auto-format this pasted script?" card (script.js offerFormat) */
#fmt-offer{position:fixed;left:50%;bottom:140px;z-index:90;width:min(520px,calc(100vw - 32px));display:flex;gap:12px;align-items:flex-start;padding:14px 14px 14px 16px;border-radius:16px;background:var(--bg2);box-shadow:0 8px 28px rgba(0,0,0,.18),0 1px 3px rgba(0,0,0,.12);transform:translate(-50%,12px);opacity:0;transition:opacity .18s var(--ease),transform .18s var(--ease)}
#fmt-offer.show{opacity:1;transform:translate(-50%,0)}
#fmt-offer .fo-ic{flex:none;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--tint);color:var(--accent)}
#fmt-offer .fo-tx{flex:1;display:flex;flex-direction:column;gap:4px;font-size:12.5px;line-height:1.45;color:var(--fg2)}
#fmt-offer .fo-tx b{font-size:13.5px;color:var(--fg)}
#fmt-offer .fo-act{flex:none;display:flex;flex-direction:column;gap:6px;align-self:center}
#fmt-offer .fo-act button{white-space:nowrap}

/* "pick text now" hint at the top of the storyboard's script sidebar (boardplus.js pickHint): three grey "lines of
   text"; across the middle one a highlight sweeps in behind an I-beam cursor, holds, and fades, on a loop */
.ss-hint{display:flex;align-items:center;gap:12px;margin:8px 12px 4px;padding:10px 12px;border-radius:12px;background:var(--tint);animation:sh-in .25s var(--ease)}
@keyframes sh-in{from{opacity:0;transform:translateY(-6px)}}
.sh-demo{flex:none;width:62px;display:flex;flex-direction:column;gap:5px;padding:7px 6px;border-radius:7px;background:var(--bg2);box-shadow:var(--sh1)}
.sh-demo i{display:block;height:4px;border-radius:2px;background:var(--line);position:relative}
.sh-demo i.short{width:60%}
.sh-demo i.mid b{position:absolute;left:-2px;top:-3px;bottom:-3px;width:0;border-radius:3px;background:color-mix(in srgb,var(--accent) 45%,transparent);animation:sh-sweep 2.6s var(--ease) infinite}
.sh-demo i.mid u{position:absolute;left:-2px;top:-6px;width:2px;height:16px;border-radius:1px;background:var(--fg);animation:sh-caret 2.6s var(--ease) infinite}
.sh-demo i.mid u::before,.sh-demo i.mid u::after{content:'';position:absolute;left:-2px;width:6px;height:2px;background:var(--fg);border-radius:1px}
.sh-demo i.mid u::before{top:0} .sh-demo i.mid u::after{bottom:0}
@keyframes sh-sweep{0%,12%{width:0;opacity:1}55%,80%{width:calc(100% + 4px);opacity:1}95%,100%{width:calc(100% + 4px);opacity:0}}
@keyframes sh-caret{0%,12%{left:-2px;opacity:1}55%,80%{left:calc(100% + 1px);opacity:1}95%,100%{left:calc(100% + 1px);opacity:0}}
.sh-tx{display:flex;flex-direction:column;gap:2px;font-size:11.5px;line-height:1.35;color:var(--fg2)}
.sh-tx b{font-size:12.5px;color:var(--tintfg, var(--accent))}
.ss-body.sh-glow{animation:sh-glow 1.4s var(--ease) 2}
@keyframes sh-glow{0%,100%{box-shadow:inset 0 0 0 0 transparent}40%{box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--accent) 45%,transparent)}}
@media (prefers-reduced-motion: reduce){.sh-demo i.mid b{animation:none;width:calc(100% + 4px)} .sh-demo i.mid u{animation:none;left:calc(100% + 1px)} .ss-body.sh-glow{animation:none}}

/* Pick lines, no banner (user request): the pin explains itself (boardplus.js paintPickPin). A dark callout beside it
   pointing at it, with a little up/down nudge, and the pin's ends pulse, until it's first dragged. */
.ss-pick{display:none!important} /* the old blue "Drag the pin…" banner */
.pin-tip{position:absolute;z-index:5;display:flex;align-items:center;gap:7px;padding:6px 10px 6px 8px;border-radius:9px;background:#202124;color:#fff;font:500 11px/1.25 -apple-system,system-ui;white-space:nowrap;box-shadow:var(--sh2);pointer-events:none;animation:pt-in .3s var(--ease)}
.pin-tip b{font-weight:700}
.pin-tip i{position:absolute;right:10px;bottom:-5px;width:10px;height:10px;background:#202124;transform:rotate(45deg);border-radius:2px}
.pin-tip .pt-ic{display:flex;flex-direction:column;line-height:0;animation:pt-nudge 1.6s ease-in-out infinite}
.pin-tip .pt-ic svg:last-child{transform:rotate(180deg);margin-top:-3px}
@keyframes pt-in{from{opacity:0;transform:translateY(-6px)}}
@keyframes pt-nudge{0%,100%{transform:translateY(-2px)}50%{transform:translateY(2px)}}
.ss-pin:not(.taught){animation:pin-pulse 1.6s ease-in-out infinite}
@keyframes pin-pulse{0%,100%{box-shadow:0 0 0 3px color-mix(in srgb,var(--shot) 22%,transparent)}50%{box-shadow:0 0 0 7px color-mix(in srgb,var(--shot) 14%,transparent)}}
@media (prefers-reduced-motion: reduce){.pin-tip .pt-ic,.ss-pin:not(.taught){animation:none}}

/* shot box pick buttons (board.js shotBox): pressed once used, and the linked words as a quote wrapped into the
   pressed Pick text button like a tab (user request; replaces the old Script box) */
.sp-picks button.on{background:var(--tint);color:var(--tintfg);box-shadow:inset 0 1px 2px rgba(0,0,0,.08);border-color:transparent}
.sp-picks button.on:hover{filter:brightness(.98)}
.sp-picks.has-quote{row-gap:0}
.sp-picks.has-quote > button.on:nth-child(2){border-bottom-left-radius:0;border-bottom-right-radius:0;height:38px;padding-bottom:6px;box-shadow:none}
.sp-quote{grid-column:1/-1;position:relative;display:flex;gap:6px;align-items:flex-start;padding:9px 10px 10px 12px;border-radius:12px 0 12px 12px;background:var(--tint);cursor:pointer}
.sp-quote q{flex:1;font:italic 400 11.5px/1.45 -apple-system,system-ui;color:var(--fg2);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.sp-quote q::before{content:'“';color:var(--fg3)} .sp-quote q::after{content:'”';color:var(--fg3)}
.sp-quote .sp-unlink{flex:none;width:18px;height:18px;padding:0;border:0;border-radius:50%;display:grid;place-items:center;background:transparent;color:var(--fg3);box-shadow:none;opacity:0;transition:opacity .12s}
.sp-quote:hover .sp-unlink{opacity:1} .sp-quote .sp-unlink:hover{background:var(--bg2);color:var(--fg)}
.sp-picks .sp-quote .sp-unlink{height:18px;min-height:0;width:18px;min-width:0;padding:0} /* not the 32px of the pick buttons */
.shots .shot span.muted,.shot span.muted{color:var(--fg3);font-style:italic} /* no description yet (light.js renderShots) */
/* the Pick text tab and its quote use the same 16px corners as the Pick lines pill (user request), and the inside
   corner where the tab meets the quote is curved too, so tab + quote read as one smooth shape */
.sp-picks.has-quote > button.on:nth-child(2){position:relative;border-radius:16px 16px 0 0!important}
.sp-picks.has-quote > button.on:nth-child(2)::before{content:'';position:absolute;left:-8px;bottom:0;width:8px;height:8px;background:radial-gradient(circle at 0 0,transparent 8px,var(--tint) 8.5px);pointer-events:none}
.sp-picks .sp-quote{border-radius:16px 0 16px 16px}
/* same pressed shadow as Pick lines (an inset shadow along the top edge) on the tab and on the quote; the tab sits 2px
   over the quote's top so the quote's own top shadow doesn't show as a seam under it */
.sp-picks.has-quote > button.on:nth-child(2){box-shadow:inset 0 1px 2px rgba(0,0,0,.08)!important;z-index:1;margin-bottom:-2px}
.sp-picks .sp-quote{box-shadow:inset 0 1px 2px rgba(0,0,0,.08)}
.sp-picks .sp-quote::after{content:"";position:absolute;top:0;right:0;width:calc(50% - 3px);height:5px;background:var(--tint);pointer-events:none} /* hide the quote's top shadow under the tab: no seam */

/* the panel's linked words under it in the strip, and the full passage on hover (boardplus.js wordsLine) */
.thumb .t-words{margin-top:3px;max-width:100%;font:italic 400 10.5px/1.35 -apple-system,system-ui;color:var(--fg3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}
.thumb .t-words:hover{color:var(--fg2)}
#words-pop{position:fixed;z-index:95;max-width:320px;padding:10px 12px;border-radius:12px;background:var(--bg2);box-shadow:0 8px 24px rgba(0,0,0,.16),0 1px 3px rgba(0,0,0,.1);font:italic 400 12px/1.5 -apple-system,system-ui;color:var(--fg2);white-space:pre-wrap;pointer-events:none;opacity:0;transform:translateY(4px);transition:opacity .12s,transform .12s}
#words-pop.show{opacity:1;transform:none}
#words-pop q::before{content:'“';color:var(--fg3)} #words-pop q::after{content:'”';color:var(--fg3)}

/* pressed Pick text tab: on hover, the same grey pill as the button has when it isn't pressed (user request) */
.sp-picks.has-quote > button.on:nth-child(2)::after{content:'';position:absolute;left:0;right:0;top:0;height:32px;border-radius:16px;background:rgba(0,0,0,.06);opacity:0;transition:opacity .12s;pointer-events:none}
.sp-picks.has-quote > button.on:nth-child(2):hover::after{opacity:1}
.sp-picks.has-quote > button.on:nth-child(2):hover{filter:none}
/* the tab's inside corner lines up with the quote's top edge (the tab overlaps the quote by 2px), and the quote's top
   shadow stops where that curve starts, so the join is smooth instead of stepped */
.sp-picks.has-quote > button.on:nth-child(2)::before{bottom:2px}
.sp-picks .sp-quote::after{width:calc(50% + 5px)}
/* top-edge-only inner shadows (no faint side lines running down into the quote), and the words line under a panel
   never widens the panel */
.sp-picks.has-quote > button.on:nth-child(2){box-shadow:inset 0 2px 2px -2px rgba(0,0,0,.14)!important;border:0}
.sp-picks .sp-quote{box-shadow:inset 0 2px 2px -2px rgba(0,0,0,.14)}
.sp-picks > button.on:first-child{box-shadow:inset 0 2px 2px -2px rgba(0,0,0,.14)}
.thumb .t-words{width:0;min-width:100%}
/* Blocks: the next-scene label matches the scene titles (.sr-title): bold title, transition in small plain text under */
button.next-scene.next-scene[data-kind="strip"]{height:auto;align-items:flex-start;padding:0 0 0 8px}
.next-scene .ns-col{display:flex;flex-direction:column;gap:3px;min-width:0;align-items:flex-start}
.next-scene .ns-col .ns-t{font:700 10.5px/1 -apple-system,system-ui;letter-spacing:.03em;color:#111;max-width:100%}
.next-scene .ns-col .ns-tr{font:600 9.5px/1 -apple-system,system-ui;letter-spacing:.06em;color:#111}
button.next-scene[data-kind="strip"] .ns-ic{align-self:flex-start;margin-top:-1px}

/* comments panel views (comments.js renderComments / layoutBeside): a List / Beside-text switch in the header; in
   Beside-text the cards are placed level with their words and slide with the script's scroll */
.cm-modes{display:flex;gap:2px;padding:2px;margin-right:6px;border-radius:9px;background:var(--bg4)}
.cm-modes .cm-mode{width:28px;height:24px;padding:0;border:0;border-radius:7px;display:grid;place-items:center;background:transparent;color:var(--fg3);box-shadow:none}
.cm-modes .cm-mode:hover{color:var(--fg)}
.cm-modes .cm-mode.on{background:var(--bg2);color:var(--fg);box-shadow:var(--sh1)}
.cm-list.beside{position:relative;display:block;overflow:hidden;padding:0}
.cm-list.beside > .cm-card{position:absolute;left:10px;right:10px;transform:translateY(var(--beside-y,0px));transition:top .18s var(--ease)}
/* the pressed shadow only along the Pick text tab's top (top right of the shape), not along the quote's top-left
   edge (user request) */
.sp-picks .sp-quote{box-shadow:none}
.sp-picks .sp-quote::after{display:none}
.crop-bar{padding:6px;gap:6px} /* just Reset and Done now */

/* Write: one eye button for what's drawn on the page, with a small menu of switches (script.js visMenu) */
#vis-pop{position:fixed;z-index:95;min-width:210px;padding:6px;border-radius:14px;background:var(--bg2);box-shadow:0 8px 28px rgba(0,0,0,.16),0 1px 3px rgba(0,0,0,.1);animation:pop .15s var(--ease) both}
#vis-pop .vis-row{display:flex;align-items:center;gap:10px;width:100%;padding:7px 8px;border:0;border-radius:9px;background:transparent;box-shadow:none;color:var(--fg);font-size:13px;text-align:left}
#vis-pop .vis-row:hover{background:var(--bg3)}
#vis-pop .vis-row > span:first-child{display:grid;color:var(--fg3)}
#vis-pop .vis-row > :nth-child(2){flex:1}
#vis-pop .vis-sep{height:1px;margin:4px 6px;background:var(--line)}
.vis-sw{flex:none;width:30px;height:18px;border-radius:9px;background:var(--bg4);position:relative;transition:background .15s}
.vis-sw i{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .15s}
.vis-sw.on{background:var(--accent)} .vis-sw.on i{transform:translateX(12px)}
.vis-hidden{color:var(--accent)!important}

/* the crew library picker behind "Add crew member" (crew.js addCrewMenu) */
#crew-lib{position:fixed;z-index:95;width:320px;max-height:min(440px,70vh);display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:16px;background:var(--bg2);box-shadow:0 10px 32px rgba(0,0,0,.18),0 1px 3px rgba(0,0,0,.1);animation:pop .15s var(--ease) both}
#crew-lib.centred{left:50%;top:22%;transform:translateX(-50%)}
#crew-lib .cl-h{display:flex;flex-direction:column;gap:2px;padding:2px 4px} #crew-lib .cl-h b{font-size:13.5px} #crew-lib .cl-h span{font-size:11.5px;color:var(--fg3)}
#crew-lib input{width:100%}
#crew-lib .cl-list{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:2px}
#crew-lib .cl-row{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:10px;cursor:pointer}
#crew-lib .cl-row:hover{background:var(--bg3)}
#crew-lib .cl-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px} #crew-lib .cl-tx b{font-size:13px} #crew-lib .cl-tx span{font-size:11.5px;color:var(--fg3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#crew-lib .cl-x{flex:none;width:22px;height:22px;min-height:0;padding:0;border:0;border-radius:50%;display:grid;place-items:center;background:transparent;box-shadow:none;color:var(--fg3);opacity:0}
#crew-lib .cl-row:hover .cl-x{opacity:1} #crew-lib .cl-x:hover{background:var(--bg2);color:var(--fg)}
#crew-lib .cl-none{padding:10px;font-size:12px;color:var(--fg3);text-align:center}
#crew-lib .cl-new{display:flex;align-items:center;justify-content:center;gap:6px}

/* Wardrobe (wardrobe.js): clothing tiles, outfit thumbnails, and the outfit designer dialog */
.wd-page{display:block;padding:4px 4px 30px}
.wd-lib{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px;margin-bottom:14px}
.wd-tile{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 6px;border-radius:12px;background:var(--bg2);border:1.5px solid transparent;box-shadow:var(--sh1);font-size:11px;color:var(--fg2);text-align:center;cursor:pointer}
.wd-tile.static{cursor:default}
.wd-tile:not(.static):hover{border-color:var(--line)} .wd-tile.on{border-color:var(--accent);background:var(--tint);color:var(--tintfg)}
.wd-art{display:grid;place-items:center;width:64px;height:64px} .wd-art svg{max-width:64px;max-height:64px;width:100%;height:100%}
.wd-thumbs{display:flex;flex-wrap:wrap;gap:8px}
.wd-thumb{display:flex;flex-direction:column;align-items:center;gap:3px;width:78px;padding:6px 4px;border-radius:12px;background:var(--bg2);border:1px solid var(--line);box-shadow:none;cursor:pointer}
.wd-thumb span{display:grid;place-items:center;width:52px;height:104px} .wd-thumb span svg{width:52px;height:104px}
.wd-thumb small{font-size:10.5px;color:var(--fg2);max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wd-thumb.add{border-style:dashed;color:var(--accent)} .wd-thumb:hover{border-color:var(--accent)}
.wd-sec{margin:8px 0 12px} .wd-sec h4{margin:0 0 8px}
.wd-chars{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-bottom:18px}
.wd-char{padding:10px;border-radius:14px;background:var(--bg3)} .wd-char > b{display:block;margin:0 0 8px;font-size:12.5px}
.wd-hint{color:var(--fg3);font-size:12px}
.wd-dlg{width:min(900px,92vw);display:flex;flex-direction:column;gap:12px}
.wd-top{display:flex;align-items:center;gap:10px} .wd-top b{font-size:15px} .wd-top .grow{flex:1}
.wd-name{width:200px}
.wd-body{display:flex;gap:16px;min-height:0}
.wd-left{flex:none;width:240px;display:flex;flex-direction:column;gap:10px}
.wd-fig{background:var(--bg3);border-radius:16px;padding:10px;display:grid;place-items:center} .wd-fig svg{width:200px;height:400px}
.wd-worn h5{margin:0 0 4px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--fg3)}
.wd-row{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:12.5px} .wd-row span{flex:1}
.wd-row input[type=color]{width:26px;height:22px;padding:0;border:0;background:none}
.wd-right{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}
.wd-slots{flex-wrap:wrap}
.wd-right .wd-lib{max-height:440px;overflow:auto;padding:2px}
.wd-dlg{background:var(--bg2);border-radius:20px;padding:18px;box-shadow:0 20px 60px rgba(0,0,0,.25);max-height:88vh;overflow:auto} /* its own panel over the page */
.wd-row input[type=color]{border:1px solid var(--line);border-radius:7px;overflow:hidden} /* a white piece still shows its swatch */

/* character page in Write's split pane, and the scene mood board button (charpage.js) */
.cp-page{padding:16px 18px 40px;display:flex;flex-direction:column;gap:8px;font-size:13px}
.cp-head{display:flex;align-items:center;gap:14px;margin-bottom:6px}
.cp-head .char-photo.big{width:72px;height:72px;flex:none;font-size:26px;cursor:pointer;background-size:cover;background-position:center}
.cp-name{display:flex;flex-direction:column;gap:2px;min-width:0} .cp-name span{color:var(--fg3);font-size:12px}
.cp-title{font:700 18px -apple-system,system-ui;border:0;background:transparent;padding:2px 0;width:100%}
.cp-sec{margin-top:10px;display:flex;flex-direction:column;gap:6px} .cp-sec h4{margin:0}
.cp-actor{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;background:var(--tint);color:var(--tintfg);cursor:pointer}
.cp-actor span:nth-child(3){color:var(--fg2);font-size:12px;flex:1} .cp-go{display:grid;opacity:.6}
.cp-auds{display:flex;flex-direction:column;gap:4px}
.cp-aud{display:flex;justify-content:space-between;gap:8px;padding:6px 10px;border-radius:9px;background:var(--bg3);cursor:pointer;font-size:12.5px} .cp-aud span{color:var(--fg3)}
.cp-aud:hover{background:var(--bg4)}
.cp-hint{color:var(--fg3);font-size:12px;margin:0}
.cp-btns{display:flex;gap:6px;flex-wrap:wrap}
.cp-refs{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:6px}
.cp-ref{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--bg3)}
.cp-ref img{width:100%;height:100%;object-fit:cover;cursor:zoom-in;display:block}
.cp-ref.add{display:grid;place-items:center;border:1.5px dashed var(--line);color:var(--accent);box-shadow:none;padding:0}
.cp-x{position:absolute;top:4px;right:4px;width:20px;height:20px;min-height:0;padding:0;border:0;border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.55);color:#fff;opacity:0;box-shadow:none}
.cp-ref:hover .cp-x{opacity:1}
.cp-page textarea{width:100%;font:13px/1.55 -apple-system,system-ui}
.cp-moodrow{display:flex;align-items:center;gap:4px} .cp-moodrow select{flex:1}
.mood-chip{position:absolute;z-index:6;width:22px;height:22px;min-height:0;padding:0;border:0;border-radius:7px;display:grid;place-items:center;background:var(--tint);color:var(--tintfg);box-shadow:var(--sh1);cursor:pointer;opacity:.85}
.mood-chip:hover{opacity:1;transform:scale(1.08)}
/* the mood board button always shows (it is how you get to the board while writing) */
.cp-head .char-photo.big{margin:0}
.sb-chars-h{display:flex;align-items:center;justify-content:space-between;padding-right:6px} .sb-chars-h .icon.sm{width:22px;height:22px;min-height:0} /* Write sidebar: Characters (app.js) */

/* storyboard tool options bar under the canvas (boardplus.js toolBar) */
.bd-tbar{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);z-index:20;display:flex;align-items:center;gap:4px;padding:6px 10px;border-radius:999px;background:var(--bg2);box-shadow:0 1px 3px rgba(60,64,67,.18),0 4px 14px rgba(60,64,67,.1)}
.bd-tbar .tb-col{width:22px;height:22px;min-height:0;padding:0;border-radius:50%;border:0;background:var(--c);box-shadow:inset 0 0 0 1px rgba(0,0,0,.14);cursor:pointer;position:relative;flex:none}
.bd-tbar .tb-col.on{box-shadow:inset 0 0 0 1px rgba(0,0,0,.14),0 0 0 2px var(--bg2),0 0 0 4px var(--accent)}
.bd-tbar .tb-col.pick{background:conic-gradient(#e8453c,#f6b73c,#34a853,#4a7fd1,#8e5bd0,#e8453c);overflow:hidden}
.bd-tbar .tb-col.pick.on{background:var(--c)}
.bd-tbar .tb-col.pick input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.bd-tbar .tb-sep{width:1px;height:20px;background:var(--line);margin:0 6px}
.bd-tbar .tb-size,.bd-tbar .tb-str{width:30px;height:30px;min-height:0;padding:0;border:0;border-radius:50%;display:grid;place-items:center;background:transparent;box-shadow:none;cursor:pointer}
.bd-tbar .tb-size span{display:block;border-radius:50%;background:var(--fg)}
.bd-tbar .tb-str span{display:block;width:16px;height:16px;border-radius:4px;background:var(--fg)}
.bd-tbar .tb-size:hover,.bd-tbar .tb-str:hover{background:var(--bg3)}
.bd-tbar .tb-size.on,.bd-tbar .tb-str.on{background:var(--tint)}
.bd-tbar .tb-size.on span,.bd-tbar .tb-str.on span{background:var(--accent)}
.bd-tlmode .bd-tbar{bottom:8px}
/* the tool bar sits collapsed (just the current colour / size / strength) until the pointer is over it, then opens up
   to all the choices (user request) */
.bd-tbar{transition:padding .15s var(--ease),gap .15s var(--ease)}
.bd-tbar > *{transition:width .16s var(--ease),margin .16s var(--ease),opacity .12s}
.bd-tbar:not(:hover):not(:focus-within){gap:6px;padding:5px 8px}
.bd-tbar:not(:hover):not(:focus-within) > :not(.on){display:none} /* just the current picks while closed */
.bd-tbar{animation:none} .bd-tbar:hover > *{animation:tb-in .14s var(--ease) both} @keyframes tb-in{from{opacity:0;transform:scale(.85)}}
.bd-tbar:not(:hover):not(:focus-within) .tb-sep{display:none}
/* tool bar styled like the drawing toolbar on the left (.rail / .bd-rail): same card, corners, shadow and 34px
   rounded-square buttons with the tinted "on" state; colours are swatches inside those buttons (user request) */
.bd-tbar{border-radius:16px;padding:5px;gap:0;background:var(--bg2);box-shadow:0 1px 3px rgba(60,64,67,.18),0 4px 14px rgba(60,64,67,.1)}
.bd-tbar:not(:hover):not(:focus-within){gap:0;padding:5px}
.bd-tbar .tb-col,.bd-tbar .tb-size,.bd-tbar .tb-str{width:34px;height:34px;border-radius:10px;background:transparent;box-shadow:none;display:grid;place-items:center;position:relative}
.bd-tbar .tb-col::before{content:'';width:18px;height:18px;border-radius:50%;background:var(--c);box-shadow:inset 0 0 0 1px rgba(0,0,0,.16)}
.bd-tbar .tb-col.pick::before{background:conic-gradient(#e8453c,#f6b73c,#34a853,#4a7fd1,#8e5bd0,#e8453c)}
.bd-tbar .tb-col.pick.on::before{background:var(--c)}
.bd-tbar .tb-col.pick{background:transparent;overflow:hidden}
.bd-tbar .tb-col:hover,.bd-tbar .tb-size:hover,.bd-tbar .tb-str:hover{background:var(--bg3)}
.bd-tbar .tb-col.on,.bd-tbar .tb-size.on,.bd-tbar .tb-str.on{background:var(--tint);box-shadow:none}
.bd-tbar .tb-size.on span,.bd-tbar .tb-str.on span{background:var(--tintfg)}
.bd-tbar .tb-size span,.bd-tbar .tb-str span{background:var(--fg2)}
.bd-tbar .tb-sep{width:1px;height:22px;margin:0 4px}
.prompt-note{margin:2px 0 4px;font-size:12.5px;line-height:1.5;color:var(--fg2)} /* App.prompt opts.note */

/* Layers (board.js layerPanel): each row is two lines so the full name and every button show at all times (user
   request), with the opacity slider underneath. Rows reorder by press-and-drag (layerDrag), never as a dragged "file". */
.lrow2{flex-wrap:wrap;row-gap:0;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;touch-action:none}
.lrow2 .ln{white-space:normal;overflow:visible;text-overflow:clip;min-width:0}
.bd-layers .lrow2 .lop{order:10;flex:1 1 100%;width:auto;opacity:.75;margin:2px 0 0 24px;height:14px} .bd-layers .lrow2:hover .lop{opacity:1}
.lrow2 .lb{opacity:.55;display:grid;place-items:center} .lrow2 .lb:hover{opacity:1} .lrow2 .lb.act{opacity:.95}
.lrow.ldrag{position:relative;z-index:3;background:var(--bg2);box-shadow:var(--sh2);cursor:grabbing}
.lrow.ldrop{box-shadow:inset 0 0 0 2px var(--accent)}

/* Filled / Outline switch for the rectangle and ellipse (boardplus.js toolBar) */
.bd-tbar .tb-mode{width:34px;height:34px;min-height:0;padding:0;border:0;border-radius:10px;display:grid;place-items:center;background:transparent;box-shadow:none;color:var(--fg2);cursor:pointer}
.bd-tbar .tb-mode:hover{background:var(--bg3)} .bd-tbar .tb-mode.on{background:var(--tint);color:var(--accent)}
.bd-tbar .tb-solid{display:block;width:14px;height:14px;border-radius:3px;background:currentColor} .bd-tbar .tb-solid.round{border-radius:50%}
/* the rail's line between drawing tools and view tools (hand, rotate, guides, flip) stays even when the rail folds */
.bd-rail.cols2 .rsep.view,.bd-rail.cols3 .rsep.view,.bd-rail.cols4 .rsep.view{display:block;grid-column:1/-1;height:1px;margin:4px 2px}
/* onion skin (boardmore.js): the panel before in red, the one after in green, faint, over the drawing */
.bd-canvaswrap .onion{position:absolute;inset:0;width:100%;height:100%;z-index:40;pointer-events:none;mix-blend-mode:multiply;opacity:.28}
.bd-canvaswrap .onion.prev{filter:grayscale(1) sepia(1) saturate(6) hue-rotate(-40deg)}
.bd-canvaswrap .onion.next{filter:grayscale(1) sepia(1) saturate(5) hue-rotate(70deg)}
.bd-canvaswrap .onion.hidden{display:none}
/* aspect ratio picker (boardmore.js askAspect) */
.ar-dialog{width:560px;max-width:calc(100vw - 32px)}
.ar-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}
.ar-tile{display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 6px;border-radius:12px;border:1px solid var(--line);background:var(--bg2);box-shadow:none;min-height:0;cursor:pointer}
.ar-tile:hover{background:var(--bg3)} .ar-tile.on{border-color:var(--accent);background:var(--tint)}
.ar-tile .ar-box{height:68px;display:grid;place-items:center} .ar-tile .ar-box i{display:block;border:2px solid var(--fg);border-radius:3px;background:var(--bg3)}
.ar-tile b{font-size:13px} .ar-tile span:last-child{font-size:11px;color:var(--fg2)}
.ar-custom{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--fg2)} .ar-custom .ar-n{width:70px}
/* fullscreen: a Panels button at the bottom opens the strip as a drawer over the canvas (boardmore.js fsDrawer) */
.bd-fs-tab{display:flex;align-items:center;gap:6px;padding:6px 14px;border-radius:999px;border:0;background:var(--bg2);box-shadow:0 1px 3px rgba(60,64,67,.18),0 4px 14px rgba(60,64,67,.12);font-size:12px;font-weight:600;color:var(--fg);cursor:pointer;min-height:0}

/* the drawer is always there in fullscreen, parked below the window; opening slides it up and fades it in */
body.bd-full #m-board .bd-strip{display:flex!important;position:fixed;left:16px;right:16px;bottom:56px;z-index:65;border:0;border-radius:16px;box-shadow:0 2px 6px rgba(60,64,67,.18),0 10px 30px rgba(60,64,67,.18);transform:translateY(calc(100% + 72px)) scale(.98);opacity:0;pointer-events:none;transition:transform .34s cubic-bezier(.2,.8,.2,1),opacity .22s ease}
body.bd-full.bd-fs-strip #m-board .bd-strip{transform:none;opacity:1;pointer-events:auto}
.bd-fs-tab{transition:background .15s,box-shadow .15s,transform .15s} .bd-fs-tab:hover{background:var(--bg3)} .bd-fs-tab:active{transform:scale(.96)}
.bd-fs-tab .fs-chev{display:grid;transform:rotate(-90deg);transition:transform .3s cubic-bezier(.2,.8,.2,1);color:var(--fg2)}
body.bd-fs-strip .bd-fs-tab:first-child{background:var(--tint);color:var(--tintfg)}
body.bd-fs-strip .bd-fs-tab:first-child .fs-chev{transform:rotate(90deg);color:inherit}
.bd-fs-bar{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);z-index:70;display:flex;gap:8px}

body.bd-full .bd-tbar{bottom:56px}
body.bd-full .bd-tbar{transition:opacity .2s} body.bd-full.bd-fs-strip .bd-tbar{opacity:0;pointer-events:none}
/* editing a line of the script in the storyboard's sidebar (boardmore.js editSideLine) */
.ss-l{cursor:text} .ss-l.ss-editing{outline:2px solid var(--accent);outline-offset:1px;border-radius:3px;background:var(--bg2);cursor:text}
.cap-timers{display:flex;gap:4px} .cap-timers button{min-height:0;padding:4px 9px;font-size:12px;font-variant-numeric:tabular-nums}
.cap-timers button.on{background:var(--tint);color:var(--accent)}
.cap-count{position:absolute;inset:0;display:grid;place-items:center;font:700 120px/1 -apple-system,system-ui;color:#fff;text-shadow:0 2px 20px rgba(0,0,0,.5);pointer-events:none}
.cap-stage{position:relative}
/* dual dialogue in Write (dual.js): the first speech in the left half of the page, the second lifted up beside it in the
   right half. Indents are scaled down to fit a half page (export.js prints the same way). */
#editor [data-dual=l].character{margin-left:1.1in;margin-right:50%} #editor [data-dual=r].character{margin-left:calc(50% + 1.1in);margin-right:0}
#editor [data-dual=l].dialogue{margin-left:.1in;margin-right:calc(50% + .2in)} #editor [data-dual=r].dialogue{margin-left:calc(50% + .1in);margin-right:.2in}
#editor [data-dual=l].parenthetical{margin-left:.6in;margin-right:calc(50% + .45in)} #editor [data-dual=r].parenthetical{margin-left:calc(50% + .6in);margin-right:.45in}
#editor [data-dual=r].character::before{content:'';position:absolute;margin-left:calc(-1.1in - 10px);width:2px;height:1.2em;border-radius:1px;background:var(--line)}
.cap-hint{font-size:11px;color:var(--fg3);white-space:nowrap} .cap-hint kbd{font:600 10px/1 -apple-system,system-ui;padding:2px 5px;margin:0 1px;border-radius:4px;background:var(--bg3);color:var(--fg2);box-shadow:inset 0 -1px 0 var(--line)}
/* Write: hide Fountain [[notes]] (eye menu, script.js VIS) */
.sc-scroll.hide-notes #editor .note{display:none}
/* mood board: a faint dot grid behind everything (mood.js applyView keeps it in step with pan and zoom) */
.mb-stage{background-image:radial-gradient(circle,rgba(60,64,67,.22) 1px,transparent 1.3px);background-size:24px 24px}
.exp-all{display:flex;gap:6px;font-size:12px;margin:2px 0 6px;color:var(--fg3)} .exp-all a{color:var(--accent);text-decoration:none} .exp-all a:hover{text-decoration:underline}
/* Settings: Support us pinned at the bottom of the menu in the studio pink; bug notes; crew library list */
.set-nav{flex:1} .set-nb.set-support{margin-top:auto;order:99;background:#f0249b;color:#fff} .set-nb.set-support:hover,.set-nb.set-support.on{background:#d81b8a;color:#fff}
.support-head{display:flex;gap:14px;align-items:center;margin-bottom:12px} .support-head img{width:56px;height:56px;border-radius:14px} .support-head p{margin:4px 0 0;color:var(--fg2);line-height:1.5}
.bug-notes{width:100%;box-sizing:border-box;resize:vertical}
.crewlib-list{display:flex;flex-direction:column;gap:2px;max-height:320px;overflow:auto}
.crewlib-row{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:8px;font-size:13px} .crewlib-row:hover{background:var(--bg3)}
.crewlib-row span{flex:1;color:var(--fg2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .crewlib-row .cl-x{min-height:0;padding:4px;border:0;box-shadow:none;background:transparent}
/* Set Plan: the scene's script sidebar (light.js renderPlanScript); hidden with the plan itself */
.plan-script.collapsed{display:none} .col.hidden ~ .plan-script, .plan-script:has(~ .col.hidden){display:none}
.sp-bp.sv-on{outline:3px solid var(--accent);outline-offset:1px;border-radius:6px} /* storyview.js: panels of the scene being written */
.tl-block.sel{box-shadow:0 0 0 2px var(--accent),0 0 0 4px color-mix(in srgb,var(--accent) 25%,transparent)} /* several panels selected in the timeline */

.layerlist .lh .l-add{margin-left:4px;min-height:0;width:22px;height:22px;padding:0;border:0;border-radius:6px;box-shadow:none;background:transparent;display:grid;place-items:center;color:var(--fg2)} .layerlist .lh .l-add:hover{background:var(--bg3);color:var(--accent)}
body.bd-full:not(.bd-fs-strip) .next-scene{display:none!important} /* the strip's next-scene label only with the Panels drawer open */

/* Layers card on the canvas, top right (boardmore.js layerDock): a small pill with the current layer; opens to the list */
.bd-ldock{position:absolute;top:12px;right:12px;z-index:21;width:max-content;border-radius:14px;background:var(--bg2);box-shadow:0 1px 3px rgba(60,64,67,.18),0 4px 14px rgba(60,64,67,.1)}
.bd-ldock .ld-btn{display:flex;align-items:center;gap:6px;min-height:0;padding:7px 12px;border:0;box-shadow:none;background:transparent;font-size:12px;font-weight:600;color:var(--fg);cursor:pointer;border-radius:14px}
.bd-ldock .ld-btn:hover{background:var(--bg3)} .bd-ldock .fs-chev{display:grid;transform:rotate(90deg);transition:transform .3s cubic-bezier(.2,.8,.2,1);color:var(--fg2)}
.bd-ldock.open{width:236px} .bd-ldock.open .fs-chev{transform:rotate(-90deg)} .bd-ldock.open .ld-btn{width:100%}
.bd-ldock .ld-body{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s cubic-bezier(.2,.8,.2,1)} .bd-ldock .ld-body>*{min-height:0;overflow:hidden}
.bd-ldock.open .ld-body{grid-template-rows:1fr} .bd-ldock .layerlist{box-shadow:none;margin:0;padding-top:0;max-height:none;background:transparent} .bd-ldock .layerlist .lh{padding-top:2px}
.bd-ldock.open .ld-body>*{overflow:auto;max-height:60vh}
/* onion skin options (boardmore.js onionMenu), styled like the Write eye menu */
#onion-pop{position:fixed;z-index:400;width:240px;padding:6px;border-radius:14px;background:var(--bg2);box-shadow:0 2px 6px rgba(60,64,67,.18),0 10px 30px rgba(60,64,67,.16)}
#onion-pop .op-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;font-size:12px}
#onion-pop .op-row input{width:110px}
#onion-pop .op-seg{display:flex;gap:2px;background:var(--bg3);border-radius:8px;padding:2px}
#onion-pop .op-seg button{min-height:0;width:26px;height:22px;padding:0;border:0;box-shadow:none;border-radius:6px;background:transparent;font-size:12px;color:var(--fg2)}
#onion-pop .op-seg button.on{background:var(--bg2);color:var(--fg);box-shadow:0 1px 2px rgba(0,0,0,.12)}
#onion-pop .op-note{margin:2px 10px 6px;font-size:11px;color:var(--fg3);white-space:pre} #onion-pop .op-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px;vertical-align:-1px}
#onion-pop .op-dot.prev{background:#e8453c} #onion-pop .op-dot.next{background:#34a853}
/* onion menu reuses the eye menu's rows and switches */
#onion-pop .vis-row{display:flex;align-items:center;gap:10px;width:100%;padding:7px 8px;border:0;border-radius:9px;background:transparent;box-shadow:none;color:var(--fg);font-size:13px;text-align:left}
#onion-pop .vis-row:hover{background:var(--bg3)}
#onion-pop .vis-row > span:first-child{display:grid;color:var(--fg3)}
#onion-pop .vis-row > :nth-child(2){flex:1}
#onion-pop .vis-sep{height:1px;margin:4px 6px;background:var(--line)}
/* layers pill: closed it's just the pill (the list isn't there to widen it); opening drops the list in */
.bd-ldock:not(.open) .ld-body{display:none} .bd-ldock.open .ld-body>*{animation:ld-in .26s cubic-bezier(.2,.8,.2,1)} @keyframes ld-in{from{opacity:0;transform:translateY(-6px)}}
.bd-ldock .layerlist{padding:0 4px 4px} .bd-ldock .lrow{padding:5px 8px;gap:6px}

/* Option-drag in the strip copies: a green + on the ghost and a copy cursor */
.drag-ghost.copy::after{content:'+';position:absolute;left:-8px;top:-8px;width:20px;height:20px;border-radius:50%;background:#34a853;color:#fff;font:700 15px/20px -apple-system,system-ui;text-align:center;box-shadow:0 0 0 2px var(--bg2)}
body.strip-copying, body.strip-copying *{cursor:copy !important}
/* note resize handles in Write (comments.js cmHandles): a thin yellow bar with a knob, at each end of a note */
.cm-h{position:absolute;pointer-events:auto;width:2px;background:#f9ab00;border-radius:1px;cursor:ew-resize;z-index:6}
.cm-h::before{content:'';position:absolute;left:-5px;width:12px;height:12px;border-radius:50%;background:#f9ab00;box-shadow:0 0 0 2px #fff,0 1px 3px rgba(0,0,0,.25)}
.cm-h.start::before{top:-11px} .cm-h.end::before{bottom:-11px}
.cm-h::after{content:'';position:absolute;inset:-4px -8px} /* a bigger grab area */
.cm-h:not(.on){opacity:.55} .cm-h:hover{opacity:1}
body.cm-resizing, body.cm-resizing *{cursor:ew-resize !important;user-select:none}

/* Release fixes: keep controls compact while preserving meaningful labels and keyboard focus. */
.brush-opacity{display:flex;align-items:center;gap:6px;font-size:11px;white-space:nowrap;padding:0 5px}
.brush-opacity input{width:70px;min-width:0}.brush-opacity span{min-width:30px;font-variant-numeric:tabular-nums}
.bd-tbar:not(:hover):not(:focus-within) .brush-opacity input{display:none}
.board-play-image,.board-video{position:absolute;inset:0;width:100%;height:100%;z-index:56;pointer-events:none;object-fit:fill}
.board-video{z-index:57}
.sb-day-notes{margin:6px 12px 10px;white-space:pre-wrap;color:var(--fg2);font-size:12px;line-height:1.45}.sb-day-notes:empty{display:none}
.schedule-shots{overflow:auto;padding:10px}.schedule-shot{display:flex;gap:8px;align-items:center;padding:8px 4px;border-bottom:1px solid var(--line);font-size:12px}
.schedule-shots-toggle{margin:6px 10px}.coverage-head{display:flex;align-items:center;justify-content:space-between}
.coverage-shot{border:1px solid var(--line);padding:8px;border-radius:12px;margin-bottom:10px}.coverage-shot.on{border-color:var(--accent);background:var(--tint)}
.coverage-title{border:0;background:transparent;box-shadow:none;text-align:left;width:100%;padding:4px;min-height:0}
.coverage-boards{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0}.coverage-boards button{border:0;background:transparent;box-shadow:none;padding:0;width:76px;min-height:0;overflow:hidden;border-radius:5px}
.coverage-boards img{display:block;width:100%;height:48px;object-fit:cover;-webkit-user-drag:none}.coverage-passage{display:flex;gap:4px;align-items:start;margin-top:5px}
.coverage-passage>button:first-child{flex:1;border:0;box-shadow:none;background:var(--bg3);text-align:left;padding:5px 7px;font:11px/1.4 'Courier Prime',monospace;min-height:0}
::highlight(shot-coverage){background:color-mix(in srgb,var(--accent) 20%,transparent);text-decoration:underline 2px var(--accent)}
.media-editor{width:680px;max-width:calc(100vw - 32px);max-height:calc(100vh - 40px);overflow:auto}.media-preview{display:block;width:100%;height:auto;background:#111;border-radius:10px;margin-bottom:12px}
.coverage-passage>button:first-child{border-radius:6px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.bd-script{flex-shrink:0;min-width:0}.bd-script .ss-l{box-sizing:border-box;overflow-wrap:break-word}
/* bold / italic / underline in Write: the Fountain markers (**, *, _) are hidden except on the line being edited */
#editor > div:not(.cur) .em.k{font-size:0}
#selpop .fmt{width:28px;min-height:0;height:28px;padding:0;border:0;box-shadow:none;border-radius:50%;background:transparent;color:var(--fg);font-size:14px;display:grid;place-items:center}
#selpop .fmt:hover{background:var(--bg3)} #selpop .fmt-sep{width:1px;align-self:stretch;margin:4px 2px;background:var(--line)}
/* Compatibility choices and the day's filming order remain compact alongside existing owner/scene controls. */
.gear-filters{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:12px}
.gear-filters summary{cursor:pointer;font-weight:600}
.gear-filter-fields{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-top:12px}
.gear-filter-fields .f{min-width:160px;flex:1}
.day-shotlist{padding:12px;border-top:1px solid var(--line)}
.day-shotlist-head,.day-shot-row{display:flex;align-items:center;gap:8px}
.day-shotlist-head{justify-content:space-between;margin-bottom:6px}
.day-shot-row{padding:8px 4px;border-top:1px solid var(--line);font-size:12px}
.day-shot-row .grow{min-width:0;overflow-wrap:anywhere}
.day-shot-grip{color:var(--fg3);cursor:grab}
.day-shotlist p{font-size:12px;color:var(--fg2)}
.mk-shot:focus-visible{outline:2px solid var(--shot,var(--accent));outline-offset:4px}
/* Pick text is full-width inside Panel settings. The container owns its corners so the old two-tab
   quote styling cannot leave a rounded notch or a seam between the button and the selected words. */
.panel-settings .sp-picks.has-quote{background:var(--tint);border-radius:12px;overflow:hidden;gap:0}
.panel-settings .sp-picks.has-quote>button.on{border:0;border-radius:0!important;margin:0;box-shadow:none!important;background:transparent}
.panel-settings .sp-picks.has-quote>button.on::before,
.panel-settings .sp-picks.has-quote>button.on::after{display:none}
.panel-settings .sp-picks.has-quote .sp-quote{border-radius:0;background:transparent;box-shadow:none}
/* Short scene-cut marker with a generous stationary grab area, away from the mid-frame insertion menu. */
.bd-strip .scene-break,.bd-strip .scene-break:hover,.bd-strip .scene-break.drag{width:2px;margin:0 4px;background:transparent;pointer-events:none;touch-action:none;transition:none}
.bd-strip .scene-break::before{top:var(--cut-top,70px);bottom:auto;left:50%;right:auto;width:28px;height:28px;transform:translateX(-50%);pointer-events:auto;touch-action:none}
.bd-strip .scene-break::after,.bd-strip .scene-break:not(:first-child):hover::after{content:'';position:absolute;top:calc(var(--cut-top,70px) + 4px);left:50%;width:4px;height:20px;transform:translateX(-50%);border-radius:2px;background:#111;box-shadow:none;pointer-events:none}
.bd-strip .scene-break:not(:first-child):hover::after,.bd-strip .scene-break.drag::after{width:6px}
/* Schedule's scene library offers draggable shots; the day owns selection, order and production notes. */
.scene-shot-library,.hidden-panel-library{flex:none;margin:8px 0;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.scene-shot-library summary,.hidden-panel-library summary{padding:12px;cursor:pointer;font-weight:600;font-size:12px}
.library-shot{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--line);font-size:12px;cursor:grab}
.library-shot span{min-width:0;overflow-wrap:anywhere}
.scene-shot-library p{padding:0 12px;color:var(--fg2);font-size:12px}
.day-shotlist>summary{cursor:pointer;font-weight:600;padding:4px 0 12px}
.day-shot-table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}
.day-shot-table th,.day-shot-table td{padding:8px;border-bottom:1px solid var(--line);vertical-align:top}
.day-shot-table th{color:var(--fg2);font-weight:500}
.day-shot-table td:first-child,.day-shot-table td:nth-child(2),.day-shot-table td:last-child{white-space:nowrap}
.day-shot-table small{display:block;color:var(--fg2);margin-top:4px}
.day-shot-note{margin-top:6px}
.day-shot-note input{width:100%;min-width:100px;font-size:11px;padding:5px 8px}
.day-shot-table .shot-disabled td:not(:last-child){opacity:.5}
.hidden-panels-empty{position:absolute;inset:0;z-index:60;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--bg);gap:12px}
.thumb.panel-hidden img{opacity:.45}
.thumb.panel-hidden::after{content:'Hidden';position:absolute;left:4px;top:4px;border-radius:4px;background:var(--bg2);color:var(--fg2);font-size:9px;padding:2px 5px;pointer-events:none}
/* Coverage editing isolates one setup and uses a broad drag rail in the page margin. */
.coverage-selecting .mk-shot{visibility:hidden;pointer-events:none}
.coverage-line-rail{position:absolute;top:20px;bottom:20px;right:10px;width:42px;touch-action:none;z-index:12}
.coverage-line-cell{position:absolute;left:3px;width:18px;box-sizing:border-box;border:1px solid var(--coverage-colour);border-radius:3px;background:var(--page);cursor:pointer;pointer-events:auto;touch-action:none}
.coverage-line-cell.checked{background:var(--coverage-colour)}
.coverage-line-cell:hover{box-shadow:0 0 0 2px color-mix(in srgb,var(--coverage-colour) 25%,transparent)}
.coverage-line-cell:focus-visible{outline:2px solid var(--coverage-colour);outline-offset:3px}
.coverage-line-cell::before{content:'';position:absolute;inset:0 -5px}
.coverage-picker-top{position:sticky;top:-14px;z-index:20;background:var(--bg2);padding:10px 0 4px}
.coverage-picker-top .coverage-head h4{font-size:13px;line-height:1.4;min-width:0;margin:0;color:var(--fg);text-transform:none;letter-spacing:0}
.coverage-picker-top .coverage-guide-picture{width:46px}
.coverage-picker-top .coverage-guide{flex-wrap:wrap;margin-bottom:10px}
.coverage-picker-top .coverage-guide p{flex:1;min-width:120px}
.coverage-picker-count{width:100%;color:var(--fg2);font-size:11px;padding-left:0}
.coverage-selecting .lk-layer,.coverage-selecting .lk-hds{visibility:hidden;pointer-events:none}
.coverage-selecting #editor>div.hl-shot{background:none;box-shadow:none}
.coverage-selecting #editor::highlight(shot-coverage),.coverage-selecting #editor *::highlight(shot-coverage){background-color:transparent;text-decoration:none}
.coverage-guide{display:flex;align-items:center;gap:12px;margin:8px 0 16px}
.coverage-guide p{font-size:12px;color:var(--fg2);line-height:1.5;margin:0}
.coverage-guide-picture{width:76px;flex:none;position:relative;padding:8px 14px 8px 4px}
.coverage-guide-picture i{display:block;height:5px;margin:6px 0;background:var(--line);border-radius:3px}
.coverage-guide-picture i.chosen{background:var(--coverage-colour,var(--accent))}
.coverage-guide-picture b{position:absolute;right:0;top:9px;display:grid;gap:3px}
.coverage-guide-picture b span{display:block;width:8px;height:8px;border:1px solid var(--coverage-colour,var(--accent));border-radius:2px}
.coverage-guide-picture b span.chosen{background:var(--coverage-colour,var(--accent))}
.editing-hidden-panels .thumb[data-i],.editing-hidden-panels .tl-block[data-i]{cursor:pointer}
.editing-hidden-panels .thumb[data-i]:hover img{outline:2px dashed var(--fg2);outline-offset:2px}
.editing-hidden-panels .tl-block[data-i]{opacity:1}
.editing-hidden-panels .tl-block.panel-hidden{opacity:.45}
/* Current setup uses one solid colour across its full heading. */
.coverage-shot .coverage-title{background:var(--shot);color:#fff;border-radius:9px;padding:9px 12px;margin-bottom:8px}
.coverage-shot.on{border-color:var(--shot);background:color-mix(in srgb,var(--shot) 8%,var(--bg2))}
.page.links-hover .lk-box{opacity:0;transition:opacity .15s}
.page.links-hover .lk-box.hovered{opacity:1}
.bd-script{position:relative}
.bd-script .ss-hint{position:absolute;top:44px;left:8px;right:8px;z-index:15;margin:0;pointer-events:none;box-shadow:var(--sh1);animation:pickHintSlide .2s ease-out}
@keyframes pickHintSlide{from{opacity:0;transform:translateY(-16px)}to{opacity:1;transform:none}}
/* Bottom anchoring avoids image-load races and keeps cuts below insertion buttons. */
.bd-strip .scene-break,.bd-strip .scene-break:hover,.bd-strip .scene-break.drag{height:42px;align-self:flex-end;z-index:8}
.bd-strip .scene-break::before{top:0;bottom:auto;width:36px;height:42px}
.bd-strip .scene-break::after,.bd-strip .scene-break:not(:first-child):hover::after{top:6px;height:30px;width:4px}
.bd-strip .scene-break.drag::after{width:6px}
.thumb .ins::after{content:'';position:absolute;inset:-8px -16px;z-index:0}
.thumb .ins:hover .ins-pill{transform:translateX(11px)}
.tl-shot .tl-stick{position:relative;left:0;will-change:transform}
.tl-scroll{overflow:auto;overscroll-behavior:contain}
.pending-scene{align-self:flex-end;min-width:140px;border:0;border-left:4px solid #111;border-radius:0;padding:8px 12px;background:transparent;font-size:11px;white-space:nowrap}
.tl-pending-scene{position:absolute;top:0;min-width:140px;white-space:nowrap;font-size:10px}
body.bd-full #m-board .bd-stage{min-height:0;height:100%;max-height:none}
/* Whole-line inclusion uses uniform, familiar checkboxes; line length never changes their hit target or shape. */
.coverage-line-cell{width:18px;height:18px!important;border-width:1.5px;border-radius:5px;background:color-mix(in srgb,var(--coverage-colour) 5%,var(--page));transition:background .12s,box-shadow .12s,transform .12s}
.coverage-line-cell::before{inset:-4px -5px}
.coverage-line-cell::after{content:'+';display:grid;place-items:center;height:100%;font:600 13px system-ui;color:var(--coverage-colour);opacity:0}
.coverage-line-cell:hover{background:color-mix(in srgb,var(--coverage-colour) 15%,var(--page));box-shadow:0 0 0 3px color-mix(in srgb,var(--coverage-colour) 15%,transparent);transform:scale(1.06)}
.coverage-line-cell:hover::after{opacity:1}
.coverage-line-cell.checked{background:var(--coverage-colour)}
.coverage-line-cell.checked::after{content:'✓';color:white;opacity:1;font-size:12px}
.coverage-guide-copy{flex:1;min-width:130px}.coverage-guide-copy p{margin:0}.coverage-guide-copy b{color:var(--fg);font-weight:600}
.coverage-guide-copy .coverage-guide-secondary{font-size:11px;margin-top:7px;color:var(--fg2)}
.tl-zoom-control,.tl-audio-size{display:flex;align-items:center;gap:7px;flex:none;color:var(--fg2);font-size:11px;padding:4px 8px;border-left:1px solid var(--line);margin-left:9px}
.tl-zoom-control>span{display:flex}.tl-audio-size input{width:70px}.tl-zoom-control input{max-width:110px}
/* Cinema mode owns its own read-only stage; optional paper and filmstrip reserve space instead of covering frames. */
.board-watch{position:fixed;inset:0;z-index:12000;background:#101216;color:#f3f5f7;display:flex;flex-direction:column;outline:0;--watch-paper:#faf9f6}
.watch-loading{margin:auto;color:#bec6d1}.watch-head{position:absolute;inset:0 0 auto;display:flex;align-items:center;gap:10px;padding:18px 24px;background:linear-gradient(#101216e8,transparent);transition:opacity .3s,transform .3s;z-index:2}
.watch-head>b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.board-watch button{color:#eef2f6;border:1px solid #ffffff26;background:#ffffff0d;box-shadow:none}
.board-watch button:hover{background:#ffffff24}.board-watch button[aria-pressed=true]{background:#e9f0fb;color:#26364e;border-color:#e9f0fb}.board-watch button:focus-visible{outline:2px solid #90b9f5;outline-offset:3px}.board-watch button:disabled{opacity:.35}
.watch-option{display:flex;align-items:center;justify-content:center;gap:7px;border-radius:20px;padding:9px 13px;font-size:12px;white-space:nowrap}.watch-option>span{display:flex}
.watch-content{display:flex;flex:1;min-height:0;gap:24px}.watch-screen{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0}.watch-picture{display:flex;flex:1;min-height:0;align-items:center;justify-content:center;cursor:pointer;overflow:hidden}.watch-picture canvas{width:100%;height:100%;object-fit:contain;display:block}
.watch-script{display:none;width:34%;max-width:560px;min-width:280px;min-height:0;border-radius:14px;background:var(--watch-paper);color:#282c32;box-shadow:0 16px 48px #0004;overflow:hidden;flex-direction:column}.with-script .watch-script{display:flex}
.board-watch.with-script .watch-content,.board-watch.with-panels .watch-content{padding:82px 28px 90px}.watch-section-title{padding:16px 24px 12px;font:600 11px system-ui;letter-spacing:.06em;color:#7b828b;border-bottom:1px solid #e8e9ec}
.watch-paper{padding:28px;overflow:auto;scroll-behavior:smooth;flex:1;min-height:0;overscroll-behavior:contain}.watch-script-line{font:14px/1.65 'Courier Prime',Courier,monospace;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:5px;padding:0 5px;transition:background .2s}.watch-script-line.scene{font-weight:bold}.watch-script-line.character{font-weight:bold;text-align:center;margin-top:10px}.watch-script-line.dialogue{margin:0 9%}.watch-script-line.parenthetical{margin:0 16%;font-style:italic}.watch-script-line.title{color:#8b9097;font-size:12px}.watch-script-line.linked{background:#dce9f5;box-shadow:inset 3px 0 #789abf}
.watch-film{display:none;gap:10px;overflow:auto;flex:none;height:142px;padding:16px 4px 4px;overscroll-behavior:contain}.with-panels .watch-film{display:flex}.watch-thumb{flex:0 0 160px;min-width:0;padding:5px!important;border-radius:10px!important;transition:background .2s,border-color .2s}.watch-thumb img{width:100%;height:85px;object-fit:contain;background:#ffffff0a;border-radius:6px;display:block}.watch-thumb span{display:block;font:11px system-ui;margin-top:5px}.watch-thumb.active{border-color:#9dbde6!important;background:#809fc230!important}
.watch-controls{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);width:min(780px,calc(100% - 48px));padding:12px 16px;display:flex;gap:16px;align-items:center;border-radius:24px;background:#252b35e8;backdrop-filter:blur(18px);border:1px solid #ffffff20;box-shadow:0 8px 30px #0005;transition:opacity .3s,bottom .3s;z-index:2}.watch-controls input{flex:1;min-width:0;accent-color:#b1cef3;cursor:pointer}.watch-clock{font:11px ui-monospace,monospace;white-space:nowrap;color:#d5dfed}
.board-watch.idle{cursor:none}.board-watch.idle .watch-head{opacity:0;transform:translateY(-10px);pointer-events:none}.board-watch.idle .watch-controls{opacity:0;bottom:12px;pointer-events:none}.board-watch .watch-head:has(:focus-visible),.board-watch .watch-controls:has(:focus-visible){opacity:1;pointer-events:auto}
@media(max-width:850px){.watch-content{gap:14px}.board-watch.with-script .watch-content,.board-watch.with-panels .watch-content{padding:75px 16px 88px}.watch-script{min-width:240px;width:36%}.watch-paper{padding:18px}.watch-script-line{font-size:12px}.watch-head{padding:14px 16px;gap:6px}.watch-head>b{max-width:160px}.watch-option{padding:8px;font-size:11px}}
@media(max-aspect-ratio:4/5){.with-script .watch-content{flex-direction:column}.watch-script{width:100%;max-width:none;min-width:0;height:43%;flex:none}.watch-film{height:104px}.watch-thumb{flex-basis:112px}.watch-thumb img{height:57px}.watch-head>b{display:none}.watch-paper{padding:18px 24px}}
@media(prefers-reduced-motion:reduce){.board-watch *,.coverage-line-cell{transition:none!important;scroll-behavior:auto!important}}
/* Reset generic toolbar-button flex rules inside filmstrip cards: thumbnail and caption always stack. */
.board-watch .watch-thumb{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;box-sizing:border-box;overflow:hidden}
.board-watch .watch-thumb img{flex:none;min-width:0}.board-watch .watch-thumb span{flex:none;text-align:center;white-space:nowrap}
.watch-head .grow{flex:1}
/* Timeline-first layout: full workspace for clips, a floating preview, and a pinned ruler above every audio row. */
.bd-editor{position:relative}.tl-preview-head{display:none}
body:not(.bd-full) .bd-tlmode .tline{flex:1;min-height:0;max-height:none;height:auto;border-top:0;overflow:hidden}
body:not(.bd-full) .bd-tlmode .bd-stage{position:absolute;right:auto;left:var(--preview-x,max(8px,calc(100% - 318px)));top:var(--preview-y,82px);width:300px;max-width:calc(100% - 28px);height:216px;transition:left .2s var(--ease),top .2s var(--ease),width .2s var(--ease),height .2s var(--ease);z-index:32;flex:none;display:flex;flex-direction:column;gap:4px;padding:0 8px 8px;background:var(--bg2);border:1px solid var(--line);border-radius:14px;box-shadow:var(--sh2);cursor:default!important}
body:not(.bd-full) .bd-tlmode .tl-preview-head{display:flex;align-items:center;gap:3px;width:100%;height:34px;flex:none;font-size:10px;color:var(--fg2);cursor:grab}.tl-preview-head .grow{flex:1}.tl-preview-head button{width:26px;min-height:26px;height:26px;padding:4px}.tl-preview-head>span:first-child{padding-left:3px}
body:not(.bd-full) .bd-tlmode .bd-canvaswrap{margin:auto;pointer-events:none;box-shadow:none}
body:not(.bd-full) .bd-tlmode .bd-rail,body:not(.bd-full) .bd-tlmode .ldock,body:not(.bd-full) .bd-tlmode .bd-tbar,body:not(.bd-full) .bd-tlmode .rot-reset{display:none!important}
body:not(.bd-full) .bd-tlmode.preview-collapsed .bd-stage{left:14px;top:calc(100% - var(--preview-footer,44px) - 46px);width:190px;height:36px;padding-bottom:0}
body:not(.bd-full) .bd-tlmode.preview-collapsed .bd-canvaswrap{display:none}
.tl-inner{height:max-content;min-height:100%;box-sizing:border-box}.tl-ruler{position:sticky;top:0;z-index:60;background:var(--bg2);height:28px;box-shadow:0 1px 0 var(--line)}
.tl-ruler>.tl-ph-grip{top:0;z-index:2}.tl-ph{z-index:22;bottom:0}.tl-scroll{overscroll-behavior:contain}
body.bd-full .bd-tlmode .bd-stage{position:relative;inset:auto;width:auto;flex:1;border:0;border-radius:0;box-shadow:none;padding:0}
.coverage-head{flex-wrap:wrap;gap:8px}.coverage-head>h4:empty{display:none}.coverage-picker-top .coverage-head h4{flex-basis:100%}
.coverage-mode-switch{display:flex;flex:1}.coverage-mode-switch button{flex:1;justify-content:center}.coverage-mode-switch button.on{background:var(--accentbg);color:var(--accent)}
.coverage-all-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.coverage-all-grid>h4{grid-column:1/-1;font-size:11px;margin:12px 0 0;color:var(--fg2);line-height:1.4}
.coverage-board-card{display:flex;flex-direction:column;align-items:stretch;padding:6px;gap:6px;min-width:0;border-radius:12px;background:var(--bg2);border:1px solid var(--line);overflow:hidden}
.coverage-board-card img{width:100%;aspect-ratio:16/9;object-fit:contain;border-radius:7px;background:var(--bg)}.coverage-board-label{border-radius:7px;color:white;font-size:10px;padding:4px}.coverage-board-card small{font-size:10px;color:var(--fg2)}.coverage-board-card.muted{opacity:.55}.coverage-board-card.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accentbg)}
body:not(.focus) .sp-side{margin:10px 10px 10px 0;border:1px solid var(--line);border-radius:14px;background:var(--bg);overflow:hidden;box-shadow:inset 0 1px 0 var(--bg2)}
.sp-workspace-label{display:flex;align-items:center;gap:6px;padding:11px 15px 5px;font:600 10px system-ui;letter-spacing:.07em;text-transform:uppercase;color:var(--fg2);background:var(--bg2)}.sp-workspace-label>span{display:flex}
.sp-side>.toolbar{background:var(--bg2)}.sp-file-picker{align-items:stretch;text-align:left;padding:24px!important}.sp-file-picker>input{width:100%;margin:8px 0 16px}.sp-file-picker .sp-list{max-width:none;width:100%}.sp-file-picker .sp-list button{background:var(--bg2);border:1px solid var(--line);border-radius:10px;margin-bottom:6px;padding:10px;text-align:left}.sp-file-picker .sp-list button:hover{border-color:var(--accent);background:var(--accentbg)}
body:not(.bd-full) .bd-tlmode .bd-ldock{display:none!important}
.panel-picker-guide{position:sticky;top:-14px;z-index:24;padding:14px;margin:10px 0;border:1px solid color-mix(in srgb,var(--panel-colour) 35%,var(--line));border-radius:12px;background:var(--bg2);box-shadow:var(--sh1)}
.panel-picker-guide>b{font-size:12px}.panel-picker-guide p{font-size:12px;line-height:1.5;color:var(--fg2);margin:8px 0 12px}.panel-picker-guide .primary{font-size:12px;white-space:normal;justify-content:center}.panel-picker-guide .tool{margin-left:5px;font-size:11px}.panel-picker-guide button:disabled{opacity:.45}.panel-pick-handles{z-index:18}
.pictures-body{flex:1;min-height:0}.pictures-gallery{padding:24px;overflow:auto;flex:1}.pictures-intro{font-size:13px;color:var(--fg2);margin:0 0 22px}.pictures-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px}
.picture-tile{display:flex;flex-direction:column;align-items:stretch;gap:7px;min-width:0;overflow:hidden;padding:9px;border:1px solid var(--line);border-radius:14px;background:var(--bg2);text-align:left}.picture-tile img{width:100%;height:150px;object-fit:contain;border-radius:9px;background:var(--bg)}.picture-tile b,.picture-tile small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.picture-tile small{color:var(--fg2);font-size:10px}.picture-tile:hover,.picture-tile.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accentbg)}
.pictures-empty{grid-column:1/-1;text-align:center;max-width:440px;margin:60px auto;color:var(--fg2)}.pictures-empty p{line-height:1.6}.pictures-empty>span{color:var(--accent)}.pictures-preview{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;gap:16px;padding:24px}.picture-preview{max-width:100%;min-height:0;object-fit:contain;flex:1}
.picture-editing .bd-stage{flex:1;min-height:0}.picture-editing .tl-preview-head{display:none}.pictures-section{display:flex;align-items:center;gap:7px;color:inherit;font-size:inherit;letter-spacing:inherit;text-transform:inherit}
.picture-picker{width:min(780px,90vw)!important;max-width:90vw}.picture-picker>input{width:100%;margin-bottom:16px}.picture-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;max-height:45vh;overflow:auto;padding:3px;margin-bottom:18px}.picture-picker .picture-tile img{height:96px}.picture-picker .actions{flex-wrap:wrap}.picture-picker .grow{flex:1}
.character-workspace-body{flex:1;min-height:0;overflow:auto;background:var(--bg);padding:24px}.character-workspace-body>.cp-page{max-width:1000px;margin:0 auto;background:var(--bg2);border:1px solid var(--line);border-radius:18px;padding:28px;gap:14px}.character-workspace-body .cp-head{gap:20px}.character-workspace-body .cp-name{flex:1}.character-workspace-body .cp-sec{padding-top:16px;border-top:1px solid var(--line)}
.picture-edit-controls{display:none}.picture-editing .picture-edit-controls{display:flex;gap:4px}
.drawing-preferences{border:1px solid var(--line);border-radius:12px;padding:14px}.drawing-preferences>summary{font-weight:600;cursor:pointer}.drawing-preferences>.f{margin-top:14px}.drawing-palette-swatches{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px}.drawing-palette-swatches input{width:32px;height:32px;min-width:0;padding:2px;border-radius:8px;cursor:pointer}.drawing-tool-preference{border-top:1px solid var(--line);padding:10px 0}.drawing-tool-preference>summary{font-size:12px;cursor:pointer;color:var(--fg2)}.drawing-size-presets{display:flex;gap:10px;margin-top:10px}.drawing-size-presets label{flex:1}.drawing-size-presets input{width:100%;min-width:0}
/* Faded player controls keep stationary hit targets; approaching or touching them reveals them immediately. */
.board-watch .watch-option{min-height:44px;min-width:88px;padding:10px 16px}
.board-watch .watch-head>.icon,.board-watch .watch-controls>button{min-width:44px;min-height:44px;width:44px;height:44px}
.board-watch .watch-controls input{min-height:36px}
.board-watch .watch-head{transition:opacity .15s;transform:none!important}
.board-watch.idle .watch-head,.board-watch.idle .watch-controls{pointer-events:auto;transform:none}
.board-watch .watch-controls{transition:opacity .15s;bottom:20px!important}
/* Timeline sizing is a stable right-hand cluster. Generous native range hit areas preserve click-and-drag input. */
.tl-sizing-controls{display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto}
.tl-sizing-controls .tl-audio-size,.tl-sizing-controls .tl-zoom-control{margin-left:0;padding:0 8px;min-height:36px;gap:8px}
.tl-sizing-controls .tl-audio-size>span{display:flex;flex:none}
.tl-sizing-controls input[type=range]{width:110px!important;max-width:none;min-height:36px;height:36px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;cursor:pointer;touch-action:none;accent-color:var(--accent);flex:none}
/* A compact rounded cap marks the exact time; its invisible 32px target remains centred on the full-height line. */
.tl-ruler>.tl-ph-grip{width:32px;height:28px;top:0;transform:translateX(-50%);clip-path:none;border-radius:0;background:linear-gradient(var(--err),var(--err)) center bottom/2px 11px no-repeat;touch-action:none}
.tl-ph-grip::before{content:'';position:absolute;top:3px;left:50%;transform:translateX(-50%);width:12px;height:18px;border-radius:4px;background:var(--err);box-shadow:0 1px 2px #0002,inset 0 1px 0 #ffffff40;transition:box-shadow .12s}
.tl-ph-grip::after{content:'';position:absolute;top:8px;left:50%;transform:translateX(-50%);width:2px;height:7px;border-radius:1px;background:#ffffffb8;pointer-events:none}
.tl-ph-grip:hover::before,.tl-ph-grip:active::before{box-shadow:0 0 0 3px color-mix(in srgb,var(--err) 15%,transparent),0 1px 2px #0002,inset 0 1px 0 #ffffff40}
.tl-ph{transform:translateX(-1px)}
/* Preview controls stay compact while their tooltips and accessible labels explain each icon. */
body:not(.bd-full) .bd-tlmode .tl-preview-head button{width:30px;min-width:30px;min-height:30px;height:30px;padding:6px;flex:none}
.tl-preview-head button svg{width:16px;height:16px}.tl-preview-head>span:first-child{font-size:10px}
body:not(.bd-full) .bd-tlmode .bd-stage.preview-dragging{transition:none}
body:not(.bd-full) .bd-tlmode.preview-collapsed .tl-preview-head{cursor:default}
@media(prefers-reduced-motion:reduce){body:not(.bd-full) .bd-tlmode .bd-stage{transition:none}}

/* A project library indexes existing packages without changing their locations. */
.pj-libraries{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 18px}.pj-library{display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--bg2);border-radius:14px;padding:8px 10px}.pj-library small{color:var(--fg3)}.pj-library b{max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
