/* Шкала времени (телефон и компьютер): линейка, курсор, прилипание */
.ruler2{position:relative;order:-1;height:22px;flex:none;border-bottom:1px solid #3a3a3a;cursor:ew-resize;touch-action:none;user-select:none}
.ruler2 span{position:absolute;top:2px;height:16px;padding-left:3px;border-left:1px solid #777;font:10px ui-monospace,Consolas,monospace;color:#9a9a9a;white-space:nowrap;pointer-events:none}
.ruler2 i{position:absolute;bottom:0;width:1px;height:5px;background:#5a5a5a;pointer-events:none}
#timeline #playhead{position:absolute;top:0;bottom:0;height:auto;width:2px;margin-left:-1px;background:#ff3366;z-index:4;cursor:ew-resize;touch-action:none}
#timeline #playhead::before{content:'';display:block!important;position:absolute;top:0;left:-5px;width:12px;height:11px;background:#ff3366;border-radius:2px 2px 6px 6px}
.snapline{position:absolute;top:0;bottom:0;width:1px;background:#fab005;z-index:5;pointer-events:none}
.block.dragging{opacity:.88;z-index:3;box-shadow:0 4px 14px rgba(0,0,0,.35)}
.block.picked{outline:2px solid #fff;outline-offset:-2px}
#ttools,#props,#tc{display:none}

/* Компьютер: светлая тема и раскладка в духе OpenCut.
   Слева инструменты и их панель, по центру кадр, справа свойства выбранного, снизу шкала. */
body.desk{overflow:hidden;background:#f1f1f3;color:#18181b}
body.desk .studio{width:100%;max-width:none;margin:0;padding:8px;gap:8px;box-sizing:border-box;background:#f1f1f3;
  grid-template-columns:72px 340px minmax(0,1fr) 300px;grid-template-rows:44px minmax(0,1fr) 44px 290px;
  grid-template-areas:"head head head head" "tools panel stage props" "tools panel transport props" "deck deck deck deck"}
body.desk .head{grid-area:head;display:flex;align-items:center;gap:10px;padding:0 6px;background:transparent;color:#18181b}
body.desk .head h1{flex:1;text-align:left;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.desk .head button{color:#18181b}
body.desk .head #projects{font-size:28px;min-width:32px}
body.desk .head #jobChip{position:static;color:#be123c}
body.desk #export{display:flex;align-items:center;gap:6px;background:#18181b;color:#fff;border-radius:8px;padding:0 14px;height:34px;min-height:0}
body.desk #export svg{width:16px;height:16px;margin:0}
body.desk #export::after{content:'Экспорт';font:600 13px Inter,"Segoe UI",sans-serif}
body.desk .stage{grid-area:stage;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #e4e4e7;border-bottom:0;border-radius:12px 12px 0 0;padding:10px}
body.desk .stage canvas{width:auto;height:auto;max-width:100%;max-height:100%;border-radius:4px;box-shadow:0 1px 6px rgba(0,0,0,.12)}
body.desk .transport{grid-area:transport;background:#fff;border:1px solid #e4e4e7;border-top:0;border-radius:0 0 12px 12px;padding:0 10px}
body.desk .transport button{color:#18181b;font-size:20px}
body.desk #tc{display:inline;margin-left:10px;font:12px ui-monospace,Consolas,monospace;color:#2563eb}
body.desk #ribbon{grid-area:tools;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:2px;padding:8px 6px;overflow-y:auto;background:#fff;border:1px solid #e4e4e7;border-radius:12px}
body.desk #ribbon button{flex:0 0 58px;width:100%;border-radius:8px;color:#52525b;font-size:10px}
body.desk #ribbon svg{color:#27272a;width:20px;height:20px}
body.desk #ribbon button:hover{background:#f4f4f5}
body.desk #ribbon button.active{background:#f4f4f5;color:#18181b;box-shadow:inset 0 0 0 1.5px #18181b}
body.desk #drawer{position:fixed;top:60px;left:88px;bottom:auto;right:auto;width:340px;height:calc(100dvh - 366px);max-width:none;max-height:none;margin:0;
  padding:12px 14px;box-sizing:border-box;border:1px solid #e4e4e7;border-radius:12px;overflow:auto;z-index:5;background:#fff;color:#18181b}
body.desk #drawer .sheethead{background:#fff}
body.desk #dismiss{display:none}
body.desk #props{grid-area:props;display:block;background:#fff;border:1px solid #e4e4e7;border-radius:12px;padding:12px 14px;overflow:auto;font-size:13px}
body.desk #props h3{margin:0 0 8px;font-size:14px}
body.desk #props h4{margin:16px 0 4px;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#71717a}
body.desk .pf{display:grid;grid-template-columns:minmax(0,1fr) 52px;align-items:center;gap:4px 8px;margin:10px 0;color:#3f3f46;font-size:12.5px}
body.desk .pf>span{grid-column:1/-1}
body.desk .pf>output{font:11px ui-monospace,Consolas,monospace;color:#71717a;text-align:right}
body.desk .pf>select,body.desk .pf>textarea,body.desk .pf>input[type=number],body.desk .pf>input[type=color]{grid-column:1/-1;width:100%;box-sizing:border-box}
body.desk .pf:has(>input[type=checkbox]){grid-template-columns:minmax(0,1fr) auto}
body.desk .pf:has(>input[type=checkbox])>span{grid-column:1}
body.desk #props button{display:block;width:100%;margin-top:10px;padding:9px;border-radius:8px}
body.desk .deck{grid-area:deck;display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:40px minmax(0,1fr);gap:0 10px;min-height:0;overflow:hidden;
  padding:0 12px 8px;background:#fff;border:1px solid #e4e4e7;border-radius:12px}
body.desk #ttools{display:flex;grid-column:1/-1;align-items:center;gap:2px;border-bottom:1px solid #f0f0f2}
body.desk #ttools button{background:transparent;border:0;color:#3f3f46;font-size:12.5px;padding:6px 10px;border-radius:7px;min-height:0}
body.desk #ttools button:hover{background:#f4f4f5}
body.desk #ttools button.on{background:#eef2ff;color:#3730a3}
body.desk .ttgap{flex:1}
body.desk #addClip{margin-top:12px}
body.desk .tracks{min-height:0;display:flex;flex-direction:column}
body.desk #scrolltime{flex:1;max-height:none;min-height:0;height:auto;overflow:auto;margin-top:8px;background:#fafafa;border-radius:8px;border:1px solid #f0f0f2}
body.desk #seek,body.desk #clock{display:none}
body.desk .ruler2{border-bottom-color:#e4e4e7;background:#fff}
body.desk .ruler2 span{color:#71717a;border-left-color:#d4d4d8}
body.desk .ruler2 i{background:#d4d4d8}
body.desk .lane{background:#f1f1f3;border-radius:6px;margin:4px 0 0}
body.desk .block{color:#fff;border-radius:6px;font-weight:600}
body.desk .block::before,body.desk .block::after{background:rgba(255,255,255,.7)}
body.desk .block.picked{outline:2px solid #18181b;outline-offset:1px}
body.desk .lane[data-kind=clips],body.desk .lane[data-kind=clips] .block{height:62px}
body.desk #timeline .lane:not([data-kind=clips]),body.desk #timeline .lane:not([data-kind=clips]) .block{height:22px;min-height:22px;font-size:11px}
/* Поля и кнопки в светлых панелях и окнах */
body.desk dialog{background:#fff;color:#18181b;border-color:#e4e4e7}
body.desk select,body.desk textarea,body.desk input[type=text],body.desk input[type=number],body.desk .card,body.desk dialog button,body.desk #props button{background-color:#fff;color:#18181b;border:1px solid #e4e4e7}
body.desk .card{background:#fafafa}
body.desk .hint,body.desk label,body.desk dialog p{color:#52525b}
body.desk .primary,body.desk #props .primary,body.desk dialog .primary{background:#18181b;color:#fff;border:0}
body.desk input[type=range],body.desk input[type=checkbox]{accent-color:#18181b}
body.desk h2{color:#18181b}
body.desk #status{bottom:310px;background:#18181bf0;color:#fff}
body.desk #upbar{left:auto;right:24px;width:420px;bottom:310px}
body.desk #exports{background:#fafafa}

#gate{position:fixed;inset:0;z-index:90;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center;background:#141414;color:#f4f4f5;font:16px/1.5 Inter,"Segoe UI",sans-serif}
#gate[hidden]{display:none}
#gate p{max-width:460px;color:#d4d4d8}
