/* 動画エディタ — 見た目。クラス名はすべて ve- で始める（サイト全体のCSSと衝突させない） */
.ve-app { display: flex; margin-top: 50px; margin-bottom: 50px; height: calc(100vh - 100px); min-height: 520px; background: #0d0d0d; color: #c8c8c8; font-size: 12px; user-select: none; overflow: hidden; }
.ve-app * { box-sizing: border-box; }
.ve-app button, .ve-app input, .ve-app select, .ve-app textarea { font-family: inherit; font-size: 12px; }

/* パネル */
.ve-left { width: 240px; min-width: 240px; background: #111; border-right: 1px solid #1a1a1a; display: flex; flex-direction: column; overflow-y: auto; }
.ve-right { width: 310px; min-width: 310px; background: #111; border-left: 1px solid #1a1a1a; display: flex; flex-direction: column; overflow: hidden; }
.ve-center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ve-header { padding: 8px 12px; flex-wrap: wrap; row-gap: 2px; background: #0a0a0a; border-bottom: 1px solid #1a1a1a; display: flex; align-items: center; gap: 8px; }
.ve-title { color: #00ff88; font-size: 13px; font-weight: bold; }
.ve-sub { color: #555; font-size: 10px; white-space: nowrap; }
.ve-section { padding: 10px 12px; border-bottom: 1px solid #1a1a1a; }
.ve-stitle { color: #00ff88; font-size: 11px; letter-spacing: 1px; margin-bottom: 8px; }
.ve-hint { color: #666; font-size: 11px; line-height: 1.6; }
.ve-hint kbd, .ve-kbd { background: #222; border: 1px solid #333; border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; color: #ddd; font-family: inherit; font-size: 11px; }

/* ボタン */
.ve-btn { background: transparent; border: 1px solid #333; color: #c0c0c0; padding: 5px 9px; cursor: pointer; border-radius: 3px; transition: all .15s; white-space: nowrap; }
.ve-btn:hover { border-color: #00ff88; color: #00ff88; }
.ve-btn:disabled { opacity: .3; cursor: not-allowed; border-color: #333; color: #c0c0c0; }
.ve-btn.on { border-color: #00ff88; color: #00ff88; background: #00ff8815; }
.ve-btn.primary { border-color: #00ff88; color: #00ff88; font-weight: bold; }
.ve-btn.primary:hover { background: #00ff8825; }
.ve-btn.danger:hover { border-color: #ff5566; color: #ff5566; }
.ve-btn.sm { padding: 3px 7px; font-size: 11px; }
.ve-btn.block { display: block; width: 100%; margin-top: 6px; text-align: center; }
.ve-sep { width: 1px; align-self: stretch; background: #222; margin: 0 4px; }

/* 素材 */
.ve-drop { border: 2px dashed #333; border-radius: 4px; padding: 16px 8px; text-align: center; color: #777; cursor: pointer; line-height: 1.7; transition: border-color .2s; }
.ve-drop:hover, .ve-drop.over { border-color: #00ff88; color: #aaa; }
.ve-bin { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 38vh; overflow-y: auto; }
.ve-media { display: flex; gap: 8px; padding: 4px; border: 1px solid #1c1c1c; border-radius: 3px; cursor: grab; align-items: center; background: #151515; }
.ve-media:hover { border-color: #00ff8870; }
.ve-media.missing { border-color: #ff556670; }
.ve-media canvas, .ve-media .ph { width: 52px; height: 32px; object-fit: cover; background: #000; border-radius: 2px; flex: none; display: flex; align-items: center; justify-content: center; color: #555; font-size: 16px; }
.ve-media .nm { flex: 1; min-width: 0; }
.ve-media .nm b { display: block; font-weight: normal; color: #ddd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ve-media .nm i { color: #666; font-style: normal; font-size: 10px; }
.ve-media .add { flex: none; }
.ve-addgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ve-addgrid .ve-btn { text-align: left; }

/* ツールバー・トランスポート */
.ve-toolbar, .ve-transport { display: flex; align-items: center; gap: 4px; padding: 5px 8px; background: #0a0a0a; border-bottom: 1px solid #1a1a1a; flex-wrap: wrap; }
.ve-transport { border-top: 1px solid #1a1a1a; border-bottom: 1px solid #1a1a1a; justify-content: center; gap: 6px; }
.ve-toolbar .grow { flex: 1; }
.ve-f1 { color: #666; font-size: 11px; margin-right: 6px; cursor: pointer; }
.ve-f1:hover { color: #00ff88; }
.ve-time { color: #00ff88; font-size: 15px; min-width: 150px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.ve-time span { color: #555; font-size: 12px; }
.ve-range { accent-color: #00ff88; }

/* プレビュー */
.ve-viewport { flex: 1; min-height: 120px; position: relative; background: #070707; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ve-viewport canvas { position: absolute; background: #000; }
#ve-overlay { background: transparent !important; cursor: default; }
.ve-empty { position: absolute; text-align: center; color: #444; font-size: 13px; line-height: 2; pointer-events: none; }
.ve-empty b { color: #666; font-size: 16px; }
.ve-info { position: absolute; left: 8px; bottom: 6px; font-size: 10px; color: #555; pointer-events: none; }
.ve-banner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: #151515; border: 1px solid #00ff8880; padding: 8px 12px; border-radius: 4px; display: flex; gap: 8px; align-items: center; z-index: 5; max-width: 90%; flex-wrap: wrap; }
.ve-progress { position: absolute; inset: 0; background: rgba(0,0,0,.72); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 10px; z-index: 10; }
.ve-progress.on { display: flex; }
.ve-pbar { width: 260px; height: 5px; background: #333; border-radius: 3px; overflow: hidden; }
.ve-pbar > div { height: 100%; width: 0; background: #00ff88; transition: width .15s; }

/* タイムライン */
.ve-vresizer { height: 6px; background: #0a0a0a; border-top: 1px solid #1a1a1a; cursor: ns-resize; flex: none; }
.ve-vresizer:hover { background: #00ff8840; }
.ve-timeline { height: 270px; min-height: 120px; display: flex; flex-direction: column; background: #0c0c0c; position: relative; flex: none; }
.ve-tl-top { display: flex; height: 24px; flex: none; border-bottom: 1px solid #1f1f1f; }
.ve-tl-corner { width: 118px; flex: none; background: #0a0a0a; border-right: 1px solid #1f1f1f; display: flex; align-items: center; justify-content: center; gap: 3px; }
.ve-tl-ruler { flex: 1; position: relative; overflow: hidden; cursor: pointer; background: #0a0a0a; }
.ve-tl-ruler canvas { position: absolute; left: 0; top: 0; }
.ve-tl-main { flex: 1; display: flex; min-height: 0; }
.ve-tl-heads { width: 118px; flex: none; overflow: hidden; background: #0a0a0a; border-right: 1px solid #1f1f1f; position: relative; }
.ve-tl-lanes { flex: 1; overflow: auto; position: relative; }
.ve-tl-inner { position: relative; }
.ve-th { position: absolute; left: 0; right: 0; border-bottom: 1px solid #1a1a1a; padding: 3px 5px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 4px; }
.ve-th .nm { color: #aaa; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ve-th .bt { display: flex; gap: 2px; }
.ve-th .bt button { background: #181818; border: 1px solid #2a2a2a; color: #777; border-radius: 2px; cursor: pointer; padding: 0 4px; font-size: 10px; line-height: 16px; }
.ve-th .bt button.on { color: #ffcc44; border-color: #ffcc4480; }
.ve-th .bt button:hover { color: #00ff88; }
.ve-lane { position: absolute; left: 0; right: 0; border-bottom: 1px solid #181818; }
.ve-lane.a { background: #0e110f; }
.ve-lane.v { background: #0d0f12; }
.ve-lane.drop { background: #00ff8812; }
.ve-lane.locked { background-image: repeating-linear-gradient(45deg, transparent 0 6px, #ffffff06 6px 12px); }
.ve-clip { position: absolute; border-radius: 3px; overflow: hidden; border: 1px solid #00000090; cursor: grab; background: #2a4a6a; color: #fff; }
.ve-clip.video { background: #28506f; } .ve-clip.audio { background: #265a3c; } .ve-clip.image { background: #2a5a5a; }
.ve-clip.text, .ve-clip.sub { background: #5b3a82; } .ve-clip.color, .ve-clip.shape { background: #7a5326; } .ve-clip.mosaic { background: #6a3a3a; }
.ve-clip.sel { border-color: #00ff88; box-shadow: 0 0 0 1px #00ff88, 0 0 8px #00ff8860; z-index: 3; }
.ve-clip.dim { opacity: .45; }
.ve-clip .tile { position: absolute; top: 0; height: 100%; pointer-events: none; }
.ve-clip .lb { position: absolute; left: 4px; top: 1px; right: 4px; font-size: 10px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 3px #000, 0 0 3px #000; pointer-events: none; z-index: 2; }
.ve-clip .lk { position: absolute; right: 3px; bottom: 1px; font-size: 9px; opacity: .8; z-index: 2; pointer-events: none; }
.ve-clip .eh { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 4; }
.ve-clip .eh.l { left: 0; } .ve-clip .eh.r { right: 0; }
.ve-clip:hover .eh, .ve-clip.sel .eh { background: #ffffff30; }
.ve-clip .fd { position: absolute; top: 0; height: 100%; background: linear-gradient(90deg, #000a, #0000); pointer-events: none; z-index: 1; }
.ve-clip .fd.o { background: linear-gradient(270deg, #000a, #0000); }
.ve-clip .tn { position: absolute; top: 0; height: 100%; background: repeating-linear-gradient(45deg, #ffffff25 0 4px, transparent 4px 8px); pointer-events: none; z-index: 1; }
.ve-ph { position: absolute; top: 0; width: 0; border-left: 1px solid #ff3355; pointer-events: none; z-index: 8; }
.ve-ph-head { position: absolute; top: 0; width: 13px; height: 12px; margin-left: -6px; background: #ff3355; clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); pointer-events: none; z-index: 9; }
.ve-snapline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed #ffcc44; z-index: 7; pointer-events: none; }
.ve-marq { position: absolute; border: 1px solid #00ff88; background: #00ff8820; z-index: 9; pointer-events: none; }
.ve-rangeband { position: absolute; top: 0; bottom: 0; background: #ffcc4414; border-left: 1px solid #ffcc4480; border-right: 1px solid #ffcc4480; pointer-events: none; z-index: 1; }
.ve-tl-empty { position: absolute; left: 140px; top: 40px; color: #444; pointer-events: none; font-size: 12px; }

/* 右パネル */
.ve-tabs { display: flex; border-bottom: 1px solid #1a1a1a; background: #0a0a0a; flex: none; }
.ve-tab { flex: 1; text-align: center; padding: 8px 4px; cursor: pointer; color: #777; border-bottom: 2px solid transparent; }
.ve-tab:hover { color: #ccc; } .ve-tab.on { color: #00ff88; border-bottom-color: #00ff88; }
.ve-pane { flex: 1; overflow-y: auto; display: none; }
.ve-pane.on { display: block; }
.ve-det { border-bottom: 1px solid #1a1a1a; }
.ve-det > summary { padding: 8px 12px; cursor: pointer; color: #00ff88; font-size: 11px; letter-spacing: 1px; list-style: none; }
.ve-det > summary::before { content: '▸ '; } .ve-det[open] > summary::before { content: '▾ '; }
.ve-det > .bd { padding: 2px 12px 10px; }
.ve-f { display: flex; align-items: center; gap: 6px; margin: 5px 0; min-height: 22px; }
.ve-f > label { width: 74px; flex: none; color: #888; font-size: 11px; }
.ve-f input[type=range] { flex: 1; min-width: 0; accent-color: #00ff88; }
.ve-f input[type=number], .ve-f input[type=text], .ve-f select, .ve-f textarea { background: #181818; border: 1px solid #2c2c2c; color: #ddd; padding: 3px 5px; border-radius: 2px; min-width: 0; }
.ve-f input[type=number] { width: 62px; }
.ve-f input[type=text], .ve-f select, .ve-f textarea { flex: 1; }
.ve-f textarea { height: 56px; resize: vertical; user-select: text; }
.ve-f input[type=color] { width: 34px; height: 22px; padding: 0; border: 1px solid #333; background: none; }
.ve-f input[type=checkbox] { accent-color: #00ff88; }
.ve-f .u { color: #555; font-size: 10px; width: 14px; }
.ve-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.ve-chip { padding: 2px 7px; border: 1px solid #2c2c2c; border-radius: 10px; cursor: pointer; color: #999; font-size: 11px; background: #151515; }
.ve-chip:hover { border-color: #00ff88; color: #00ff88; }
.ve-note { color: #666; font-size: 11px; line-height: 1.6; padding: 8px 12px; }
.ve-quick { display: flex; gap: 4px; padding: 8px 12px; flex-wrap: wrap; border-bottom: 1px solid #1a1a1a; }
.ve-sublist { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; }
.ve-subrow { border: 1px solid #222; border-radius: 3px; padding: 5px; background: #141414; }
.ve-subrow.on { border-color: #00ff88; }
.ve-subrow .tm { display: flex; gap: 4px; align-items: center; color: #777; font-size: 10px; margin-bottom: 3px; }
.ve-subrow .tm input { width: 62px; background: #181818; border: 1px solid #2c2c2c; color: #ddd; padding: 1px 3px; }
.ve-subrow textarea { width: 100%; height: 38px; background: #181818; border: 1px solid #2c2c2c; color: #ddd; padding: 3px; resize: vertical; user-select: text; }

/* ダイアログ・メニュー・通知 */
.ve-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ve-modal { background: #131313; border: 1px solid #2c2c2c; border-radius: 6px; width: min(720px, 100%); max-height: 88vh; display: flex; flex-direction: column; color: #ccc; font-size: 12px; box-shadow: 0 10px 40px #000; }
.ve-modal.wide { width: min(900px, 100%); }
.ve-modal > .hd { padding: 12px 16px; border-bottom: 1px solid #222; color: #00ff88; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.ve-modal > .hd .x { margin-left: auto; cursor: pointer; color: #777; font-size: 18px; line-height: 1; }
.ve-modal > .bd { padding: 14px 16px; overflow-y: auto; user-select: text; }
.ve-modal > .ft { padding: 10px 16px; border-top: 1px solid #222; display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.ve-modal .ve-f > label { width: 96px; }
.ve-help h3 { color: #00ff88; font-size: 12px; margin: 14px 0 6px; letter-spacing: 1px; }
.ve-help .q { display: grid; grid-template-columns: 210px 1fr; gap: 4px 12px; padding: 5px 0; border-bottom: 1px solid #1c1c1c; }
.ve-help .q b { color: #ddd; font-weight: normal; }
.ve-help .q.hide { display: none; }
.ve-help .keys { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 24px; }
.ve-help .keys div { display: flex; justify-content: space-between; border-bottom: 1px solid #1c1c1c; padding: 3px 0; }
.ve-menu { position: fixed; z-index: 9500; background: #181818; border: 1px solid #333; border-radius: 4px; padding: 4px 0; min-width: 190px; box-shadow: 0 6px 24px #000; }
.ve-menu div { padding: 5px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; color: #ccc; }
.ve-menu div:hover { background: #00ff8820; color: #00ff88; }
.ve-menu div span { color: #666; }
.ve-menu hr { border: 0; border-top: 1px solid #2a2a2a; margin: 3px 0; }
.ve-menu .off { opacity: .35; pointer-events: none; }
.ve-toast { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); background: #1b1b1b; border: 1px solid #00ff8880; color: #ddd; padding: 8px 16px; border-radius: 4px; z-index: 9800; max-width: 80vw; box-shadow: 0 4px 20px #000; }
.ve-toast.err { border-color: #ff5566; color: #ffb0b8; }
.ve-warn { color: #ffb050; } .ve-ok { color: #00ff88; } .ve-bad { color: #ff6677; }
.ve-result { margin-top: 10px; padding: 10px; background: #0d1a14; border: 1px solid #00ff8860; border-radius: 4px; line-height: 1.8; }
.ve-kv { display: flex; justify-content: space-between; padding: 2px 0; }
.ve-kv span:first-child { color: #777; }
