/* Compact 48px editor toolbar, without commerce or membership controls. */
body .studio-shell .storyboard-topbar{height:48px;min-height:48px;padding:0 8px 0 24px;gap:0;background:#252525;color:#f0f0f0;overflow:visible;z-index:25}
body .studio-shell.tab-storyboard.has-native-chat>.storyboard-topbar{width:100%}
body .studio-shell.tab-storyboard .agent-panel{margin-top:0;height:100%}
.storyboard-topbar button,.storyboard-topbar summary{font-family:inherit;font-size:12px;font-weight:400;color:inherit;white-space:nowrap}
.storyboard-topbar button{border:0;background:transparent;cursor:pointer}
.storyboard-topbar .icon{width:14px;height:14px;flex:none;stroke-width:1.65}
.storyboard-header-breadcrumb{display:flex;align-items:center;gap:14px;min-width:0}
.storyboard-header-breadcrumb>[data-action=tab]{padding:0;height:32px}
.storyboard-header-slash{font-size:13px;color:#8e8e8e}
.storyboard-header-episode{width:184px;min-width:100px}
.storyboard-header-episode>summary{padding:0!important;height:32px;max-width:184px}
.storyboard-header-episode>summary>span{overflow:hidden;text-overflow:ellipsis}
.storyboard-header-episode>summary>.icon{display:none}
.storyboard-header-directory{display:grid;place-items:center;width:28px;height:28px;padding:6px;margin-left:3px;border-radius:5px}
.storyboard-header-directory:hover,.storyboard-header-menu>summary:hover{background:#333}
.storyboard-header-save{display:inline-flex;align-items:center;gap:6px;margin-left:20px;font-size:12px;white-space:nowrap;color:#44c65b;line-height:1}
.storyboard-header-save:before{content:'';width:7px;height:7px;border-radius:50%;background:#57e66e;box-shadow:0 0 0 1px #ffffff14}
.storyboard-header-save.is-dirty,.storyboard-header-save.is-saving{color:#d5aa65}
.storyboard-header-save.is-dirty:before,.storyboard-header-save.is-saving:before{background:#d5aa65}
.storyboard-header-controls{display:flex;align-items:center;flex:none;margin-left:20px;gap:0;height:100%}
.storyboard-header-menu{position:relative;min-width:0}
.storyboard-header-menu>summary{display:flex;align-items:center;gap:6px;height:30px;padding:0 8px;list-style:none;cursor:pointer;border-radius:5px;line-height:1.4;user-select:none}
.storyboard-header-menu>summary::-webkit-details-marker{display:none}
.storyboard-header-menu>summary>.icon:last-child{width:12px;height:12px;color:#909090}
.storyboard-header-style{max-width:184px;overflow:hidden;text-overflow:ellipsis}
.storyboard-header-separator{width:1px;height:12px;background:#494949;margin:0 2px}
.storyboard-header-options{position:absolute;right:0;top:calc(100% + 8px);min-width:160px;max-width:300px;max-height:min(380px,70vh);overflow:auto;padding:5px;border:1px solid #414141;border-radius:9px;background:#292929;box-shadow:0 8px 24px #0006;z-index:80}
.storyboard-header-episode .storyboard-header-options{left:0;right:auto;min-width:220px}
.storyboard-header-options>button{width:100%;min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left;padding:7px 9px;border-radius:5px}
.storyboard-header-options>button:hover,.storyboard-header-options>button:focus-visible{background:#3b3b3b}
.storyboard-header-options>button[aria-checked=true]{color:#fff}
.storyboard-header-compose{height:30px;border-radius:18px!important;background:#eeeeee!important;color:#161616!important;padding:0 12px!important;margin:0 8px;font-size:12px}
.storyboard-header-compose:disabled{cursor:default;background:#303030!important;color:#626262!important}
.storyboard-header-layout>summary{border-radius:20px;background:#080808;padding:0 10px;gap:8px}
.storyboard-header-layout>summary:hover{background:#141414}
.storyboard-header-layout>summary>.icon:last-child{color:#eee}
.storyboard-header-episode-title{display:block;width:184px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.storyboard-topbar .storyboard-header-episode{width:28px;min-width:28px;margin-left:3px}
.storyboard-topbar .storyboard-header-episode>summary{display:grid;place-items:center;width:28px;height:28px;padding:6px!important}
.storyboard-topbar .storyboard-header-episode>summary>.icon{display:block;width:14px;height:14px;color:#bbb}
.storyboard-topbar .storyboard-header-episode>summary>.icon:last-child:not(:first-child){display:none}
.storyboard-topbar .storyboard-header-episode .storyboard-header-options{min-width:136px;width:136px;padding:8px;left:0;top:calc(100% + 2px);border-radius:16px}
.storyboard-topbar .storyboard-header-episode .storyboard-header-options>button{min-height:40px;justify-content:flex-start;gap:12px;font-size:14px}
.storyboard-topbar .storyboard-header-episode .storyboard-header-options>button>.icon:last-child:not(:first-child){margin-left:auto}
.storyboard-menu-divider{height:1px;background:#414141;margin:4px -8px}
.storyboard-header-layout .storyboard-header-options{width:200px;min-width:200px;border-radius:24px;padding:8px}
.storyboard-display-heading{font-size:14px;color:#8b8b8b;padding:6px 12px}
.storyboard-header-layout .storyboard-header-options>button{min-height:40px;font-size:14px;justify-content:flex-start;padding:8px 12px;gap:12px}
.storyboard-header-layout .storyboard-header-options>button>.icon{width:20px;height:20px;color:#b5b5b5}
.storyboard-topbar .native-style-panel{z-index:90}
.storyboard-topbar .native-style-menu[open]::after{display:none}
.storyboard-topbar .native-style-card{white-space:normal}
.storyboard-chat-full .creation-content{display:none!important}
body .studio-shell.tab-storyboard.storyboard-chat-full .agent-panel{width:100%;max-width:none;flex:1;min-width:0;border-left:0}
body .studio-shell.tab-storyboard.storyboard-chat-full .agent-scroll{width:100%}
body .studio-shell.tab-storyboard.storyboard-chat-full .agent-compose-wrap{width:100%}
@media(max-width:1200px){.storyboard-header-episode{width:145px}.storyboard-header-save{margin-left:12px}.storyboard-header-style{max-width:130px}.storyboard-header-controls{margin-left:12px}}
@media(max-width:1000px){body .studio-shell .storyboard-topbar{padding-left:12px}.storyboard-header-episode{width:115px}.storyboard-header-save{margin-left:8px}.storyboard-header-controls{margin-left:8px}.storyboard-header-menu>summary{padding:0 6px}.storyboard-header-style{max-width:90px}.storyboard-header-compose{padding:0 8px!important;margin:0 5px}}
@media(max-width:820px){body .studio-shell .storyboard-topbar{overflow-x:auto;scrollbar-width:none}.storyboard-topbar>.grow{min-width:12px}.storyboard-header-breadcrumb,.storyboard-header-directory,.storyboard-header-save{flex:none}.storyboard-header-options{position:fixed;top:48px;right:12px;left:auto;max-height:60vh}.storyboard-header-episode .storyboard-header-options{left:60px;right:auto}}

/* Menus stay outside the horizontal toolbar clipping region. */
.storyboard-header-controls{overflow:visible}
#modal.episode-readiness-modal{width:480px;max-width:calc(100vw - 32px);padding:32px;border:0;border-radius:12px;background:#29292f}
#modal.episode-readiness-modal .modal-head{padding:0;border:0;margin:0 0 16px}
#modal.episode-readiness-modal h2{font-size:16px;line-height:24px;font-weight:600}
#modal.episode-readiness-modal h2:before{content:'!';display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#ffd33d;color:#29292f;margin-right:12px;font-size:12px}
#modal.episode-readiness-modal .modal-body{padding:0;color:#aaa9b2;font-size:13px;line-height:21px}
#modal.episode-readiness-modal .modal-body p{margin:0}
#modal.episode-readiness-modal .modal-foot{padding:14px 0 0;border:0;justify-content:flex-end;gap:10px}
#modal.episode-readiness-modal .btn{min-height:38px;padding:0 18px;border-radius:8px;font-size:14px;font-weight:600}
#modal.episode-readiness-modal .episode-improve{background:#3a3a42;border:1px solid #58585f;color:#f0f0f2}
#modal.episode-readiness-modal .episode-proceed{background:#f36661;color:#191919;border:0}

.storyboard-director-menu{position:fixed;z-index:150;width:248px;max-height:360px;overflow:auto;padding:8px;border:1px solid #414141;border-radius:12px;background:#292929;box-shadow:0 8px 24px #0006;font-size:13px;color:#eee}.storyboard-director-menu button{display:flex;align-items:center;gap:10px;background:transparent;color:inherit;border:0;width:100%;padding:12px;text-align:left;border-radius:7px;cursor:pointer}.storyboard-director-menu button:hover{background:#3b3b3b}.storyboard-director-menu hr{border:0;border-top:1px solid #414141}.storyboard-director-menu>span,.storyboard-director-menu>p{display:block;padding:8px 12px;color:#909090;margin:0}
#modal.episode-readiness-modal::backdrop{background:rgba(0,0,0,.58);backdrop-filter:none}
#modal.episode-readiness-modal .modal-foot{background:transparent}
