/* handy.moe video editor (Tsugime, 2026-12-03). Kirie's look: OLED black, the VGA pixel font, grey inks,
   plain text that doubles as buttons. Colours come from the site's theme variables, so Day mode works too. */
.ve { --ve-w: min(100vw - 24px, 1480px); width: var(--ve-w); margin-left: calc((100% - var(--ve-w)) / 2); background: var(--paper); border: 1px solid var(--rule-2); color: var(--ink); font-family: var(--f-term); font-size: 16px; line-height: 1.5; position: relative; }
.ve * { box-sizing: border-box; }
.ve button, .ve select, .ve input, .ve textarea { font: inherit; }
.ve-b { background: none; border: 0; color: var(--ink-2); padding: 2px 4px; cursor: pointer; min-height: 32px; white-space: nowrap; }
.ve-b:hover, .ve-b:focus-visible { color: var(--fire); }
.ve-b[disabled] { opacity: .4; cursor: default; color: var(--ink-3); }
.ve-b.on { color: var(--fire); }
.ve-add { position: relative; display: inline-flex; align-items: center; }
.ve-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ve-bar, .ve-transport { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 10px; border-bottom: 1px solid var(--rule-2); }
.ve-transport { border-top: 1px solid var(--rule-2); }
.ve-f { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); white-space: nowrap; }
.ve-f select, .ve-f input[type=number], .ve-r select, .ve-r textarea { background: var(--card); color: var(--ink); border: 1px solid var(--rule-2); padding: 2px 4px; min-height: 30px; }
.ve-f input[type=color] { width: 32px; height: 26px; padding: 0; border: 1px solid var(--rule-2); background: none; }
.ve-grow { flex: 1; }
.ve-saved { color: var(--ink-3); }
.ve-seg { display: inline-flex; }
.ve-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.ve-stagebox { position: relative; background: #000; display: grid; place-items: center; min-height: 240px; height: clamp(240px, 52vh, 620px); overflow: hidden; border-right: 1px solid var(--rule-2); }
#ve-stage { max-width: 100%; max-height: 100%; display: block; touch-action: none; background: #000; }
.ve-empty { position: absolute; inset: 12px; display: grid; place-content: center; text-align: center; gap: 8px; border: 2px dashed var(--rule-2); color: #b4b4b4; cursor: pointer; padding: 16px; }
.ve-empty strong { color: #f2f2f2; font-weight: normal; }
.ve-empty input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ve.has-clips .ve-empty { display: none; }
.ve.over .ve-stagebox { outline: 2px solid var(--fire); outline-offset: -2px; }
.ve-side { display: flex; flex-direction: column; min-width: 0; height: clamp(240px, 52vh, 620px); }
.ve-tabs { display: flex; gap: 6px; padding: 4px 8px; border-bottom: 1px solid var(--rule-2); }
.ve-tabs [aria-selected=true] { color: var(--fire); }
.ve-tabs button { background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 4px; }
.ve-pane { padding: 8px 12px 16px; overflow: auto; flex: 1; min-height: 0; }
.ve-hint { color: var(--ink-3); margin: 6px 0; }
.ve-iname { color: var(--fire); margin: 0 0 4px; overflow-wrap: anywhere; }
.ve-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ve fieldset { border: 0; border-top: 1px solid var(--rule-2); margin: 8px 0 0; padding: 6px 0 0; min-width: 0; }
.ve legend { color: var(--ink-3); padding: 0 6px 0 0; }
.ve-r { display: grid; gap: 2px; margin: 4px 0; }
.ve-r > span { color: var(--ink-3); }
.ve-r output { color: var(--fire); }
.ve-r input[type=range] { width: 100%; accent-color: var(--fire); }
.ve-r textarea { width: 100%; resize: vertical; }
.ve-line { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 4px 0; }
.ve-sub { color: var(--ink-3); }
.ve-crop { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ve-crop .ve-sub { grid-column: 1 / -1; }
.ve-bin { list-style: none; margin: 0; padding: 0; }
.ve-bin li { border-bottom: 1px solid var(--rule); padding: 6px 0; overflow-wrap: anywhere; }
.ve-bin .meta { color: var(--ink-3); display: block; }
.ve-bin .miss { color: var(--warn); }
.ve-time { color: var(--ink); min-width: 15ch; font-variant-numeric: tabular-nums; }
.ve-play { color: var(--ink); }
.ve-tlbox { position: relative; overflow: hidden; background: var(--paper); }
#ve-tl { display: block; width: 100%; touch-action: pan-y; cursor: default; }
.ve-keys { color: var(--ink-3); margin: 0; padding: 4px 10px; border-top: 1px solid var(--rule-2); font-size: 16px; }
.ve-status { margin: 0; padding: 0 10px 6px; color: var(--ink-2); min-height: 1.5em; }
.ve-est { border: 1px solid var(--rule-2); padding: 8px; margin: 8px 0; }
.ve-est .big { font-size: 32px; line-height: 1.2; color: var(--fire); display: block; }
.ve-est .fit { color: var(--ok); }
.ve-est .over { color: var(--warn); }
.ve-copy, .ve-f[data-only] { white-space: normal; margin-top: 4px; }
.ve #x-result { border: 1px solid var(--rule-2); padding: 8px; margin-top: 8px; }
.ve #x-result video { width: 100%; max-height: 220px; background: #000; margin-top: 6px; }
.ve #x-result table { border-collapse: collapse; width: 100%; }
.ve #x-result td { padding: 1px 6px 1px 0; vertical-align: top; }
.ve #x-result td:first-child { color: var(--ink-3); white-space: nowrap; }
.ve .progress { margin-top: 8px; }
.ve-narrow { display: none; margin: 0; padding: 6px 10px; color: var(--warn); border-bottom: 1px solid var(--rule-2); }
@media (max-width: 900px) {
  /* small screens: picture, play bar, timeline, then the clip panel */
  .ve { display: flex; flex-direction: column; }
  .ve-main { display: contents; }
  .ve-narrow { order: 0; } .ve-bar { order: 1; } .ve-stagebox { order: 2; } .ve-transport { order: 3; } .ve-tlbox { order: 4; } .ve-status { order: 5; } .ve-side { order: 6; border-top: 1px solid var(--rule-2); } .ve-keys { order: 7; }
  .ve-stagebox { border-right: 0; border-bottom: 1px solid var(--rule-2); height: clamp(200px, 40vh, 420px); }
  .ve-side { height: auto; max-height: none; }
  .ve-pane { max-height: 60vh; }
}
@media (max-width: 640px) {
  .ve { --ve-w: calc(100vw - 8px); }
  .ve-narrow { display: block; }
  .ve-stagebox { height: clamp(180px, 60vw, 420px); min-height: 0; }
  .ve-keys { display: none; }
}
