/* Video editor. Two states: the start screen, a card on the page like every tool; and editing, when the editor takes
   the whole window as its own app: panels as cards on the site's paper, a top bar, a resizable side panel, the
   preview, the controls, a resizable timeline. Everything sized by the window, nothing by a fixed number: inside
   the app the window is the frame, which the app sizes to its own window. */
.ve { display: grid; gap: 14px; --ve-side: clamp(250px, 23vw, 340px); --ve-tl: clamp(150px, 34vh, 320px); }

/* ------------------------------------------------------------------ the start screen */
.ve-start { display: grid; gap: 22px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-frame); box-shadow: var(--shadow-frame); }
.ve-drop { display: grid; justify-items: center; gap: 8px; padding: 56px 20px; border: 1.5px dashed rgba(14, 8, 7, 0.24); border-radius: 22px; text-align: center; cursor: pointer; transition: border-color var(--t) var(--ease), background var(--t) var(--ease); }
.ve-drop:hover, .ve-drop.is-over { border-color: var(--ink); background: var(--paper-2); }
.ve-drop-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; margin-bottom: 6px; }
.ve-drop-icon svg { width: 22px; height: 22px; }
.ve-drop b { font: 600 18px/1.3 var(--sans); }
/* the Media panel's box while the project has no files; the whole workspace takes a drop too */
.ve-drop-side { padding: 22px 14px; gap: 4px; border-radius: 14px; }
.ve-drop-side .ve-drop-icon { width: 36px; height: 36px; margin-bottom: 2px; }
.ve-drop-side .ve-drop-icon svg { width: 18px; height: 18px; }
.ve-drop-side b { font-size: 14px; }
.ve-drop-side small { font: 400 12.5px/1.4 var(--sans); color: var(--muted); }
#ve-app.is-over { outline: 2px dashed var(--ink); outline-offset: -6px; }
.ve-drop small { color: var(--muted); font-size: 13.5px; max-width: 44ch; }
.ve-start-ways { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ve-start-ways li { display: grid; gap: 4px; padding: 14px 16px; background: var(--paper-2); border-radius: 16px; font: 400 13.5px/1.4 var(--sans); color: var(--muted); }
.ve-start-ways b { font: 600 14px/1.3 var(--sans); color: var(--ink); }
.ve-recent, .ve-resume { display: grid; gap: 10px; padding: 14px 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; font: 500 14px/1.4 var(--sans); }
.ve-resume { display: flex; flex-wrap: wrap; align-items: center; }
.ve-recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ve-recent-list li { display: flex; align-items: center; gap: 10px; }
.ve-recent-list button { flex: 1; text-align: left; display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: 500 13.5px/1.3 var(--sans); cursor: pointer; }
.ve-recent-list button:hover { border-color: var(--ink); }
.ve-recent-list button small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.ve-recent-list button.ve-ib { flex: 0 0 auto; }
.ve-foot-note { margin: 0; text-align: center; font: 400 13px/1.4 var(--sans); color: var(--muted); }
.ve-error { margin: 0; }
.ve-error.is-note { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }   /* a nudge, not a failure */

/* ------------------------------------------------------------------ editing: the window is the editor */
.ve.is-editing { position: fixed; inset: 0; z-index: 60; display: block; padding: 12px; background: var(--paper-2); overflow: hidden; }
.ve.is-editing .ve-start, .ve.is-editing .ve-foot-note, .ve.is-editing .ve-small, .ve.is-editing .ve-error { display: none !important; }
/* what the editor has to say: a card under the bar, over the preview and clear of the timeline; a click puts it away */
.ve.is-editing .ve-error.is-on { display: block !important; position: fixed; left: 50%; top: 68px; transform: translateX(-50%); z-index: 70; box-sizing: border-box; max-width: min(560px, calc(100% - 40px)); padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-frame); font-weight: 500; cursor: pointer; }
body.ve-editing { overflow: hidden; }
body.ve-editing .nav-wrap { display: none; }
.app-frame .ve.is-editing { position: relative; inset: auto; height: calc(100vh - 8px); min-height: 520px; padding: 0; }
/* fullscreen: the editor's root takes the screen, on the site and inside the app's frame alike */
.ve.is-editing:fullscreen, .app-frame .ve.is-editing:fullscreen { position: fixed; inset: 0; height: auto; padding: 12px; background: var(--paper-2); }
.ve-ib[aria-pressed="true"] { background: var(--ink); color: #fff; }

.ve-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(14, 8, 7, 0.04); min-width: 0; min-height: 0; }
.ve-app { display: grid; grid-template-rows: auto minmax(0, 1fr) 10px var(--ve-tl); gap: 6px; height: 100%; min-height: 0; color: var(--ink); }

