/* Video Resize — 見た目。クラス名はすべて vr- で始める（サイト全体のCSSと衝突させない） */
.vr-app { display: flex; margin-top: 50px; margin-bottom: 50px; height: calc(100vh - 100px); min-height: 520px; background: #0d0d0d; color: #c8c8c8; font-size: 12px; overflow: hidden; }
.vr-app * { box-sizing: border-box; }
.vr-app button, .vr-app input, .vr-app select { font-family: inherit; font-size: 12px; }
.vr-app.dragover { outline: 2px dashed #00ff88; outline-offset: -6px; }

.vr-left { width: 330px; min-width: 330px; background: #111; border-right: 1px solid #1a1a1a; display: flex; flex-direction: column; overflow-y: auto; }
.vr-right { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 10px 12px; gap: 8px; }
.vr-header { padding: 8px 12px; background: #0a0a0a; border-bottom: 1px solid #1a1a1a; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vr-title { color: #00ff88; font-size: 13px; font-weight: bold; }
.vr-sub { color: #555; font-size: 10px; }
.vr-f1 { margin-left: auto; color: #666; font-size: 11px; cursor: pointer; }
.vr-f1:hover { color: #00ff88; }

.vr-sec { padding: 10px 12px; border-bottom: 1px solid #1a1a1a; display: flex; flex-direction: column; gap: 8px; }
.vr-stitle { color: #00ff88; font-size: 11px; letter-spacing: 1px; }
.vr-note { color: #666; font-size: 11px; line-height: 1.6; }
.vr-hint { color: #666; font-size: 11px; line-height: 1.7; padding: 10px 12px; }
.vr-hint kbd, .vr-app 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; }

.vr-tabs { display: flex; gap: 3px; border-bottom: 1px solid #00ff8899; margin-bottom: 0; padding: 0 4px; }
.vr-tab { background: #0a0a0a; border: 1px solid #2a2a2a; border-bottom: none; border-radius: 6px 6px 0 0; color: #7a7a7a; padding: 7px 11px; cursor: pointer; position: relative; top: 1px; white-space: nowrap; }
.vr-tab:hover { color: #ddd; background: #141414; }
.vr-tab.on { background: #151515; color: #00ff88; font-weight: bold; border-color: #00ff8899; border-bottom: 1px solid #151515; }
.vr-panel { background: #151515; border: 1px solid #00ff8899; border-top: none; border-radius: 0 0 4px 4px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.vr-seg { display: flex; border: 1px solid #333; border-radius: 3px; overflow: hidden; }
.vr-segb { flex: 1; background: transparent; border: 0; border-right: 1px solid #333; color: #999; padding: 6px 4px; cursor: pointer; white-space: nowrap; }
.vr-segb:last-child { border-right: 0; }
.vr-segb:hover { color: #00ff88; }
.vr-segb.on { background: #00ff8820; color: #00ff88; font-weight: bold; }

.vr-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.vr-pre { background: #151515; border: 1px solid #2a2a2a; color: #c0c0c0; border-radius: 3px; padding: 7px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vr-pre b { font-size: 13px; font-weight: bold; }
.vr-pre i { font-style: normal; font-size: 10px; color: #666; }
.vr-pre:hover { border-color: #00ff88; }
.vr-pre.on { border-color: #00ff88; background: #00ff8815; color: #00ff88; }
.vr-pre.dis, .vr-pre:disabled { opacity: .3; cursor: not-allowed; border-color: #2a2a2a; color: #c0c0c0; }
.vr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.vr-chip { background: transparent; border: 1px solid #333; color: #c0c0c0; padding: 5px 10px; border-radius: 3px; cursor: pointer; }
.vr-chip:hover { border-color: #00ff88; color: #00ff88; }
.vr-chip.on { border-color: #00ff88; color: #00ff88; background: #00ff8815; }

.vr-sub2 { color: #bbb; font-size: 12px; font-weight: bold; margin-top: 2px; }
.vr-qcap { display: flex; justify-content: space-between; color: #666; font-size: 10px; }
.vr-qdesc { color: #9ad; font-size: 11px; line-height: 1.6; }
.vr-field { display: flex; align-items: center; gap: 8px; color: #999; }
.vr-field > span { min-width: 64px; }
.vr-row2 { display: flex; align-items: flex-end; gap: 8px; }
.vr-row2 .vr-field { flex-direction: column; align-items: flex-start; gap: 3px; }
.vr-row2 .vr-field > span { min-width: 0; }
.vr-x { color: #555; padding-bottom: 6px; }
.vr-in { background: #0a0a0a; border: 1px solid #333; color: #ddd; padding: 5px 7px; border-radius: 3px; min-width: 0; flex: 1; }
.vr-in:focus { outline: none; border-color: #00ff88; }
.vr-field .vr-in[type=number] { flex: none; }
.vr-check { display: flex; align-items: center; gap: 6px; color: #aaa; cursor: pointer; }
.vr-check input { accent-color: #00ff88; }
.vr-fitbox { display: flex; flex-direction: column; gap: 6px; }
.vr-adv summary { cursor: pointer; color: #00ff88; font-size: 11px; letter-spacing: 1px; }
.vr-adv[open] summary { margin-bottom: 4px; }

.vr-btn { background: transparent; border: 1px solid #333; color: #c0c0c0; padding: 6px 12px; cursor: pointer; border-radius: 3px; transition: all .15s; white-space: nowrap; }
.vr-btn:hover { border-color: #00ff88; color: #00ff88; }
.vr-btn:disabled { opacity: .3; cursor: not-allowed; border-color: #333; color: #c0c0c0; }
.vr-btn.primary { border-color: #00ff88; color: #00ff88; font-weight: bold; }
.vr-btn.primary:hover { background: #00ff8825; }
.vr-btn.big { padding: 8px 20px; font-size: 13px; }
.vr-btn.danger:hover { border-color: #ff5566; color: #ff5566; }
.vr-btn.sm { padding: 3px 8px; font-size: 11px; }

/* プレビュー */
.vr-pv { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; background: #070707; border: 1px solid #1a1a1a; border-radius: 4px; flex: none; }
.vr-pv.none { display: none; }
.vr-stage { height: 150px; width: 100%; display: flex; align-items: center; justify-content: center; }
.vr-frame { max-height: 150px; max-width: 100%; height: 150px; background: #000; border: 1px solid #333; overflow: hidden; }
.vr-frame img { width: 100%; height: 100%; display: block; }
.vr-pvcap { color: #888; font-size: 11px; }

.vr-drop { border: 2px dashed #333; border-radius: 4px; padding: 10px 8px; text-align: center; color: #777; cursor: pointer; flex: none; transition: border-color .2s; }
.vr-drop:hover { border-color: #00ff88; color: #aaa; }
.vr-list { flex: 1; min-height: 80px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.vr-empty { margin: auto; text-align: center; color: #444; line-height: 2; font-size: 13px; padding: 20px; }
.vr-empty b { color: #666; font-size: 16px; }

.vr-item { display: flex; gap: 10px; padding: 8px; border: 1px solid #1c1c1c; background: #131313; border-radius: 4px; align-items: center; cursor: pointer; }
.vr-item:hover { border-color: #00ff8860; }
.vr-item.sel { border-color: #00ff8890; }
.vr-item.error { border-color: #ff556660; }
.vr-th { width: 84px; height: 52px; flex: none; background: #000; border-radius: 2px; display: flex; align-items: center; justify-content: center; color: #555; font-size: 18px; overflow: hidden; }
.vr-th img { width: 100%; height: 100%; object-fit: contain; }
.vr-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vr-nm { color: #ddd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-src { color: #777; font-size: 11px; }
.vr-res { color: #00ff88; font-size: 12px; }
.vr-res.est { color: #7fd6a8; }
.vr-warn { color: #e0b050; font-size: 11px; }
.vr-err { color: #ff6677; font-size: 11px; }
.vr-bar { height: 5px; background: #222; border-radius: 3px; overflow: hidden; margin-top: 3px; }
.vr-bar i { display: block; height: 100%; background: #00ff88; width: 0; transition: width .2s; }
.vr-prog { color: #aaa; font-size: 11px; }
.vr-act { display: flex; gap: 4px; flex: none; }

.vr-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; flex: none; padding-top: 4px; border-top: 1px solid #1a1a1a; }
.vr-cl, .vr-cr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vr-total { color: #888; font-size: 11px; }

/* ダイアログ（ヘルプ・再生） */
.vr-modal-bg { position: fixed; inset: 0; background: #000b; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.vr-modal { background: #111; border: 1px solid #2a2a2a; border-radius: 6px; width: min(720px, 100%); max-height: 86vh; display: flex; flex-direction: column; color: #c8c8c8; font-size: 12px; }
.vr-modal-h { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #1f1f1f; }
.vr-modal-h b { color: #00ff88; flex: none; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-modal-h input { flex: 1; min-width: 0; background: #0a0a0a; border: 1px solid #333; color: #ddd; padding: 6px 8px; border-radius: 3px; }
.vr-modal-h input:focus { outline: none; border-color: #00ff88; }
.vr-modal-h .vr-btn { margin-left: auto; }
.vr-modal-b { overflow-y: auto; padding: 8px 14px 14px; }
.vr-help-sec { color: #00ff88; margin: 14px 0 4px; letter-spacing: 1px; font-size: 11px; }
.vr-help-q { color: #e0e0e0; font-weight: bold; margin-top: 8px; }
.vr-help-a { color: #a8a8a8; line-height: 1.7; }
.vr-pvbox { width: min(900px, 100%); }
.vr-video { display: block; width: 100%; max-height: 74vh; background: #000; border: 0; padding: 0; }
.vr-toast { position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px); background: #1a1a1a; border: 1px solid #00ff88; color: #ddd; padding: 8px 16px; border-radius: 4px; z-index: 10001; opacity: 0; transition: all .25s; pointer-events: none; }
.vr-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .vr-app { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .vr-left { width: 100%; min-width: 0; border-right: 0; border-bottom: 1px solid #1a1a1a; overflow: visible; }
  .vr-right { min-height: 60vh; }
}

/* タブと中身の間に .vr-sec の gap が入って離れていたので、くっつける */
.vr-tabs + .vr-panel { margin-top: -8px; }
