body.editor-page { overflow: hidden; height: 100vh; --tl-h: 300px; user-select: none; }
#app { height: 100vh; display: grid; grid-template-rows: 54px minmax(0, 1fr) 6px var(--tl-h); }
.editor-page input, .editor-page textarea, .editor-page select { user-select: text; }
.editor-page kbd { display: inline-block; font: 600 10.5px/1 var(--mono); padding: 3px 6px; border-radius: 3px; background: var(--panel-3); border: 1px solid var(--border-2); color: var(--text-2); }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--bg-2); min-width: 0; }
.topbar .logo-mark { width: 28px; height: 28px; flex: none; }
.proj-name { background: transparent; border: 1px solid transparent; color: var(--text); font: 600 15px var(--font); padding: 6px 8px; border-radius: 4px; width: 260px; min-width: 80px; outline: none; text-overflow: ellipsis; }
.proj-name:hover { border-color: var(--border-2); }
.proj-name:focus { border-color: var(--accent); background: var(--bg); }
.save-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.save-status svg { width: 14px; height: 14px; }
.save-status[data-s=saved] svg { color: var(--green); }
.save-status[data-s=error] { color: var(--red); }
.upgrade-btn { color: var(--yellow) !important; }
.mobile-only { display: none !important; }

/* Workspace */
.workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; min-height: 0; }
.library, .inspector { background: var(--bg-2); min-height: 0; overflow: hidden; }
.library { border-right: 1px solid var(--border); display: grid; grid-template-columns: 64px minmax(0, 1fr); }
.inspector { border-left: 1px solid var(--border); overflow-y: auto; padding-bottom: 40px; }

