.draft-grid { align-items: stretch; }
.draft-card { height: 100%; }
.script-stack { height: 238px; display: grid; gap: 10px; }
.script-stack.single { grid-template-rows: 1fr; }
.script-stack.mixed { grid-template-rows: 1fr 1fr; }
.script-stack .script { min-height: 0; }
.script-stack .script textarea { height: 100%; min-height: 0; resize: none; line-height: 1.65; }
.queue-actions { flex-wrap: wrap; justify-content: flex-end; }
.video-delivery { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 10px; background: #f2f6ef; }
.download-check { min-width: 0; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.download-check input { flex: 0 0 auto; }
.download-check span { min-width: 0; display: flex; flex-direction: column; }
.download-check b { font-size: 12px; }
.download-check small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #75837a; font-size: 9px; }
.download-one { flex: 0 0 auto; padding: 7px 10px; }
.actions button:disabled { cursor: not-allowed; opacity: .42; }
.avatar-picker { position: relative; display: flex; flex-direction: column; gap: 6px; }
.picker-label { color: #506057; font-size: 11px; font-weight: 750; }
.avatar-trigger { width: 100%; min-height: 66px; padding: 7px; display: grid; grid-template-columns: 46px minmax(0,1fr) 18px; align-items: center; gap: 10px; text-align: left; border: 1px solid #d7ded8; border-radius: 11px; background: #fff; }
.avatar-trigger:hover { border-color: #7fa189; box-shadow: 0 0 0 3px rgba(63,130,88,.08); }
.avatar-trigger img,.avatar-trigger video,.avatar-choice img,.avatar-choice video,.avatar-placeholder { width: 46px; height: 52px; display: grid; place-items: center; object-fit: cover; object-position: center 22%; border-radius: 8px; background: #e7eee5; color: #89968e; font-size: 9px; }
.avatar-trigger>span,.avatar-choice>span { min-width: 0; display: flex; flex-direction: column; }
.avatar-trigger b,.avatar-choice b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.avatar-trigger small,.avatar-choice small { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #849188; font-size: 9px; font-weight: 500; }
.avatar-trigger>i,.avatar-choice>i { color: #4d765b; font-style: normal; }
.avatar-menu { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); max-height: 300px; padding: 7px; overflow: auto; border: 1px solid #cfd9d1; border-radius: 13px; background: rgba(255,255,255,.98); box-shadow: 0 18px 45px rgba(14,42,29,.2); }
.avatar-choice { width: 100%; padding: 6px; display: grid; grid-template-columns: 46px minmax(0,1fr) 18px; align-items: center; gap: 10px; text-align: left; border: 0; border-radius: 9px; background: transparent; }
.avatar-choice:hover,.avatar-choice.selected { background: #edf5e9; }
@media (max-width: 720px) { .script-stack { height: 280px; } .queue-actions { justify-content: flex-start; } }
.header-actions,.workspace-tabs,.avatar-stats { display: flex; align-items: center; gap: 10px; }
.workspace-tabs { padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.7); }
.workspace-tabs button { padding: 8px 13px; border: 0; border-radius: 8px; background: transparent; font-weight: 750; }
.workspace-tabs button.active { color: #fff; background: var(--deep); }
.workspace { display: none; }
.workspace.active { display: block; }
.avatar-intro { margin-bottom: 18px; }
.avatar-stats span { min-width: 72px; padding: 9px 12px; display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; color: #c6d4ca; font-size: 10px; }
.avatar-stats b { color: #fff; font-size: 20px; }
.avatar-create-grid { display: grid; grid-template-columns: minmax(360px,.8fr) 1.2fr; gap: 20px; }
.avatar-video-drop { min-height: 330px; display: grid; place-items: center; overflow: hidden; border: 1.5px dashed #9bb3a2; border-radius: 16px; background: #f3f8f0; cursor: pointer; }
.avatar-video-drop input { display: none; }
.avatar-video-drop video { width: 100%; height: 330px; object-fit: contain; background: #102018; }
#avatarDropCopy { padding: 30px; display: flex; flex-direction: column; align-items: center; text-align: center; }
#avatarDropCopy b { font-size: 18px; }
#avatarDropCopy span { margin-top: 7px; color: #7d8c83; }
.avatar-form { display: flex; flex-direction: column; gap: 14px; }
.avatar-form label { display: flex; flex-direction: column; gap: 6px; color: #506057; font-size: 11px; font-weight: 750; }
.avatar-form input,.avatar-form select,#avatarFilter { width: 100%; border: 1px solid #d7ded8; border-radius: 10px; padding: 11px; background: #fff; outline: none; }
.upload-note { padding: 13px; display: flex; flex-direction: column; border-radius: 11px; background: #f2f6ef; }
.upload-note span { margin-top: 3px; color: #7d8c83; font-size: 11px; }
#avatarNotice.success,#avatarNotice.error { margin-top: 16px; margin-bottom: 0; }
.avatar-library { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.avatar-asset { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.avatar-asset-media { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #e8eee7; }
.avatar-asset-media img,.avatar-asset-media video { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.avatar-asset-media .avatar-placeholder { width: 100%; height: 100%; border-radius: 0; }
.avatar-state { position: absolute; top: 9px; left: 9px; padding: 4px 7px; border-radius: 6px; color: #295b39; background: rgba(229,245,229,.94); font-size: 9px; font-weight: 800; }
.avatar-state.processing,.avatar-state.queued { color: #7c531d; background: #fff1d8; }
.avatar-state.failed { color: #8b332d; background: #fae6e4; }
.avatar-asset-body { padding: 13px; }
.avatar-asset h3 { margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.avatar-asset p { color: #718078; font-size: 10px; }
.avatar-id { margin-top: 10px; padding-top: 10px; border-top: 1px solid #edf0ed; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #839087; font: 10px ui-monospace,SFMono-Regular,Menlo,monospace; }
@media(max-width:1200px){.avatar-library{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.avatar-create-grid{grid-template-columns:1fr}.avatar-library{grid-template-columns:repeat(2,minmax(0,1fr))}.header-actions{align-items:flex-end;flex-direction:column}}
@media(max-width:600px){.workspace-tabs{width:100%}.workspace-tabs button{flex:1}.avatar-library{grid-template-columns:1fr}.avatar-stats{flex-wrap:wrap}}
