
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 400; font-display: swap; src: url(../doc/fonts/caveat.woff2) format("woff2"); }
@font-face { font-family: "Dancing Script"; font-style: normal; font-weight: 400; font-display: swap; src: url(../doc/fonts/dancing-script.woff2) format("woff2"); }

#film { width: 120px; height: 96px; image-rendering: pixelated; flex: none; }
.support { margin: 14px 0 0; padding: 10px 14px; border: 2px solid var(--rust); color: var(--rust); font-size: 16px; }


body.video.has-desk { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.video.has-desk main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.video.has-desk .top { width: 100%; max-width: none; margin: 0; flex: none; }
.vdesk:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vdesk .bar { position: static; }
.vbody { flex: 1; min-height: 0; align-items: stretch; }
.vbody .rail, .vbody .panel { position: static; max-height: none; height: 100%; overflow: auto; }
.vcenter { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--desk); }
.stage { position: relative; flex: 1; min-height: 160px; display: flex; align-items: center; justify-content: center; padding: 14px; overflow: hidden; }
#screen { display: block; background: #000; border: 2px solid var(--ink); box-shadow: 4px 4px 0 rgba(34, 34, 42, .22); touch-action: none; }
#screen.grab { cursor: grab; }
#live { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; background: #000; border: 2px solid var(--rust); transform: scaleX(-1); z-index: 4; }
#live[hidden] { display: none; }
.transport { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 12px; background: var(--paper); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.transport .time { font-variant-numeric: tabular-nums; font-size: 16px; color: var(--navy); margin: 0 8px; white-space: nowrap; }
.transport .time small { color: var(--muted); font-size: 14px; }
.transport .btn.icon img { width: 18px; height: 18px; }
.transport .btn.play { padding: 5px 10px; }
.transport .grow { flex: 1; }
.timeline { height: 120px; flex: none; background: var(--paper); position: relative; }
.tl-scroll { height: 100%; overflow: auto; overscroll-behavior: contain; }
.tl-inner { position: relative; min-height: 100%; }
.tl-ruler { display: block; height: 22px; cursor: pointer; border-bottom: 1px solid var(--soft2); }
.lane { position: relative; border-bottom: 1px solid var(--soft2); }
.lane-clips { height: 62px; }
.lane-bars { height: 38px; }
.lane-name { position: sticky; left: 0; z-index: 4; display: inline-block; font-size: 11px; line-height: 1; padding: 2px 4px; color: var(--muted); background: var(--paper); pointer-events: none; }
.lane-empty { position: absolute; left: 70px; top: 22px; font-size: 14px; color: var(--muted); }
.tl-clip, .tl-bar { position: absolute; top: 6px; border: 2px solid var(--ink); overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.tl-clip { height: 52px; background: #2b2f3a; }
.tl-clip .film, .tl-bar .wave { position: absolute; left: 0; top: 0; height: 100%; pointer-events: none; }
.tl-clip.sel, .tl-bar.sel { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); z-index: 2; }
.tl-clip.lifting { opacity: .35; }
.tl-clip.ghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; opacity: .9; transform-origin: 0 0; }
.tl-name { position: absolute; left: 6px; top: 3px; max-width: calc(100% - 12px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; line-height: 1.2; color: #fff; text-shadow: 0 1px 2px #000, 0 0 2px #000; pointer-events: none; }
.tl-name small { font-size: 11px; opacity: .85; }
.tl-bar { height: 26px; background: #F5D547; }
.tl-bar .tl-name { color: #22222A; text-shadow: none; top: 4px; }
.tl-bar.kind-pic { background: #A8C3E6; }
.tl-bar.kind-music { height: 30px; background: #BFE5D8; }
html.night .ph img { filter: invert(.9) hue-rotate(180deg); }
.tl-bar.kind-music .tl-name { top: 1px; font-size: 11px; }
.h { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; z-index: 3; }
.h-l { left: 0; } .h-r { right: 0; }
.h::after { content: ""; position: absolute; top: 25%; bottom: 25%; width: 3px; background: rgba(255, 255, 255, .85); border: 1px solid #22222A; opacity: 0; transition: opacity .1s; }
.h-l::after { left: 1px; } .h-r::after { right: 1px; }
.tl-clip:hover .h::after, .tl-bar:hover .h::after, .sel .h::after { opacity: 1; }
.tl-ph { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--orange); pointer-events: none; z-index: 6; will-change: transform; }
.tl-knob { position: absolute; top: 0; left: -5px; width: 12px; height: 12px; background: var(--orange); border: 2px solid var(--ink); }
.tl-marker { position: absolute; top: 2px; bottom: 2px; width: 4px; background: var(--orange); z-index: 7; }


.cropbox { position: absolute; border: 2px dashed #fff; box-shadow: 0 0 0 9999px rgba(10, 12, 18, .55); cursor: move; touch-action: none; z-index: 3; }
.cropbox[hidden] { display: none; }
.ch { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid var(--ink); }
.ch.tl { left: -9px; top: -9px; cursor: nwse-resize; } .ch.br { right: -9px; bottom: -9px; cursor: nwse-resize; }
.ch.tr { right: -9px; top: -9px; cursor: nesw-resize; } .ch.bl { left: -9px; bottom: -9px; cursor: nesw-resize; }


.items { list-style: none; margin: 8px 0 0; padding: 0; }
.items li { display: flex; align-items: center; gap: 6px; padding: 5px 4px; border-bottom: 1px solid var(--soft2); cursor: pointer; font-size: 15px; }
.items li.on { background: var(--soft); box-shadow: inset 3px 0 0 var(--orange); }
.items .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.slider { display: block; margin: 12px 0 0; }
.slider .row { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; color: var(--muted); }
.slider output { color: var(--navy); font-variant-numeric: tabular-nums; }
.shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 0; }
.shape { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border: 2px solid var(--soft2); background: var(--paper); cursor: pointer; font-size: 14px; color: var(--ink); line-height: 1.2; text-align: center; }
.shape[aria-pressed=true] { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.shape i { display: block; border: 2px solid var(--navy); background: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip { font-size: 15px; padding: 3px 10px; border: 2px solid var(--soft2); background: var(--paper); cursor: pointer; color: var(--ink); }
.chip[aria-pressed=true] { border-color: var(--ink); background: var(--navy); color: var(--paper); }
html.night .chip[aria-pressed=true] { color: #10131B; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair .fieldrow { margin-top: 8px; }
.textedit { min-height: 70px; resize: vertical; }
.estimate { margin: 12px 0 0; padding: 8px 10px; background: var(--soft); border: 2px solid var(--soft2); font-size: 15px; }
.warn { color: var(--rust); font-size: 15px; margin: 8px 0 0; }
.meter { height: 16px; border: 2px solid var(--ink); background: var(--soft); margin: 4px 0 0; }
.meter span { display: block; height: 100%; width: 0; background: var(--navy); transition: width .2s; }
.done-video { display: block; width: 100%; max-height: 50vh; background: #000; border: 2px solid var(--ink); margin: 6px 0 0; }

@media (max-width: 1100px) { .vbody { grid-template-columns: 190px minmax(0, 1fr) 300px; } }
@media (max-width: 900px) {
  body.video.has-desk { height: auto; overflow: visible; display: block; }
  body.video.has-desk main, .vdesk:not([hidden]) { display: block; }
  .vbody .rail { position: sticky; top: 0; height: auto; overflow-x: auto; overflow-y: hidden; }
  .vcenter { display: block; }
  .stage { height: min(62vw, 46vh); min-height: 0; padding: 8px; }
  .vbody .panel { position: fixed; height: auto; max-height: 55vh; overflow: auto; }
  body.video:has(.panel.open) .vcenter { padding-bottom: calc(55vh + 60px); }
  .vcenter { padding-bottom: 70px; }
  .transport { gap: 4px; padding: 5px 8px; }
  .transport .zoom { display: none; }
}