/* Library */
.lib-tabs { display: flex; flex-direction: column; gap: 4px; padding: 10px 6px; border-right: 1px solid var(--border); }
.lib-tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font: 600 11px var(--font); cursor: pointer; }
.lib-tabs button svg { width: 20px; height: 20px; }
.lib-tabs button:hover { color: var(--text); background: var(--panel); }
.lib-tabs button.on { color: var(--text); background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); }
.lib-tabs button.on svg { color: var(--accent-2); }
.lib-body { overflow-y: auto; min-height: 0; }
.lib-pane { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.lib-title { display: flex; align-items: center; gap: 8px; }
.lib-title h3 { margin: 0; font-size: 15px; flex: 1; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px; border: 1.5px dashed var(--border-2); border-radius: 6px; cursor: pointer; text-align: center; color: var(--muted); font-size: 12px; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text-2); }
.dropzone svg { width: 22px; height: 22px; color: var(--accent-2); }
.dropzone b { color: var(--text); font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--border-2); background: none; color: var(--text-2); font: 600 12px var(--font); padding: 4px 10px; border-radius: 4px; cursor: pointer; }
.chips button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mitem { min-width: 0; cursor: grab; }
.mitem:active { cursor: grabbing; }
.mthumb { position: relative; aspect-ratio: 16/10; border-radius: 6px; background: var(--panel-2) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--border); overflow: hidden; transition: border-color .15s; }
.mthumb > svg { width: 22px; height: 22px; }
.mthumb.k-audio { background: #1d3a29; color: #8fe0b0; }
.mitem:hover .mthumb { border-color: var(--accent); }
.mdur { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.7); color: #fff; font: 600 10px var(--mono); padding: 1px 5px; border-radius: 3px; }
.mused { position: absolute; left: 6px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #04130c; display: grid; place-items: center; }
.mused svg { width: 11px; height: 11px; stroke-width: 3; }
.madd { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 4px; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: scale(.8); transition: opacity .15s, transform .15s; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.madd svg { width: 16px; height: 16px; stroke-width: 2.6; }
.mitem:hover .madd { opacity: 1; transform: none; }
.mrow { display: flex; align-items: center; gap: 4px; margin-top: 5px; }
.mname { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.mdel { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 3px; opacity: 0; display: grid; }
.mdel svg { width: 13px; height: 13px; }
.mitem:hover .mdel { opacity: 1; }
.mdel:hover { color: var(--red); }
.mitem.uploading { cursor: default; }
.mprog { position: absolute; inset: 0; background: rgba(15,15,13,.76); display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px; font-size: 11px; color: var(--text-2); text-align: center; }
.mprog .progress { height: 5px; }
.lib-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 12px; padding: 18px 6px; }
.lib-usage { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.text-presets { display: grid; grid-template-columns: 1fr; gap: 8px; }
.tpreset { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 74px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; overflow: hidden; padding: 0 10px; }
.tpreset:hover { border-color: var(--accent); }
.tp-sample { font-size: 22px; line-height: 1.1; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tp-name { position: absolute; left: 8px; bottom: 5px; font: 600 9.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatch { aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--border-2); cursor: pointer; transition: transform .12s; }
.swatch:hover { transform: scale(1.05); border-color: #fff; }

/* Stage */
.stage { display: grid; grid-template-rows: minmax(0, 1fr) 52px; min-height: 0; background: var(--stage); }
.stage-area { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; background: var(--stage); }
.stage-area:fullscreen { background: #000; }
.stage-box { position: relative; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.stage-canvas { width: 100%; height: 100%; display: block; background: #000; }
.stage-overlay { position: absolute; inset: 0; overflow: visible; cursor: default; }
.sel-box { position: absolute; left: 0; top: 0; border: 2px solid var(--accent); border-radius: 2px; transform-origin: center; cursor: move; pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.sel-box .hd, .sel-box .rot { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid var(--accent); border-radius: 3px; pointer-events: auto; }
.hd.nw { left: -7px; top: -7px; cursor: nwse-resize; } .hd.ne { right: -7px; top: -7px; cursor: nesw-resize; }
.hd.sw { left: -7px; bottom: -7px; cursor: nesw-resize; } .hd.se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.sel-box .rot { left: calc(50% - 7px); top: -32px; border-radius: 50%; cursor: grab; }
.sel-box .rot::after { content: ''; position: absolute; left: 3px; top: 12px; width: 2px; height: 16px; background: var(--accent); }
.guide { position: absolute; background: #3ee0ff; pointer-events: none; }
.guide.v { left: 50%; top: 0; bottom: 0; width: 1px; }
.guide.h { top: 50%; left: 0; right: 0; height: 1px; }
.stage-buffering { position: absolute; right: 14px; top: 14px; background: rgba(0,0,0,.6); padding: 8px; border-radius: 6px; }
.transport { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 14px; border-top: 1px solid var(--border); background: var(--bg-2); }
.tc { font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.transport-btns { display: flex; align-items: center; gap: 4px; }
.tr-right { justify-self: end; }
.play-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; margin: 0 6px; transition: transform .1s; }
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 18px; height: 18px; }

/* Inspector */
.insp-head { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-2); z-index: 2; }
.insp-kind { width: 34px; height: 34px; border-radius: 6px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.insp-kind svg { width: 18px; height: 18px; }
.insp-sec { padding: 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.insp-sec-title { font: 600 10.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ctl { display: flex; flex-direction: column; gap: 6px; }
.ctl-row { flex-direction: row; align-items: center; gap: 8px; }
.ctl-top { display: flex; justify-content: space-between; font-size: 12px; }
.ctl-label { color: var(--text-2); font-size: 12px; font-weight: 500; }
.ctl-val, .ctl-hex { color: var(--muted); font: 500 11.5px var(--mono); font-variant-numeric: tabular-nums; }
.ctl input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 3px; background: linear-gradient(90deg, var(--text-2) var(--p, 50%), var(--panel-3) var(--p, 50%)); outline: none; cursor: pointer; margin: 4px 0; }
.ctl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ctl input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.ctl input[type=color] { width: 30px; height: 26px; border: 1px solid var(--border-2); border-radius: 4px; padding: 0; background: none; cursor: pointer; }
.ctl input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.ctl input[type=color]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.ctl .input.num { width: 76px; height: 30px; padding: 0 8px; }
.seg { display: flex; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { flex: 1 0 auto; min-width: 0; border: 0; background: none; color: var(--text-2); font: 600 12px var(--font); padding: 6px 6px; border-radius: 4px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.seg button.locked { opacity: .5; }
.seg button svg { width: 12px; height: 12px; }
.switch { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 99px; background: var(--panel-3); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(14px); background: var(--on-accent); }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.preset { border: 0; background: none; color: var(--text-2); font: 600 11px var(--font); cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 0; }
.preset span { aspect-ratio: 16/10; border-radius: 4px; background: linear-gradient(135deg, #f2a65a, #d1495b 55%, #2e6f95) center/cover; border: 2px solid transparent; }
.preset.on span { border-color: var(--accent); }
.preset.on { color: var(--text); }
.aspects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aspect { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 6px; padding: 10px; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; cursor: pointer; text-align: left; font: inherit; }
.aspect i { grid-row: span 2; justify-self: center; border: 2px solid var(--text-2); border-radius: 3px; }
.aspect b { font-size: 13px; }
.aspect span { font-size: 11px; color: var(--muted); }
.aspect.on { border-color: var(--accent); background: var(--accent-soft); }
.aspect.on i { border-color: var(--accent-2); background: var(--accent-soft); }
.shortcuts { display: grid; gap: 6px; font-size: 12px; color: var(--text-2); }
.shortcuts div { display: flex; justify-content: space-between; flex-direction: row-reverse; align-items: center; }

/* Timeline */
.tl-resize { cursor: ns-resize; background: var(--bg-2); border-top: 1px solid var(--border); position: relative; }
.tl-resize::after { content: ''; position: absolute; left: 50%; top: 2px; width: 36px; height: 2px; margin-left: -18px; border-radius: 2px; background: var(--border-2); }
.tl-resize:hover::after { background: var(--accent); }
.timeline { display: grid; grid-template-rows: 44px minmax(0, 1fr); min-height: 0; background: var(--bg-2); }
.tl-toolbar { display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; }
.tl-toolbar .btn { flex: none; }
.tl-sep { width: 1px; height: 20px; background: var(--border-2); margin: 0 4px; flex: none; }
.tl-toggle.on { color: var(--accent-2); background: var(--accent-soft); }
.tl-zoom { width: 110px; accent-color: var(--accent); flex: none; }
.tl-scroll { position: relative; overflow: auto; min-height: 0; }
.tl-content { position: relative; min-height: 100%; }
.tl-ruler-row { position: sticky; top: 0; z-index: 6; display: flex; height: 28px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.tl-corner { position: sticky; left: 0; z-index: 7; width: 176px; flex: none; background: var(--bg-2); border-right: 1px solid var(--border); }
.tl-ruler { position: relative; flex: 1; cursor: pointer; background-image: linear-gradient(90deg, #3a3a4a 1px, transparent 1px); background-repeat: repeat-x; background-position: 0 bottom; background-size: 12px 100%; mask: linear-gradient(#000, #000); }
.tl-ruler { background-image: linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px); background-size: 12px 6px; background-position: 0 100%; }
.tl-tick { position: absolute; top: 0; height: 100%; padding-left: 4px; font: 500 9.5px var(--mono); color: var(--muted); border-left: 1px solid rgba(255,255,255,.28); line-height: 16px; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.tl-ph-handle { position: absolute; left: -6px; bottom: 0; width: 13px; height: 18px; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); z-index: 2; pointer-events: none; }
.tl-rows { position: relative; padding-bottom: 40px; }
.tl-row { display: flex; height: 58px; border-bottom: 1px solid rgba(255,255,255,.04); }
.tl-row.audio { height: 48px; }
.tl-head { position: sticky; left: 0; z-index: 5; width: 176px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 12px; background: var(--bg-2); border-right: 1px solid var(--border); }
.tl-kind { color: var(--muted); display: grid; }
.tl-kind svg { width: 14px; height: 14px; }
.tl-name { font-size: 12px; font-weight: 600; color: var(--text-2); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; }
.tl-acts { display: flex; gap: 1px; }
.tl-acts button { width: 22px; height: 22px; border: 0; background: none; color: var(--muted); border-radius: 3px; display: grid; place-items: center; cursor: pointer; padding: 0; opacity: .55; }
.tl-acts button svg { width: 13px; height: 13px; }
.tl-acts button:hover { opacity: 1; background: var(--panel-2); color: var(--text); }
.tl-acts button.on { opacity: 1; color: var(--yellow); }
.tl-acts button[data-t=delete] { display: none; }
.tl-head:hover .tl-acts button[data-t=delete] { display: grid; }
.tl-lane { position: relative; flex: 1; }
.tl-row.is-hidden .tl-lane, .tl-row.is-locked .tl-lane { opacity: .45; }
.tl-row.is-locked .clip { cursor: not-allowed; }
.clip { position: absolute; top: 5px; bottom: 5px; border-radius: 4px; overflow: hidden; cursor: grab; background: #2f6690; border: 1px solid rgba(255,255,255,.12); color: #fff; transition: box-shadow .12s; }
.clip.k-image { background: #b5532f; }
.clip.k-audio { background: #2f7a4d; color: #b6f0cd; }
.clip.k-text { background: #a8456b; }
.clip.k-color { background: #6e6a5a; }
.clip.missing { background: repeating-linear-gradient(45deg, #5a1a24, #5a1a24 8px, #44141c 8px, #44141c 16px); }
.clip.sel { box-shadow: 0 0 0 2px var(--accent), 0 6px 18px rgba(0,0,0,.5); z-index: 3; }
.clip-bg { position: absolute; inset: 0; }
.clip-bg.film { background-repeat: repeat-x; background-size: auto 100%; opacity: .55; }
.clip-wave { position: absolute; left: 0; top: 18%; width: 100%; height: 76%; color: rgba(182, 240, 205, .85); }
.clip-label { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 5px; padding: 3px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }
.clip-label svg { width: 12px; height: 12px; flex: none; }
.clip-label span { overflow: hidden; text-overflow: ellipsis; }
.clip-label em { font-style: normal; background: rgba(0,0,0,.4); padding: 0 4px; border-radius: 3px; }
.clip-fade { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.clip-fade.in { left: 0; background: linear-gradient(to bottom right, rgba(0,0,0,.55) 50%, transparent 50%); }
.clip-fade.out { right: 0; background: linear-gradient(to bottom left, rgba(0,0,0,.55) 50%, transparent 50%); }
.clip .h { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 2; }
.clip .h.l { left: 0; border-radius: 4px 0 0 4px; }
.clip .h.r { right: 0; border-radius: 0 4px 4px 0; }
.clip.sel .h, .clip:hover .h { background: rgba(255,255,255,.28); }
.clip.sel .h::after, .clip:hover .h::after { content: ''; position: absolute; left: 3px; top: 35%; bottom: 35%; width: 3px; border-radius: 2px; background: #fff; }
body.dragging-clip, body.dragging-clip * { cursor: grabbing !important; }
body.trimming, body.trimming * { cursor: ew-resize !important; }
.tl-playhead { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; z-index: 4; pointer-events: none; box-shadow: 0 0 6px rgba(0,0,0,.6); }
.tl-snap { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--accent); z-index: 4; pointer-events: none; }
.tl-ghost { position: absolute; z-index: 3; pointer-events: none; border: 2px dashed var(--accent-2); background: var(--accent-soft); border-radius: 4px; }
.tl-ghost.newtrack::after { content: 'New track'; position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; color: var(--accent-2); }
.tl-empty { position: absolute; left: 176px; right: 0; top: 28px; bottom: 0; display: grid; place-items: center; pointer-events: none; z-index: 1; }
.tl-empty > div { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }
.tl-empty svg { width: 28px; height: 28px; opacity: .5; margin-bottom: 4px; }
.tl-empty b { color: var(--text-2); }
.menu-pop.ctx { min-width: 220px; z-index: 3000; }
.menu-pop.ctx kbd { margin-left: auto; }
.menu-pop svg { width: 15px; height: 15px; }

/* Drop overlay */
.drop-overlay { position: fixed; inset: 0; z-index: 4000; background: rgba(15,15,13,.8); backdrop-filter: blur(4px); display: grid; place-items: center; pointer-events: none; }
.drop-overlay > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 64px; border: 2px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); color: var(--text-2); }
.drop-overlay svg { width: 40px; height: 40px; color: var(--accent-2); }
.drop-overlay b { font-size: 20px; color: var(--text); }

/* Export */
.export .ex-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 14px 0 6px; }
.export .ex-label:first-child { margin-top: 0; }
.ex-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 12px; }
.ex-summary div { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; font-size: 12px; }
.ex-summary b { font-size: 13px; }
.ex-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; margin-top: 8px; color: var(--text-2); }
.ex-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--accent-2); }
.ex-run { display: flex; flex-direction: column; gap: 10px; }
.ex-preview { border-radius: 6px; overflow: hidden; background: #000; display: grid; place-items: center; max-height: 260px; }
.ex-preview canvas { max-width: 100%; max-height: 260px; width: auto; height: auto; }
.ex-done video { width: 100%; max-height: 300px; background: #000; border-radius: 6px; margin-top: 14px; }
.ex-done .ex-gif-out { display: block; max-width: 100%; max-height: 300px; margin: 14px auto 0; border-radius: 6px; background: #000; }
.ex-success { display: flex; gap: 12px; align-items: center; }
.ex-success > svg { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); flex: none; }

@media (max-width: 1200px) {
  .workspace { grid-template-columns: 260px minmax(0, 1fr) 270px; }
  .proj-name { width: 180px; }
}
@media (max-width: 900px) {
  body.editor-page { --tl-h: 240px !important; }
  .workspace { grid-template-columns: minmax(0, 1fr); position: relative; }
  .library, .inspector { position: absolute; top: 0; bottom: 0; z-index: 20; width: min(320px, 88vw); box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .2s; }
  .library { left: 0; }
  .inspector { right: 0; transform: translateX(105%); }
  body.show-lib .library, body.show-insp .inspector { transform: none; }
  .mobile-only { display: inline-flex !important; }
  .save-status span, .upgrade-btn span, .plan-badge, .export-btn span { display: none; }
  .proj-name { width: 120px; }
  .tl-head { width: 110px; }
  .tl-corner { width: 110px; }
  .tl-empty { left: 110px; }
  .tl-toolbar .btn span { display: none; }
}
