/* Storyboard scenario only; shared short-drama controls keep their own tokens. */
body .studio-shell.tab-storyboard .sba-panel{width:360px;min-width:320px;flex:0 0 auto;margin-top:0;height:100%;background:#1c1c1c;border-left:1px solid #303030}
.sba-panel .sda-resize{top:0;height:100%}.sba-full-heading{display:none;align-items:center;gap:10px;padding:20px;font-size:16px}
.storyboard-chat-full .sba-full-heading{display:flex}body .studio-shell.tab-storyboard.storyboard-chat-full .sba-panel{width:100%!important;flex:1}
body .studio-shell .sba-panel .sda-scroll{padding:20px 16px}
body .studio-shell .sba-panel .sda-compose-wrap{padding:12px}
body .studio-shell .sba-panel .sda-composer{padding:10px 8px 8px;border-radius:24px;background:#262626;border:1px solid #303030}
body .studio-shell .sba-panel .sda-composer #agent-text{height:66px;min-height:66px;font-size:14px;line-height:22px;padding:4px}
.sba-panel .sda-toolbar{gap:6px;height:36px;position:relative;padding-right:40px;flex-wrap:wrap;height:auto;min-height:36px}
.sba-panel .sda-toolbar .grow{display:none}.sba-panel .sda-send{position:absolute;right:0;bottom:0}
.sba-panel .sda-skills{font-size:12px;height:32px;padding:0 10px;gap:5px}.sba-panel .sda-skills svg{width:14px!important;max-width:14px!important}
.sba-panel .sda-model{font-size:12px;height:30px;padding:0 5px;max-width:150px}
body .sba-panel .sba-resolution{font-size:12px;border-radius:32px;height:30px;padding:0 5px;gap:6px}
.sba-resolution-menu{min-width:140px}.sba-resolution-menu>button{justify-content:space-between!important}
.sba-history-empty{display:flex;min-height:300px;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-size:12px;color:#777;gap:10px}.sba-history-empty strong{font-size:14px;font-weight:500;color:#aaa}
.sba-panel .sda-history{padding:20px 16px}.sba-panel .sda-history header{border:0;padding-bottom:20px}.sba-history-trigger{width:30px;height:30px;border-radius:50%;margin:0 8px 0 0!important}.sba-history-trigger:hover{background:#333!important}
.tab-storyboard .creation-content.sda-previewing{position:relative}.tab-storyboard .sda-previewing>.sda-preview{inset:0;padding:24px;background:#252525;z-index:22}
.tab-storyboard .sda-previewing>.sda-preview .sda-diff-lines{margin-top:20px}
@media(max-width:760px){body .studio-shell.tab-storyboard .creation-workspace>.sba-panel{display:flex!important;position:relative!important;inset:auto!important;min-width:320px!important;width:360px!important;z-index:auto;height:100%!important}body .studio-shell.tab-storyboard.storyboard-chat-full .creation-workspace>.sba-panel{width:100%!important;min-width:0!important}.sba-panel .sda-resize{display:none}}
body .studio-shell.tab-storyboard .sba-panel>.sba-full-heading{position:absolute;top:-48px;left:0;right:84px;height:48px;box-sizing:border-box;display:flex;padding:0 16px;background:#1c1c1c;font-size:14px;z-index:28}
body .studio-shell.tab-storyboard.storyboard-chat-full .sba-panel>.sba-full-heading{position:static;height:48px;flex:none;width:100%;padding:0 20px}
body .studio-shell.tab-storyboard.has-native-chat .storyboard-header-controls{max-width:calc(100% - 290px)}

body .studio-shell.tab-storyboard .creation-workspace:not(.sw-chat-full)>.sba-panel{flex:0 0 var(--native-chat-width,360px)}
body .studio-shell.tab-storyboard.storyboard-chat-full .creation-workspace>.sba-panel{flex:1 1 auto}
body .studio-shell.tab-storyboard .sba-panel>.sba-full-heading{display:none}
.storyboard-topbar .sba-top-title{position:absolute;right:84px;top:0;width:calc(var(--native-chat-width,360px) - 84px);height:48px;display:flex;align-items:center;gap:12px;padding-left:16px;background:#1c1c1c;font-size:14px;z-index:2;box-sizing:border-box}
.sba-top-title img{width:24px;height:24px}.storyboard-chat-full .storyboard-topbar .sba-top-title{display:none}
body .studio-shell.tab-storyboard.storyboard-chat-full .sba-panel>.sba-full-heading{display:flex}
body .studio-shell .sba-panel .sda-compose-wrap{padding:0 16px 16px}
body .studio-shell .sba-panel .sda-composer{padding:8px;border-radius:24px;background:#262626;border:1px solid #262626;min-height:108px}
body .studio-shell .sba-panel .sda-composer #agent-text{height:52px;min-height:52px}
.sba-panel .sda-toolbar{flex-wrap:nowrap;gap:8px;overflow:hidden;padding-right:40px;height:36px}
.sba-panel .sda-toolbar>.sda-model{flex:none}.sba-panel .sba-resolution{flex:none}
.sba-panel .sda-toolbar>.sda-send{z-index:2;box-shadow:-8px 0 0 0 #262626}
.sba-panel .sda-skills>svg:nth-child(2){display:none}
.storyboard-topbar .sba-top-title{pointer-events:none}
body .studio-shell.tab-storyboard.has-native-chat:not(.storyboard-chat-full) .storyboard-header-controls{margin-right:var(--native-chat-width,360px);max-width:none;min-width:0;overflow:visible}
.storyboard-topbar .sba-history-trigger{position:absolute;right:72px;top:9px;z-index:3;margin:0!important}
.storyboard-topbar .storyboard-header-layout{position:absolute;right:16px;top:9px;z-index:3}
body .studio-shell.tab-storyboard.has-native-chat:not(.storyboard-chat-full) .storyboard-topbar:after{content:'';position:absolute;right:0;top:0;width:84px;height:48px;background:#1c1c1c;z-index:1}
body .studio-shell.tab-storyboard.has-native-chat .storyboard-header-layout>summary{background:#262626}
.sba-model-menu{width:400px;padding:8px;border-radius:22px;background:#242424}.sba-model-menu>button{min-height:64px;height:64px;border-radius:14px}.sba-model-menu>button>img{width:24px;height:24px}.sba-model-menu strong{font-size:13px}.sba-model-menu small{font-size:11px;line-height:18px}.sba-model-menu button:disabled{opacity:.45;cursor:default}
.sba-panel .sda-toolbar>.sda-model,.sba-panel .sda-toolbar>.sba-resolution{color:#bbb;font-weight:400;border:1px solid #ffffff05;border-radius:0;height:30px}.sba-panel .sda-toolbar>.sda-model{border-right:0;margin-left:0}.sba-panel .sda-toolbar>.sba-resolution{margin-left:-8px}

.sba-media-job{margin:12px 0}.sba-media-job figure{margin:8px 0}.sba-media-job img,.sba-media-job video{display:block;width:100%;max-height:320px;object-fit:contain;border-radius:12px;background:#111}.sba-media-job progress{width:100%;accent-color:#eee}.sba-media-job figcaption{padding:8px 0;color:#bbb}

/* Observed storyboard history: pre-edit snapshot, centered diff dialog. */
.sba-panel .sda-history{padding:0 20px}.sba-panel .sda-history>header{height:57px;padding:0;border-bottom:1px solid #ffffff1f}.sba-panel .sda-history h3{color:#fff;font-size:14px;font-weight:500;margin:24px 0 16px}.sba-panel .sda-history article{padding:12px 14px;border:1px solid transparent;border-radius:16px;background:#ffffff0a;margin-bottom:10px}.sba-panel .sda-history article>strong{font-size:14px;line-height:21px;display:block;font-weight:500}.sba-panel .sda-history article p{font-size:13px;line-height:19.5px;margin:4px 0 14px}.sba-panel .sda-history article>div{gap:8px}.sba-panel .sda-history article button{height:32px;padding:0 14px!important;background:transparent!important;border-radius:32px;font-size:12px}.sba-panel .sda-history article button:hover{background:#ffffff0a!important}
.sba-history-diff{width:1180px;max-width:calc(100vw - 48px);max-height:calc(100dvh - 64px);padding:0;background:#1c1c1c;color:#fff;border:1px solid #ffffff1f;border-radius:32px;box-sizing:border-box;overflow:hidden;font:14px/21px -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.sba-history-diff::backdrop{background:#0009;backdrop-filter:blur(6px)}.sba-history-diff>header{padding:24px 24px 12px}.sba-history-diff h2{font-size:16px;line-height:24px;font-weight:500;margin:0 0 6px}.sba-history-diff p{font-size:13px;line-height:19.5px;color:#888;margin:0}.sba-history-diff .sba-diff-close{position:absolute;top:16px;right:16px;width:32px;height:32px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:#ffffff0a;color:#fff;cursor:pointer}.sba-diff-close svg{width:14px;height:14px}.sba-diff-body{padding:0 24px 32px;overflow:auto;max-height:calc(100dvh - 164px)}.sba-diff-tools{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin-bottom:16px}.sba-diff-tools>span,.sba-diff-body section>header>span{border-radius:20px;background:#ffffff0a;padding:0 10px;font-size:12px}.sba-diff-tools label{display:flex;gap:12px;align-items:center}.sba-diff-tools input{appearance:none;width:28px;height:16px;background:#555;border-radius:16px;position:relative;cursor:pointer;margin:0}.sba-diff-tools input:before{content:'';position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff}.sba-diff-tools input:checked{background:#fff}.sba-diff-tools input:checked:before{left:14px;background:#262626}.sba-diff-body section{border:1px solid #ffffff1f;border-radius:32px;margin-top:12px;padding:20px;overflow:hidden}.sba-diff-body section>header{display:flex;justify-content:space-between;font-size:14px;font-weight:500;margin-bottom:20px}.sba-diff-lines>div{display:grid;grid-template-columns:1fr 1fr;align-items:stretch}.sba-diff-lines span{border-bottom:1px solid #ffffff08;padding:0 6px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:21px;min-height:21px}.sba-diff-lines i,.sba-diff-lines em{display:inline-block;min-width:18px;font-style:normal;color:#888}.sba-diff-lines em{min-width:38px;text-align:right;margin-right:10px}.sba-diff-lines .added{background:#90b75112}.sba-diff-lines .removed{background:#da636312}.sba-diff-lines .added i{color:#7ca453}.sba-diff-lines .removed i{color:#c86c6c}.sba-history-confirm{background:#1c1c1c;border-radius:24px;padding:24px;width:480px}.sba-history-confirm h2{font-size:16px;margin:0 0 16px}.sba-history-confirm p{margin:0;color:#aaa}.sba-history-confirm::backdrop{backdrop-filter:blur(6px)}
@media(max-width:760px){.sba-history-diff{max-width:calc(100vw - 24px);border-radius:24px}.sba-history-diff>header{padding:20px 16px 12px}.sba-diff-body{padding:0 16px 20px}.sba-diff-body section{padding:12px;border-radius:20px}.sba-diff-lines em{min-width:16px;margin-right:4px}}

.sba-diff-tools input{min-height:0;padding:0;box-sizing:border-box;flex:none}.sba-diff-lines>div>span:first-child{border-right:1px solid #ffffff1f}.sba-diff-lines>div:last-child>span{border-bottom:0}

.sba-panel .sda-history>header{height:65px}.sba-panel .sda-history h2{line-height:18px}.sba-panel .sda-history h3{color:#ffffff80;font-weight:400;margin-top:24px}
.sba-history-diff{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}
@media(max-width:760px){.sba-history-diff{border-radius:32px}.sba-history-diff>header{padding:24px 24px 12px}.sba-diff-body{padding:0 24px 32px;max-height:calc(100dvh - 180px)}.sba-diff-tools{align-items:flex-start;flex-direction:column;gap:16px}.sba-diff-body section{padding:20px;border-radius:32px}.sba-diff-lines>div{grid-template-columns:1fr}.sba-diff-lines>div>span:first-child{border-right:0}.sba-diff-lines .same>span:nth-child(2){display:none}.sba-diff-lines em{min-width:38px;margin-right:10px}}
