.video-studio { color:#20334f; }
.video-studio .vs-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f8fbff;border:1px solid #d8e3f2;padding:20px;border-radius:8px;margin-bottom:16px}
.video-studio h2{font-weight:700;line-height:1.3;margin:0 0 6px;font-size:23px}.video-studio h3{font-size:17px;margin:0 0 12px}
.video-studio p{margin:8px 0;line-height:1.5}.vs-tag{font-size:13px;color:#256fd9;white-space:nowrap}
.vs-columns{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(310px,1fr);gap:16px}
.vs-panel{background:rgba(255,255,255,.97);border:1px solid #d8e3f2;border-radius:8px;padding:20px;min-width:0}
.video-studio label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600;margin-bottom:12px;min-width:0}
.video-studio input:not([type=checkbox]),.video-studio select,.video-studio textarea{width:100%;min-width:0;border:1px solid #d3deef;border-radius:8px;padding:9px 11px;font-size:14px;background:#fbfcff;color:#20334f}
.video-studio .vs-file{padding:14px;border:1px dashed #9ebde8;border-radius:8px;background:#f6f9fe}.vs-file span,.vs-note{font-size:13px;color:#62738c;font-weight:400}
.video-studio .vs-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.vs-fields small{font-weight:400;color:#62738c}
.vs-preview{position:relative;background:#101828;border-radius:8px;overflow:hidden;min-height:150px;display:flex;align-items:center;justify-content:center}
.vs-preview video{width:100%;max-height:460px;display:block}.video-studio audio{width:100%;margin-top:10px}
.vs-caption{position:absolute;bottom:50px;left:5%;right:5%;text-align:center;white-space:pre-line;color:white;background:rgba(0,0,0,.75);font-size:18px;padding:6px;border-radius:4px;pointer-events:none}.vs-caption:empty{display:none}
.video-studio .vs-consent{flex-direction:row;align-items:flex-start;gap:10px;font-weight:400;padding:10px;background:#eff5ff;border-radius:8px}.vs-consent input{flex:0 0 18px;width:18px;height:18px;margin-top:3px}
.vs-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}.vs-actions h3{margin:0}.vs-actions .btn{white-space:normal;font-size:14px}
.video-studio progress{width:100%;height:8px;accent-color:#256fd9;margin-top:14px}.video-studio [role=status]{font-size:14px;overflow-wrap:anywhere;min-height:21px}
.vs-editor{margin-top:16px}.vs-cue{display:grid;grid-template-columns:36px 108px 108px minmax(0,1fr) 36px;gap:10px;align-items:center;border-top:1px solid #e2eaf4;padding:10px 0}.vs-cue label{margin:0}.vs-cue textarea{resize:vertical;min-height:60px}.vs-cue button,.vs-close{display:grid;place-items:center;width:34px;height:34px;padding:0;line-height:1;border:1px solid #d3deef;border-radius:8px;background:white;color:#536781}.vs-cue button:hover{background:#eff5ff}
.vs-dialog{border:1px solid #d3deef;border-radius:8px;padding:24px;width:min(600px,calc(100vw - 32px));color:#20334f;max-height:90vh;overflow:auto}.vs-dialog::backdrop{background:rgba(15,23,42,.55)}.vs-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px}.vs-dialog header h3{margin:0}.vs-close{font-size:24px;flex-shrink:0}.video-studio button:focus-visible{outline:2px solid #256fd9;outline-offset:2px}
@media(max-width:900px){.vs-columns{grid-template-columns:1fr}.video-studio .vs-heading{align-items:flex-start;flex-direction:column}.vs-cue{grid-template-columns:30px 1fr 1fr 34px}.vs-cue textarea{grid-column:2/4;grid-row:2}.vs-cue .vs-remove{grid-column:4;grid-row:1}.vs-panel{padding:14px}}
@media(max-width:480px){.video-studio .vs-fields{grid-template-columns:1fr}.vs-caption{font-size:15px}.vs-tag{white-space:normal}}

/* Quiet, consistent controls; native file input stays keyboard-accessible. */
.video-studio .voice-file-control{position:relative;display:flex;align-items:center;gap:12px;min-width:0;margin-top:4px}
.video-studio .voice-file-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;min-height:40px;padding:8px 13px;border:1px solid #b9cdeb;border-radius:8px;background:white;color:#245fae;font-size:14px;font-weight:600}
.video-studio .voice-file-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#62738c;font-size:13px}
.video-studio .voice-file-control input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;padding:0;cursor:pointer}
.voice-file-control:focus-within .voice-file-action{outline:2px solid #256fd9;outline-offset:3px}.voice-file-control:hover .voice-file-action{background:#edf4ff;border-color:#256fd9}
.voice-file-control.is-disabled{opacity:.55}.voice-file-control.is-disabled input{cursor:wait}
.vs-preview.voice-player,.voice-player{display:block;position:relative;min-width:0;min-height:0;border:1px solid #d6e2f1;border-radius:8px;overflow:hidden;background:#f8fbff;color:#20334f}
.voice-player--audio{margin:12px 0}.voice-player audio{display:none!important}.voice-player video{display:block;width:100%;max-height:440px;background:#152238}
.voice-player.is-empty video,.voice-player.is-audio video{display:none}
.voice-player .voice-player-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:210px;background:#f1f5fa;color:#6a7d95;font-size:14px}
.voice-player-placeholder>i{font-size:30px;color:#7087a5}.voice-player--audio .voice-player-placeholder{display:none}
.voice-player .voice-player-placeholder[hidden]{display:none}
.voice-player .voice-player-heading{display:flex;align-items:center;gap:8px;padding:12px 14px 0;color:#536b8a;font-size:13px;font-weight:600}
.voice-player .voice-player-controls{display:flex;align-items:center;gap:10px;padding:10px 12px;min-width:0}
.voice-player .voice-player-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;min-height:34px;padding:0;border:0;border-radius:8px;background:transparent;color:#385c88;box-shadow:none;font-size:18px;line-height:1}
.voice-player .voice-player-play{background:#256fd9;color:white}.voice-player .voice-player-button:hover{background:#e4edfa;color:#245fae}.voice-player .voice-player-play:hover{background:#1d5fbf;color:white}
.voice-player .voice-player-button:disabled{opacity:.4;cursor:default}.voice-player .voice-player-button[hidden]{display:none}
.voice-player input[type=range]{appearance:auto;min-width:0;width:auto;height:18px;min-height:0;padding:0;border:0;box-shadow:none;border-radius:0;background:transparent;accent-color:#256fd9;cursor:pointer}
.voice-player .voice-player-seek{flex:1 1 80px}.voice-player .voice-player-volume{flex:0 1 65px;max-width:65px}
.voice-player .voice-player-time{flex-shrink:0;white-space:nowrap;font-size:12px;font-variant-numeric:tabular-nums;color:#536b8a}
.voice-player button:focus-visible,.voice-player input:focus-visible{outline:2px solid #256fd9;outline-offset:2px}
.voice-player .voice-player-message{display:block;padding:0 14px 10px;font-size:13px;color:#aa3535}.voice-player-message:empty{display:none}
.voice-player .vs-caption{bottom:96px}.voice-player:fullscreen{display:flex;flex-direction:column;justify-content:center;background:#101828;border:0}.voice-player:fullscreen video{flex:1;min-height:0;max-height:calc(100vh - 95px);object-fit:contain}.voice-player:fullscreen .voice-player-heading,.voice-player:fullscreen .voice-player-controls{background:#f8fbff}
.tts-history-item{grid-template-columns:minmax(0,1fr) auto auto}.tts-history-actions{display:flex;flex-wrap:wrap;width:auto;max-width:246px}
.tts-result{display:grid;grid-template-columns:minmax(200px,.8fr) minmax(280px,1.2fr);align-items:center}.tts-result>.voice-player{display:block;width:100%;margin:0}.tts-result-actions{grid-column:1/-1;flex-wrap:wrap}
@media(max-width:700px){.tts-result{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.voice-player .voice-player-controls{gap:6px;padding:10px 8px;flex-wrap:wrap}.voice-player .voice-player-volume{display:none}.voice-player .voice-player-time{font-size:11px}.video-studio .voice-file-control{gap:8px}.video-studio .voice-file-action{padding:8px 10px;font-size:13px}.tts-history-item{grid-template-columns:minmax(0,1fr)}.tts-history-badges{grid-column:1;justify-content:flex-start;margin:0}.tts-history-actions{grid-column:1;justify-content:flex-start;margin:0;width:auto}}
.lip-panel { margin-top: 20px; }
.lip-panel summary { cursor: pointer; padding: 4px 0 12px; }
.lip-panel select { min-width: 180px; }
#lipCanvas { display:block; max-width:100%; width:720px; height:auto; touch-action:none; cursor:crosshair; border-radius:8px; border:1px solid #b8cde9; }
.lip-coordinates { max-width:720px; grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:12px; }
#lipResultVideo { width:100%; max-height:540px; background:#141c29; border-radius:8px; }
.lip-panel input[type=checkbox] { flex:0 0 18px; width:18px; height:18px; min-height:0; }
@media(max-width:540px) { .lip-coordinates { grid-template-columns:repeat(2,minmax(0,1fr)); } }
