/* ムービーメーカーの見た目（部品は editor.css の ed-* を共通で使う） */
.ed-page .mv-app { height: calc(100vh - 130px); min-height: 640px; max-height: 1100px; }
.ed-page .mv-app.ed-full { height: 100vh; max-height: none; }
.mv-app .ed-main { min-height: 0; }
.mv-transport { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f3efe0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mv-transport output { font-variant-numeric: tabular-nums; font-size: 14px; min-width: 130px; }
.mv-transport input[type=range] { width: 110px; accent-color: var(--g); }
.mv-num { width: 84px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.mv-songs { display: flex; flex-direction: column; gap: 5px; }
.mv-song { display: flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mv-song img { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; flex: none; background: #efe9d6; }
.mv-song-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.mv-song-t strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-song-t small { font-size: 11.5px; color: #6a6958; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-gifs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mv-gif { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px; cursor: pointer; font-size: 12px; font-family: inherit; color: #2f3a2c; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mv-gif:hover { border-color: var(--g); background: var(--gl); }
.mv-gif img { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; }

/* タイムライン */
.mv-tl { display: flex; height: 262px; flex: none; border-top: 2px solid var(--line); background: #fbf8ef; min-height: 0; }
.mv-labels { width: 76px; flex: none; border-right: 1px solid var(--line); background: #f3eedd; padding-top: 0; }
.mv-label-top { height: 26px; font-size: 12px; color: #6a6958; display: flex; align-items: center; padding-left: 8px; border-bottom: 1px solid var(--line); }
.mv-label { display: flex; align-items: center; padding-left: 8px; font-size: 12.5px; color: #4a4a3c; border-bottom: 1px solid #e6dfc9; }
.mv-label.au { background: #f6e9e6; }
.mv-tlscroll { flex: 1; overflow: auto; position: relative; }
.mv-tlcontent { position: relative; min-height: 100%; }
.mv-ruler { position: relative; height: 26px; border-bottom: 1px solid var(--line); background: #f3eedd; cursor: pointer; user-select: none; }
.mv-tick { position: absolute; top: 0; height: 100%; border-left: 1px solid #c9c1a6; padding-left: 3px; font-size: 11px; color: #6a6958; line-height: 26px; pointer-events: none; }
.mv-tlinner { position: relative; }
.mv-row { position: absolute; left: 0; border-bottom: 1px solid #e6dfc9; background: repeating-linear-gradient(90deg, transparent 0 59px, rgba(0,0,0,.04) 59px 60px); }
.mv-row.au { background-color: #fbeeee; }
.mv-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #e53935; pointer-events: none; z-index: 5; margin-left: -1px; }
.mv-playhead::before { content: ''; position: absolute; top: 0; left: -6px; border: 7px solid transparent; border-top-color: #e53935; }
.mv-clip { position: absolute; border-radius: 6px; overflow: hidden; color: #fff; font-size: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: grab; display: flex; align-items: center; user-select: none; touch-action: none; z-index: 2; }
.mv-clip.on { outline: 3px solid #2f6fd0; z-index: 3; }
.mv-clip img { height: 100%; width: auto; max-width: 60px; object-fit: contain; background: rgba(255,255,255,.25); image-rendering: pixelated; flex: none; pointer-events: none; }
.mv-cl { padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.6); pointer-events: none; position: relative; }
.mv-wave { position: absolute; left: 0; top: 0; pointer-events: none; opacity: .9; }
.mv-h { position: absolute; top: 0; width: 9px; height: 100%; cursor: ew-resize; background: rgba(255,255,255,.35); z-index: 4; }
.mv-h.l { left: 0; } .mv-h.r { right: 0; }
.mv-clip:hover .mv-h { background: rgba(255,255,255,.7); }

/* 書き出し中 */
.mv-exp { position: absolute; inset: 0; z-index: 70; background: rgba(40, 45, 35, .6); display: flex; align-items: center; justify-content: center; }
.mv-exp[hidden] { display: none; }
.mv-exp-box { background: #fff; border-radius: 12px; padding: 20px 26px; width: min(460px, 92%); text-align: center; }
.mv-bar { height: 14px; border-radius: 7px; background: #e6dfc9; margin: 12px 0; overflow: hidden; }
.mv-bar div { height: 100%; width: 0; background: var(--g); transition: width .3s; }
@media (max-width: 960px) { .ed-page .mv-app { height: auto; } .mv-tl { height: 250px; } }

/* 再生画面の上に重ねる操作枠（これが無いと枠が画面の下に回ってしまう） */
.ed-wrap canvas#mv-ov { position: absolute; left: 0; top: 0; background: transparent; box-shadow: none; touch-action: none; }
/* タイムラインのスクロールバー（端をドラッグして拡大・縮小） */
.mv-tl { flex-direction: column; height: 292px; }
.mv-tl-main { display: flex; flex: 1; min-height: 0; }
.mv-labels { overflow: hidden; }
.mv-tlscroll { scrollbar-width: none; }
.mv-tlscroll::-webkit-scrollbar { display: none; }
.mv-hrow { display: flex; height: 20px; flex: none; border-top: 1px solid var(--line); background: #f3eedd; }
.mv-hsp { width: 76px; flex: none; border-right: 1px solid var(--line); }
.mv-hsp2 { width: 20px; flex: none; }
.mv-sb { position: relative; background: #e9e2cc; user-select: none; touch-action: none; }
.mv-hbar { flex: 1; }
.mv-vbar { width: 20px; flex: none; border-left: 1px solid var(--line); }
.mv-sb-th { position: absolute; background: #9bbf8c; border: 1px solid #5d8a4e; border-radius: 6px; cursor: grab; box-sizing: border-box; }
.mv-hbar .mv-sb-th { top: 2px; bottom: 2px; min-width: 14px; }
.mv-vbar .mv-sb-th { left: 2px; right: 2px; min-height: 14px; }
.mv-sb-th:hover { background: #82b270; }
.mv-sb-th i { position: absolute; background: #4a7a3c; border-radius: 4px; opacity: .85; }
.mv-hbar .mv-sb-th i { top: 2px; bottom: 2px; width: 7px; cursor: ew-resize; }
.mv-hbar .mv-sb-th i.l { left: 1px; } .mv-hbar .mv-sb-th i.r { right: 1px; }
.mv-vbar .mv-sb-th i { left: 2px; right: 2px; height: 7px; cursor: ns-resize; }
.mv-vbar .mv-sb-th i.t { top: 1px; } .mv-vbar .mv-sb-th i.b { bottom: 1px; }
.mv-sb-th i:hover { background: #2f5a24; opacity: 1; }
/* 移動の印・エフェクト・移動の一覧 */
.mv-kf { position: absolute; bottom: 2px; width: 7px; height: 7px; margin-left: -3px; background: #ffd54f; border: 1px solid #6b5300; transform: rotate(45deg); pointer-events: none; z-index: 3; }
.mv-kfrow { display: flex; align-items: center; gap: 6px; margin: 3px 0; font-size: 13px; }
.mv-kfrow b { width: 20px; height: 20px; border-radius: 50%; background: #ffb74d; color: #3a2a00; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.mv-kfrow .mv-num { width: 64px; }
.mv-kfrow span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-fxs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.mv-fxbtn { display: flex; align-items: center; gap: 6px; padding: 9px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-family: inherit; font-size: 13px; color: #2f3a2c; text-align: left; }
.mv-fxbtn span { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #2a2f52, #6a3fa0); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.mv-fxbtn:hover { border-color: var(--g); background: var(--gl); }
@media (max-width: 960px) { .mv-tl { height: 290px; } }
