.ald-vid .alv-heading { margin-bottom:20px; }
.ald-vid .alv-layout { display:grid; grid-template-columns:minmax(320px,.82fr) minmax(0,1.5fr); align-items:start; gap:24px; }
.ald-vid .alv-form { padding:22px; }
.ald-vid .alv-form > .m-lab { margin-top:22px; }
.ald-vid .alv-library { min-width:0; display:grid; gap:28px; }
.ald-vid .alv-section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 0 16px; }
.ald-vid .alv-section-head h3 { margin:0; font-size:18px; }
.ald-vid .alv-section-head > span { font-size:12px; color:#aaa; }
.ald-vid #stGal .gal-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.ald-vid #stGal .gal-it { width:100%; margin:0; min-width:0; }
.ald-vid #stGal .gal-med { width:100%; aspect-ratio:4/3; height:auto; border-radius:12px; overflow:hidden; background:var(--panel); position:relative; }
.ald-vid #stGal .gal-med > video,.ald-vid #stGal .gal-med > img { width:100%; height:100%; object-fit:cover; max-height:none; }
.ald-vid #stGal figcaption { min-height:40px; padding:10px 2px; font-size:12px; line-height:20px; }
.ald-vid #stGal figcaption span { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.ald-vid .alv-example { position:absolute; top:8px; left:8px; padding:4px 8px; background:var(--panel); border-radius:6px; font-size:11px; }
.ald-vid #svEx { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; overflow:visible; }
.ald-vid #svEx .sv-exc { width:auto; min-width:0; border-radius:12px; background:var(--panel); display:flex; flex-direction:column; }
.ald-vid #svEx .sv-exc-media { width:100%; aspect-ratio:4/5; border-radius:12px 12px 0 0; height:auto; }
.ald-vid #svEx .sv-exc-poster,.ald-vid #svEx .sv-exc-vid { width:100%; height:100%; object-fit:cover; }
.ald-vid #svEx .sv-exc-cap { padding:12px; margin:0; font-size:12px; line-height:1.6; height:64px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.ald-vid #svEx .sv-exc-use { width:calc(100% - 24px); min-height:40px; margin:8px 12px 12px; justify-content:center; border:1px solid #383838; border-radius:8px; }
.ald-vid #svScenes { display:block; }
.ald-vid .sv-card { width:100%; min-width:0; }
.ald-vid .sv-q { gap:8px; }
.ald-vid .sv-qc { min-width:0; padding:12px 8px; background:var(--panel-2); border-color:#383838; }
.ald-vid .sv-qc.on { border-color:#94FAE2; }
.ald-vid .sv-qc-eng { white-space:normal; font-size:11px; min-height:32px; }
.ald-vid .sv-qc h4 { font-size:15px; }
.ald-vid .sv-bar { display:grid; grid-template-columns:1fr; }
.ald-vid .sv-go { width:100%; min-height:46px; }
.ald-vid #stVidMode,.ald-vid #stDur,.ald-vid #svStyle { display:flex; }
.ald-vid #stVidMode button,.ald-vid #stDur button,.ald-vid #svStyle button { flex:1; padding-left:6px; padding-right:6px; }
.alv-player { --mint:#94FAE2; color:#f5f5f5; background:var(--panel); border:1px solid #383838; border-radius:16px; padding:0; margin:auto; inset:0; width:min(1100px,calc(100vw - 40px)); max-width:calc(100vw - 20px); max-height:calc(100dvh - 40px); overflow:auto; font-family:'Outfit',sans-serif; }
.alv-player::backdrop { background:rgba(0,0,0,.88); }
.alv-player-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px 24px; }
.alv-player-head h2 { margin:5px 0 0; font-size:20px; line-height:1.4; overflow-wrap:anywhere; }
.alv-eyebrow { color:#aaa; font-size:12px; }
.alv-close { min-width:40px; height:40px; border:1px solid #383838; border-radius:50%; display:grid; place-items:center; }
.alv-close svg { width:20px; height:20px; }
.alv-player-screen { background:#000; display:grid; place-items:center; }
.alv-player-video { display:block; width:100%; height:min(57dvh,560px); object-fit:contain; }
.alv-player-footer { padding:20px 24px 24px; }
.alv-player-tags { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.alv-tag { border:1px solid #383838; border-radius:20px; padding:6px 10px; font-size:12px; color:#94FAE2; }
.alv-player-meta { margin-left:auto; font-size:12px; color:#bcbcbc; }
.alv-player-prompt { color:#bcbcbc; font-size:13px; line-height:1.6; max-height:70px; overflow:auto; }
.alv-player-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.alv-player-actions > * { display:flex; align-items:center; justify-content:center; min-height:44px; border-radius:9px; text-decoration:none; font-size:13px; }
.alv-player-actions button:disabled { opacity:.5; cursor:not-allowed; }
@media(max-width:1000px) { .ald-vid .alv-layout { grid-template-columns:1fr; } }
@media(max-width:640px) {
 .ald-vid .alv-form { padding:16px; } .ald-vid #stGal .gal-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .ald-vid #svEx { grid-template-columns:1fr; } .ald-vid #svEx .sv-exc-media { aspect-ratio:16/9; }
 .alv-player { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); }
 .alv-player-head,.alv-player-footer { padding:16px; } .alv-player-video { height:45dvh; }
 .alv-player-actions { gap:6px; } .alv-player-actions > * { font-size:12px; } .alv-player-meta { margin-left:0; }
}
.ald-vid #stGal .gal-grid.ex { grid-template-columns:repeat(2,minmax(0,1fr)); }
.ald-vid #stGal .gal-grid.ex .gal-med { aspect-ratio:16/9; }
.ald-vid .prompt-wrap textarea,.ald-vid .sv-card,.ald-vid .sv-slot-box,.ald-vid .sv-card-p { background:var(--panel-2); border-color:#383838; } .ald-vid .prompt-wrap textarea,.ald-vid .sv-card-p { background:var(--input); }
.ald-vid .sv-style .catc,.ald-vid #stDur .catc { background:var(--panel-2); color:#c3c3c3; }
.ald-vid .sv-style .catc.on,.ald-vid #stDur .catc.on { color:#94FAE2; border-color:#94FAE2; }
.ald-vid .prompt-wrap textarea::placeholder { color:#aaa; }
.ald-vid .sv-card { box-shadow:none; }
/* Override the legacy mobile gallery order inside the composed library. */
.ald-vid .alv-library > #stGal { order:0; }
.ald-vid .alv-library > .alv-previews { order:1; }
.ald-vid .sv-qc-name { color:#f5f5f5; }

/* 0919ailab3: preserve the live gallery/viewer and showcase composition. */
.ald-vid .alv-current-runtime #stxRight { display:block; }
.ald-vid .alv-current-runtime #stGal .gal-med { aspect-ratio:var(--gar,16/9); }
.ald-vid .alv-current-runtime #svQ { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.ald-vid .alv-current-runtime .sv-qc-row { flex-wrap:wrap; gap:3px; }
.ald-vid .alv-current-runtime .sv-qc-row > * { min-width:0; white-space:normal; overflow-wrap:anywhere; }