/* the top bar */
.ve-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 12px; }
.ve-bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ve-back { padding: 7px 10px; }
.ve-name { min-width: 0; width: min(260px, 100%); text-overflow: ellipsis; padding: 7px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; font: 600 14px/1.3 var(--sans); color: var(--ink); }
.ve-name:hover, .ve-name:focus { border-color: var(--line); background: var(--paper-2); outline: none; }
.ve-bar-mid { display: flex; gap: 2px; }
.ve-bar-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 0; }

/* controls in the site's shapes */
.ve-ib { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; font: 500 18px/1 var(--sans); }
.ve-ib:hover { background: var(--paper-2); }
.ve-ib[disabled] { opacity: 0.3; cursor: default; }
.ve-ib.is-on { background: var(--ink); color: #fff; }
.ve-ib svg { width: 18px; height: 18px; }
.ve-ib-s { width: 30px; height: 30px; font-size: 16px; }
.ve-ib-s svg { width: 15px; height: 15px; }
.ve-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: var(--pill); border: 1px solid rgba(0, 0, 0, 0.32); background: transparent; color: var(--ink); font: 600 13.5px/1 var(--sans); cursor: pointer; white-space: nowrap; transition: border-color var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease); }
.ve-btn:hover { border-color: var(--ink); }
.ve-btn.ve-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.ve-btn.ve-primary:hover { background: #000; }
.ve-btn.ve-quiet { border-color: transparent; color: var(--muted); }
.ve-btn.ve-quiet:hover { color: var(--ink); background: var(--paper-2); }
.ve-btn.ve-wide { width: 100%; padding: 14px 16px; font-size: 15px; }
.ve-btn.ve-btn-s { padding: 7px 12px; font-size: 12.5px; }
.ve-link { font: 500 13px/1.3 var(--sans); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; }
.ve-link:hover { color: var(--ink); }
.ve-seg button { padding: 6px 10px; font-size: 12.5px; }
.ve-h { margin: 10px 0 2px; font: 600 11.5px/1.2 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ve-h:first-child { margin-top: 0; }
.ve-hint { margin: 0; font: 400 13px/1.45 var(--sans); color: var(--muted); }
.ve-meta { font: 400 12.5px/1.3 var(--sans); color: var(--muted); }
.ve-working { display: grid; gap: 8px; }
.ve-working .bar i { background: var(--ink); transition: width var(--t-slow) var(--ease); }
.ve-working small { color: var(--muted); font-size: 13px; }

/* fields: one column, values at the right, nothing wider than its panel */
.ve-field { display: grid; gap: 6px; min-width: 0; font: 500 13px/1.3 var(--sans); color: var(--ink); }
.ve-field > span { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-weight: 500; }
.ve-field > span b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ve-field textarea, .ve-field select { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 500 13.5px/1.35 var(--sans); color: var(--ink); }
.ve-field textarea { min-height: 72px; resize: vertical; }
.ve-field input[type="range"] { width: 100%; min-width: 0; margin: 4px 0; accent-color: var(--ink); }
.ve-field input[type="color"] { width: 44px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; }
.ve-field input[type="number"] { width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: 500 13.5px/1.35 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.ve-field textarea, .ve-field select { box-sizing: border-box; }
.ve-swatch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start; }
.ve-swatch .ve-check { font-weight: 400; }
.ve-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.ve-two > * { min-width: 0; }
.ve-check { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1.3 var(--sans); }

/* the side panel: media and the clip */
.ve-body { display: grid; grid-template-columns: var(--ve-side) 10px minmax(0, 1fr); min-height: 0; }
.ve-side { display: grid; grid-template-rows: auto minmax(0, 1fr); container-type: inline-size; }
.ve-tabs { display: grid; grid-auto-flow: column; gap: 2px; margin: 10px 12px 0; padding: 3px; background: var(--paper-2); border-radius: 10px; }
.ve-tabs button { padding: 7px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 600 13px/1 var(--sans); cursor: pointer; }
.ve-tabs button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(14, 8, 7, 0.08); }
.ve-media-home, .ve-media-sub { display: grid; gap: 12px; align-content: start; }
.ve-add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.ve-add { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: 600 12.5px/1 var(--sans); cursor: pointer; transition: border-color var(--t) var(--ease), background var(--t) var(--ease); }
.ve-add:hover { border-color: var(--ink); background: var(--paper-2); }
.ve-add svg { width: 20px; height: 20px; }
.ve-count { font-weight: 500; text-transform: none; letter-spacing: 0; }
.ve-sub-head { display: flex; align-items: center; gap: 8px; }
.ve-sub-head .ve-ib { margin-left: auto; }
.ve-crumbs { display: flex; flex-wrap: wrap; gap: 4px; }
.ve-crumbs button { border: 0; background: none; padding: 2px 6px; border-radius: 6px; font: 500 12.5px/1.4 var(--sans); color: var(--muted); cursor: pointer; }
.ve-crumbs button:hover { background: var(--paper-2); color: var(--ink); }
.ve-crumbs button:disabled { color: var(--ink); font-weight: 600; cursor: default; }
.ve-crumbs button + button::before { content: '/'; margin-right: 6px; color: var(--muted); font-weight: 400; }
.ve-sub-head b { font: 600 14px/1.3 var(--sans); }
.ve-select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: 500 12.5px/1 var(--sans); color: var(--ink); }
.ve-pane { overflow: auto; min-height: 0; padding: 14px 14px 28px; display: grid; gap: 14px; align-content: start; scrollbar-width: thin; scrollbar-gutter: stable; }
.ve-bin { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ve-bin-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: grab; user-select: none; touch-action: none; }
.ve-bin-item:hover { border-color: var(--ink); }
.ve-bin-item.is-dragging { opacity: 0.5; }
.ve-bin-thumb { width: 64px; height: 40px; border-radius: 8px; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); font: 600 11px/1 var(--sans); overflow: hidden; }
.ve-bin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ve-bin-text { display: grid; gap: 2px; min-width: 0; }
.ve-bin-text b { font: 600 13px/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ve-bin-text small { font: 400 12px/1.3 var(--sans); color: var(--muted); }
.ve-bin-acts { display: flex; gap: 2px; }
.ve-inspector { display: grid; gap: 12px; min-width: 0; }
.ve-inspector-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.ve-inspector-title b { font: 600 14px/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ve-inspector-title small { color: var(--muted); font: 400 12px/1.3 var(--sans); white-space: nowrap; }
.ve-inspector-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ve-inspector-acts .ve-btn { padding: 8px 12px; font-size: 13px; background: var(--paper-2); color: var(--ink); }
/* the panel's sections: a row to open each, one open to begin with */
.ve-sec { border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.ve-sec > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; font: 600 13px/1.2 var(--sans); color: var(--ink); cursor: pointer; list-style: none; border-radius: 12px; user-select: none; }
.ve-sec > summary::-webkit-details-marker { display: none; }
.ve-sec > summary::after { content: ""; width: 7px; height: 7px; flex: 0 0 auto; margin-right: 3px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform var(--t) var(--ease); }
.ve-sec[open] > summary::after { transform: rotate(45deg); }
.ve-sec > summary:hover { background: var(--paper-2); }
.ve-sec-body { display: grid; gap: 12px; padding: 4px 12px 14px; min-width: 0; }
@container (max-width: 300px) { .ve-two { grid-template-columns: 1fr; } .ve-bin-item { grid-template-columns: 48px minmax(0, 1fr) auto; } .ve-bin-thumb { width: 48px; height: 30px; } }

/* captions: three ways in, the account card, the looks and the lines */
.vc-ways { display: grid; gap: 8px; }
.vc-way { display: grid; gap: 3px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); cursor: pointer; transition: border-color var(--t) var(--ease); }
.vc-way:hover { border-color: var(--ink); }
.vc-way b { font: 600 14px/1.3 var(--sans); }
.vc-way small { font: 400 12.5px/1.4 var(--sans); color: var(--muted); }
.vc-way[disabled] { opacity: 0.5; cursor: wait; }
.ve.is-editing .turnstile-slot { position: fixed; right: 16px; bottom: 16px; z-index: 65; }

/* the resizers */

/* the preview and the controls */
.ve-centre { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; min-width: 0; min-height: 0; }
.ve-stage-card { display: grid; min-height: 0; padding: 14px; overflow: auto; scrollbar-width: thin; }
/* the stage cuts off what reaches past it, so the frame of a clip larger than the picture never makes the panel scroll */
.ve-stage { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; overflow: clip; }
.ve-stage canvas { max-width: 100%; max-height: 100%; background: #000; border-radius: 10px; box-shadow: 0 8px 30px rgba(14, 8, 7, 0.12); }
.ve-stage.is-zoomed { place-items: start; width: max-content; height: max-content; margin: auto; }
.ve-stage.is-zoomed canvas { max-width: none; max-height: none; }
.ve-stage canvas { touch-action: none; }
/* the selected clip on the preview: a frame to drag, corners to resize, lines for the middle of the picture */
.ve-frame { position: absolute; left: 0; top: 0; box-sizing: border-box; border: 2px solid var(--yellow); box-shadow: 0 0 0 1px rgba(14, 8, 7, 0.55); pointer-events: none; }
.ve-stage canvas { cursor: default; }
.ve-frame i { pointer-events: auto; touch-action: none; position: absolute; width: 12px; height: 12px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
.ve-frame i[data-corner="nw"] { left: -7px; top: -7px; cursor: nwse-resize; }
.ve-frame i[data-corner="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
.ve-frame i[data-corner="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.ve-frame i[data-corner="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; }
.ve-guide { position: absolute; background: var(--orange); pointer-events: none; }
.ve-guide-x { width: 1px; }
.ve-guide-y { height: 1px; }
.ve-stage-hint { position: absolute; padding: 8px 12px; background: rgba(255, 255, 255, 0.92); border-radius: 10px; font: 500 13px/1.3 var(--sans); color: var(--muted); pointer-events: none; }
.ve-controls { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.ve-play { background: var(--ink); color: #fff; border-radius: 50%; }
.ve-play:hover { background: #000; }
.ve-time { font: 500 12.5px/1 var(--sans); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ve-controls input[type="range"] { flex: 1; min-width: 0; accent-color: var(--ink); }

/* the timeline */
.ve-tl { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; user-select: none; }
.ve-tl-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); min-width: 0; }
.ve-tl-tools { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ve-toggle { margin-left: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--pill); background: transparent; color: var(--muted); font: 600 12px/1 var(--sans); cursor: pointer; }
.ve-toggle.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ve-tl-hint { margin-left: 10px; min-width: 0; font: 400 12px/1.3 var(--sans); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ve-tl-tools:last-child { flex: 0 0 auto; }
.ve-tl-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr); min-height: 0; }
.ve-tl-head { display: grid; grid-template-rows: 28px minmax(0, 1fr); border-right: 1px solid var(--line); min-height: 0; overflow: hidden; }
.ve-tl-corner { border-bottom: 1px solid var(--line); }
.ve-tl-heads { position: relative; overflow: hidden; }
.ve-th { display: flex; align-items: center; gap: 2px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line); box-sizing: border-box; font: 600 12px/1.2 var(--sans); color: var(--ink); }
.ve-th b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ve-th button { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 600 11px/1 var(--sans); cursor: pointer; }
.ve-th button:hover { background: var(--paper-2); color: var(--ink); }
.ve-th button.is-on { background: var(--ink); color: #fff; }
.ve-tl-body { position: relative; overflow: auto; min-height: 0; scrollbar-width: thin; }
.ve-ruler { position: sticky; top: 0; left: 0; z-index: 3; display: block; height: 28px; background: #fff; border-bottom: 1px solid var(--line); }
.ve-tracks { position: relative; min-width: 100%; }
.ve-track { position: relative; box-sizing: border-box; border-bottom: 1px solid var(--line); }
.ve-track.is-locked { background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(14, 8, 7, 0.04) 8px 10px); }
.ve-track.is-drop { background: rgba(37, 86, 182, 0.08); }
.ve-clip { position: absolute; top: 4px; bottom: 4px; box-sizing: border-box; border-radius: 8px; border: 1px solid rgba(14, 8, 7, 0.22); overflow: hidden; cursor: grab; background: var(--sky); color: var(--ink); touch-action: none; }
.ve-clip.k-audio { background: var(--olive); }
.ve-clip.k-text { background: var(--yellow); }
.ve-clip.k-captions { background: #bfe6d3; }
.ve-clip.is-selected { border: 2px solid var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.ve-clip.is-refused { animation: ve-shake 0.3s; border-color: var(--orange); }
.ve-clip.is-ghost { opacity: 0.6; pointer-events: none; z-index: 5; }
.ve-clip-strip { position: absolute; inset: 0; display: flex; overflow: hidden; opacity: 0.85; }
.ve-clip-strip img { height: 100%; width: auto; flex: 0 0 auto; }
.ve-clip-wave { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.ve-clip-label { position: absolute; left: 8px; top: 3px; right: 8px; font: 600 11.5px/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 4px rgba(255, 255, 255, 0.9), 0 0 2px #fff; pointer-events: none; }
.ve-clip-h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.ve-clip-h.l { left: 0; } .ve-clip-h.r { right: 0; }
.ve-clip.is-selected .ve-clip-h::after { content: ""; position: absolute; top: 30%; bottom: 30%; left: 3px; width: 2px; border-radius: 2px; background: var(--ink); }
/* where a dragged clip will go in between the others */
.ve-insert { position: absolute; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--ink); z-index: 6; pointer-events: none; }
.ve-playhead { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--orange); z-index: 4; pointer-events: none; }
.ve-playhead i { position: absolute; top: 0; left: -7px; border: 6px solid transparent; border-top: 8px solid var(--orange); }
@keyframes ve-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* the export sheet */
.ve-sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(14, 8, 7, 0.4); backdrop-filter: blur(4px); }
.ve-sheet-box { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; color: var(--ink); border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.35); }
.ve-sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 10px 20px; font: 600 16px/1.2 var(--sans); }
.ve-export-body { display: grid; gap: 18px; padding: 6px 22px 24px; }
.ve-export-done { display: grid; gap: 10px; }
.ve-export-done video { width: 100%; max-height: 320px; background: #000; border-radius: 12px; }
.ve-export-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* narrower and shorter windows: the hint goes, then the bar tightens, before anything overflows */
@media (max-width: 1280px) { .ve-tl-hint { display: none; } }
@media (max-width: 1100px) { .ve-bar { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; } .ve-bar-right { gap: 4px; } .ve-bar-right .ve-btn { padding: 8px 10px; } }
@media (max-height: 760px) { .ve { --ve-tl: clamp(150px, 30vh, 320px); } .ve.is-editing { padding: 8px; } .ve-stage-card { padding: 8px; } .ve-bar, .ve-controls { padding: 5px 10px; } }

/* a desktop tool: on a small screen the workspace gives way to a note */
.ve-small { display: none; gap: 6px; padding: 22px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-frame); box-shadow: var(--shadow-frame); font: 400 14px/1.5 var(--sans); color: var(--muted); }
.ve-small b { font: 600 16px/1.3 var(--sans); color: var(--ink); }
@media (max-width: 900px), (pointer: coarse) and (max-width: 1100px) {
  .ve:not(.is-editing) .ve-small { display: grid; }
  .ve:not(.is-editing) .ve-start { display: none !important; }
}
