/* Persistent workspace panes share the accepted Editorial Lab tokens. */
body{height:100dvh;overflow:hidden;--sidebar-width:204px;--chat-width:360px}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.sidebar{width:var(--sidebar-width);padding:18px 12px 12px;overflow-y:auto;scrollbar-width:thin}
.brand{padding:0 8px;font-size:22px}
.new-chat{margin:18px 5px 0;justify-content:flex-start;min-height:38px;background:var(--surface);box-shadow:0 1px 2px #20282006}
.new-chat>span{font-size:20px;font-weight:400;line-height:1}
.channel-switch{margin:18px 5px 14px}
.chat-history{margin:0 5px 4px;border-bottom:1px solid var(--border);padding:0 0 12px}
.history-count{font-size:10px;font-weight:400;color:var(--muted);margin-left:3px}
.history-account{margin:0 0 4px;font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conversation-search{width:100%;height:30px;padding:5px 8px;border:1px solid var(--border);border-radius:6px;font-size:11px;background:#ffffffa6;color:var(--ink);margin-top:5px}
.chat-history summary{font-size:11px;font-weight:600;color:var(--muted);cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;padding:7px 0}
.chat-history summary:after{content:'−';font-size:15px}
.chat-history:not([open]) summary:after{content:'+'}
#conversation-list{display:grid;gap:3px;margin-top:7px;max-height:27vh;min-height:42px;overflow-y:auto;scrollbar-width:thin}
#conversation-list>.caption{padding:0 8px;font-size:11px;margin:3px 0 0}
.conversation-button{display:block;min-width:0;width:100%;border:0;background:transparent;color:var(--muted);border-radius:6px;padding:8px 9px;font-size:12px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:32px}
.history-retry{font-size:11px;text-align:left;padding:5px 8px;border:0;background:none;color:var(--moss);text-decoration:underline}
.conversation-button:hover{background:#eaece2;color:var(--ink)}
.conversation-button[aria-current=true]{background:var(--moss-soft);color:var(--moss);font-weight:600}
.nav-label{margin:18px 12px 10px;font-size:10px}
.nav-link{padding:8px 11px;gap:10px;font-size:12px;min-height:36px}
.nav-link svg{width:16px;height:16px}
.sidebar-bottom{margin-top:20px;padding:16px 9px 0;font-size:12px}
.sidebar-bottom .caption{font-size:10px;margin-left:13px}
.workspace{margin-left:var(--sidebar-width);height:100dvh;display:flex;flex-direction:column;min-width:0}
.topbar{height:44px;min-height:44px;padding:0 14px;background:#f9f8f2}
.workspace-heading{display:flex;align-items:center;gap:8px;min-width:0}
#breadcrumb{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#sidebar-toggle{display:grid;flex:none;font-size:17px;width:30px;height:30px}
.top-actions{gap:10px}
.mode-switch button{font-size:10px;min-height:28px}
.studio-workbench{display:grid;grid-template-columns:minmax(280px,var(--chat-width)) 6px minmax(0,1fr);flex:1;min-height:0}
.chat-panel{display:flex;flex-direction:column;min-width:0;min-height:0;background:#fcfbf7}
.pane-divider{display:flex;align-items:center;justify-content:center;background:#f2f2e9;cursor:col-resize;touch-action:none;border-inline:1px solid var(--border);outline-offset:-2px}
.pane-divider>span{width:2px;height:30px;border-radius:3px;background:#b5c0ac}
.pane-divider:hover,.pane-divider:focus-visible{background:var(--moss-soft)}
body[data-pane-resizing=true]{cursor:col-resize;user-select:none}
body[data-pane-resizing=true] #browser-frame{pointer-events:none}
.pane-control{border:1px solid var(--border);border-radius:6px;background:transparent;color:var(--muted);font-size:11px;min-height:30px;padding:5px 9px;white-space:nowrap}
.pane-control:hover{background:var(--moss-soft);color:var(--moss)}
.pane-heading{height:44px;min-height:44px;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 16px;border-bottom:1px solid var(--border)}
.chat-heading-line{display:flex;align-items:center;gap:12px;min-width:0}
.pane-heading h2{font-size:16px;letter-spacing:-.3px;margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}
.runtime-label{display:flex;gap:7px;align-items:center;color:var(--muted);font-size:11px;line-height:1.5;margin:0}
.connection-light{width:6px;height:6px;border-radius:50%;background:var(--ochre);flex:none}
.runtime-label[data-state=ready] .connection-light{background:var(--moss)}
.runtime-label[data-state=error] .connection-light,.runtime-label[data-state=unavailable] .connection-light{background:var(--danger)}
.chat-messages{flex:1;overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin;padding:20px 18px 16px}
.chat-history-more{padding:7px 20px 0;background:#fcfbf7;text-align:center}
.chat-history-more .button{font-size:10px;min-height:28px;padding:4px 10px}
.chat-empty{max-width:310px;margin:auto;min-height:100%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:24px 0 42px}
.chat-empty h2{font-size:21px;letter-spacing:-.4px;margin-bottom:10px;line-height:1.3}
.chat-empty p{font-size:13px;color:var(--muted);line-height:1.6;margin:0;max-width:270px}
.chat-message{margin-bottom:26px;min-width:0}
.message-author{font-size:11px;font-weight:600;color:var(--moss);margin-bottom:9px;display:flex;align-items:center;gap:8px}
.message-author time{margin-left:auto;font-weight:400;color:var(--muted);font-size:10px}
.chat-message[data-role=user] .message-body{background:#eeeee5;border:1px solid #e4e5db;padding:13px 15px;border-radius:10px}
.chat-message[data-role=user] .message-author{color:var(--muted)}
.message-body{font-size:14px;line-height:1.75;overflow-wrap:anywhere}
.message-body p{margin:0 0 12px;white-space:pre-wrap}
.message-body p:last-child{margin-bottom:0}
.message-body ul,.message-body ol{padding-left:22px;margin:8px 0 15px}
.message-body li{margin:5px 0}
.message-body h2,.message-body h3,.message-body h4{font-size:16px;line-height:1.4;margin:18px 0 9px;letter-spacing:-.2px}
.message-body code{background:#eeeee6;border:1px solid #e2e4da;border-radius:4px;padding:1px 4px;font:12px/1.5 Consolas,monospace}
.message-body pre{padding:14px;background:#f2f2eb;border:1px solid var(--border);border-radius:7px;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;font:12px/1.6 Consolas,monospace;margin:12px 0 16px;max-width:100%}
.message-body pre code{padding:0;border:0;background:none}
.message-body a{color:var(--moss);text-decoration:underline;text-underline-offset:3px}
.message-body blockquote{margin:12px 0;padding:0 0 0 14px;border-left:2px solid #c4cdbd;color:var(--muted)}
.chat-message[data-streaming=true] .message-author:after{content:'Working';font-weight:400;color:var(--muted);font-size:10px}
.chat-action{margin:10px 0 16px;padding:11px 13px;border:1px solid #e0e3d6;border-radius:7px;background:#f6f7ee;font-size:12px;color:var(--muted)}
.chat-action summary{cursor:pointer;display:flex;align-items:center;gap:8px;list-style:none;font-size:12px;color:var(--ink)}
.chat-action .action-state{margin-left:auto;color:var(--muted);font-size:10px}
.chat-action pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0 0;font-size:11px;max-height:260px;overflow:auto}
.chat-composer{border-top:1px solid var(--border);padding:12px 14px 9px;background:#fcfbf7}
.chat-composer textarea{display:block;min-height:62px;max-height:180px;font-size:14px;padding:10px 12px;background:white;border-color:#d4d8c9;resize:none;line-height:1.5;overflow-y:auto}
.composer-actions{display:flex;align-items:center;gap:8px;margin-top:8px}
.composer-actions>.caption{flex:1;font-size:10px;line-height:1.5;min-width:0}
.composer-actions .button{flex:none}
.composer-help{font-size:10px;margin:6px 0 0;color:#6c7465}
.workspace-notice{font-size:12px;line-height:1.6;padding:12px 15px;background:#f5ecd9;color:#76582c;border-bottom:1px solid #e8dbc2;overflow-wrap:anywhere}
.workspace-notice.error{background:#f8e9e3;color:var(--danger);border-color:#e9cfc7}
.workspace-notice button{margin-top:8px}
.chat-requests{max-height:44vh;overflow:auto;scrollbar-width:thin}
.chat-request{padding:16px 22px;border-top:1px solid var(--border);background:#f5f4e9;font-size:12px;line-height:1.6}
.chat-request h3{font-size:14px;margin:0 0 7px}
.chat-request p{margin-bottom:9px}
.chat-request .request-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.chat-request label{display:block;font-weight:600;margin:10px 0 5px;font-size:12px}
.chat-request select,.chat-request input{width:100%;border:1px solid #d0d5c4;background:white;border-radius:6px;min-height:38px;padding:7px 9px;font-size:12px;color:var(--ink)}
.chat-request pre{font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:160px;overflow:auto;margin:10px 0;background:#fff9;padding:10px;border:1px solid var(--border);border-radius:6px}
.preview-panel{display:flex;flex-direction:column;min-width:0;min-height:0;background:#efefe7}
.preview-tabbar{height:38px;min-height:38px;display:flex;align-items:stretch;border-bottom:1px solid var(--border);padding:0 12px;gap:15px;background:#f9f8f2;overflow-x:auto;scrollbar-width:thin}
.preview-tabbar>button{border:0;border-bottom:2px solid transparent;background:none;font-size:12px;padding:0 2px;color:var(--muted);flex:none;white-space:nowrap;min-height:36px}
.preview-tabbar>#preview-expand{margin-left:auto;align-self:center;min-height:27px;padding:4px 8px;border:1px solid var(--border);border-radius:5px;font-size:10px}
.preview-tabbar>button[aria-selected=true]{border-bottom-color:var(--moss);color:var(--moss);font-weight:600}
.preview-tabbar>.caption{margin-left:auto;align-self:center;font-size:10px;white-space:nowrap;flex:none}
.module-pane{flex:1;min-height:0;min-width:0;overflow-y:auto;background:var(--canvas);scrollbar-width:thin}
.module-mount{min-height:100%;min-width:0}
.source-pane{overflow:hidden}
.source-pane>.module-mount,.artifact-pane>.module-mount{height:100%;min-height:0;display:flex;flex-direction:column}
.workspace-tools{display:grid;gap:3px;margin-top:13px;padding-top:13px;border-top:1px solid var(--border)}
.workspace-tools .nav-link{width:100%;border:0;background:none;text-align:left;color:var(--muted)}
.workspace-tools .nav-link:hover{background:var(--moss-soft);color:var(--moss)}
.nav-count{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 4px;border-radius:5px;font-size:10px;font-weight:600;background:var(--moss-soft);color:var(--moss);margin-left:5px}
.workspace-uncommissioned{max-width:660px;margin:auto}
.workspace-uncommissioned h1{font-size:29px;letter-spacing:-.6px;margin-bottom:14px;line-height:1.2}
.workspace-uncommissioned p{line-height:1.7;color:var(--muted);font-size:13px}
.workspace-uncommissioned .button{margin-top:12px}
.browser-pane{display:flex;flex-direction:column;flex:1;min-height:0}
.browser-tabs-row{display:flex;align-items:center;border-bottom:1px solid var(--border);min-height:33px;padding:0 8px;background:#f1f0e8;gap:5px}
.browser-tabs{display:flex;gap:4px;overflow-x:auto;min-width:0;flex:1;scrollbar-width:thin}
.browser-tab-group{display:flex;align-items:center;max-width:190px;min-width:100px;border:1px solid transparent;border-bottom:0;border-radius:6px 6px 0 0;margin-top:5px;flex:none}
.browser-tab-group[data-active=true]{background:#fbfbf7;border-color:var(--border)}
.browser-tab-button{border:0;background:transparent;border-radius:6px 0 0 0;padding:7px 8px;max-width:158px;min-width:0;font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.browser-tab-button:hover{background:#e8e9df}
.browser-tab-button[aria-current=true]{background:#fbfbf7;border-color:var(--border);color:var(--ink)}
.browser-tab-close{border:0;background:transparent;color:var(--muted);font-size:16px;line-height:1;width:25px;height:28px;border-radius:4px;margin-right:2px;flex:none}
.browser-tab-close:hover{background:#e4e6dc;color:var(--ink)}
.browser-navigation{display:flex;gap:7px;padding:6px 10px;border-bottom:1px solid var(--border);background:#fbfbf7;align-items:center}
.browser-nav-buttons{display:flex;gap:1px}
.browser-nav-buttons .icon-button{width:28px;height:30px;font-size:17px}
#browser-url{border:1px solid #d9ddcf;background:white;border-radius:6px;min-width:0;flex:1;height:34px;padding:6px 10px;font-size:12px;color:var(--ink)}
.browser-info{display:flex;justify-content:space-between;gap:12px;font-size:10px;line-height:1.5;padding:8px 14px;background:#f7f7f0;border-bottom:1px solid var(--border);color:var(--muted)}
.browser-info>.caption{white-space:nowrap;font-size:10px}
.browser-surface{position:relative;flex:1;min-height:0;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#e5e7dd;padding:0;overscroll-behavior:contain}
#browser-frame{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;background:white;outline-offset:-3px;cursor:default;user-select:none}
.browser-empty{max-width:390px;text-align:center;padding:25px}
.browser-empty h2{font-size:21px;letter-spacing:-.4px;line-height:1.3;margin-bottom:10px}
.browser-empty p{font-size:13px;line-height:1.7;color:var(--muted);margin:0 0 22px}
.browser-empty p.caption{font-size:11px;margin:22px 0 0}
.browser-bottom{min-height:24px;padding:2px 10px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid var(--border);background:#f9f8f2}
.browser-bottom>.caption{font-size:10px}
.browser-bottom .button{min-height:23px;padding:1px 7px;font-size:10px}
.studio-pane{min-height:0;flex:1;overflow-y:auto;scrollbar-width:thin;background:var(--canvas)}
.studio-pane main{padding:28px 26px 46px;min-height:100%;max-width:none}
.studio-pane .page-head{margin-bottom:25px;gap:18px;flex-wrap:wrap}
.studio-pane .page-head h1{font-size:29px;line-height:1.2;letter-spacing:-.6px}
.studio-pane .page-head p{font-size:13px}
.studio-pane .columns,.studio-pane .split,.studio-pane .workflow-shell{grid-template-columns:1fr}
.studio-pane .columns>aside{display:block}
.studio-pane .panel{padding:20px}
.studio-pane .proposal h2{font-size:26px}
.studio-pane .portrait-placeholder{display:none}
.studio-pane .proposal-body{grid-template-columns:1fr}
.studio-pane .policy-strip{gap:12px}
.studio-pane .date-block{display:none}
.studio-pane .select-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.studio-pane .detail-grid{gap:17px}
.studio-pane .master-layout{grid-template-columns:1fr}
.studio-pane .master-video{max-width:290px;margin:auto}
.studio-pane .status-table{font-size:12px}
.studio-pane .status-table th,.studio-pane .status-table td{padding:12px 7px}
.studio-pane .workflow-shell>.select-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.app-footer{flex:none;font-size:9px;min-height:22px;padding:3px 14px;white-space:nowrap;overflow:hidden}
.app-footer>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#request-recovery{margin:0;padding:14px 22px;border-radius:0;border-width:1px 0 0;font-size:12px}
#request-recovery h3{font-size:14px}
#request-recovery p{margin-bottom:10px}
.mobile-pane-switch{display:none}
/* Pane controls preserve chat and browser state while reclaiming screen space. */
@media(min-width:721px){
body[data-sidebar-collapsed=true] .sidebar,body[data-preview-expanded=true] .sidebar{display:none}
body[data-sidebar-collapsed=true] .workspace,body[data-preview-expanded=true] .workspace{margin-left:0}
body[data-chat-collapsed=true] .chat-panel,body[data-preview-expanded=true] .chat-panel,body[data-chat-collapsed=true] .pane-divider,body[data-preview-expanded=true] .pane-divider{display:none}
body[data-chat-collapsed=true] .studio-workbench,body[data-preview-expanded=true] .studio-workbench{grid-template-columns:minmax(0,1fr)}
body[data-chat-collapsed=true] .preview-panel,body[data-preview-expanded=true] .preview-panel{grid-column:1}
}
@media(max-width:720px){.pane-divider,#chat-toggle,#preview-expand{display:none!important}.chat-heading-line{gap:10px}.preview-tabbar{gap:16px}.sidebar .chat-history{max-height:35vh}.topbar{padding:0 10px}.chat-empty h2{font-size:21px}}
@media(min-width:1600px){.studio-pane main{max-width:1380px;margin:auto}.studio-pane .columns{grid-template-columns:minmax(0,1fr) 270px}.studio-pane .columns>aside{display:block}.studio-pane .master-layout{grid-template-columns:240px minmax(0,1fr)}}
@media(max-width:1100px){.sidebar{width:180px;padding-left:10px;padding-right:10px}.workspace{margin-left:180px}.brand{font-size:20px;padding:0 5px}.brand svg{width:27px}.brand small{letter-spacing:1.4px;font-size:7px}.studio-workbench{grid-template-columns:minmax(280px,var(--chat-width)) 6px minmax(0,1fr)}.topbar{padding:0 15px}.pane-heading{padding:8px 16px}.chat-messages{padding:20px 19px}.chat-composer{padding:12px 14px 9px}.studio-pane main{padding:25px 19px}.owner-name{display:none}.browser-navigation{gap:5px;padding:9px}.browser-nav-buttons .icon-button{width:24px}.preview-tabbar>.caption{display:none}.browser-info>.caption{display:none}}
@media(max-width:860px){.sidebar{width:164px}.workspace{margin-left:164px}.brand{font-size:18px;gap:6px}.brand small{letter-spacing:1px}.brand svg{width:25px}.channel-switch select{font-size:11px}.studio-workbench{grid-template-columns:minmax(280px,var(--chat-width)) 6px minmax(0,1fr)}.topbar{padding:0 12px}.mode-switch{display:none}.browser-nav-buttons{gap:0}.browser-navigation{flex-wrap:wrap}.browser-nav-buttons{order:1}.browser-navigation .button{order:2;margin-left:auto}#browser-url{flex-basis:100%;order:3}.browser-bottom>.caption{display:none}.browser-bottom{justify-content:flex-end}.preview-tabbar{padding:0 13px}.studio-pane main{padding:22px 15px}.studio-pane .detail-grid{grid-template-columns:1fr}.studio-pane .detail-field.full{grid-column:auto}.studio-pane .select-list,.studio-pane .workflow-shell>.select-list{grid-template-columns:1fr}.studio-pane .status-table thead{display:none}.studio-pane .status-table,.studio-pane .status-table tbody,.studio-pane .status-table tr,.studio-pane .status-table td{display:block}.studio-pane .status-table tr{padding:10px 0;border-bottom:1px solid var(--border)}.studio-pane .status-table td{padding:5px 0;border:0}.chat-empty h2{font-size:23px}.composer-actions{flex-wrap:wrap}.composer-actions>.caption{flex-basis:100%}.composer-actions .button{margin-left:auto}.composer-actions .button+.button{margin-left:0}}
@media(max-width:720px){.sidebar{position:fixed;inset:0 auto 0 0;width:224px;padding:22px 14px;background:#f1f0e8;border-right:1px solid var(--border);border-bottom:0;z-index:20;box-shadow:4px 0 30px #20282015;transform:translateX(-100%);transition:transform .18s}.sidebar nav{display:grid;overflow:visible;gap:4px;padding:0;margin:0}.sidebar .nav-label,.sidebar-bottom{display:block}.nav-link svg{display:block}.nav-link{white-space:normal;min-height:40px;padding:9px 11px}.brand{font-size:23px}.brand svg{width:31px}.brand small{font-size:8px;letter-spacing:1.7px}.channel-switch{max-width:none;margin:24px 5px 18px}.channel-switch select{font-size:13px}.workspace{margin-left:0;height:100dvh}.topbar{height:53px;min-height:53px;padding:0 12px;flex-wrap:nowrap;gap:8px}.workspace-heading{flex:1}#sidebar-toggle{display:grid;flex:none}.top-actions{width:auto;gap:4px}.top-actions #refresh{display:none}.top-actions .button{font-size:10px;min-height:30px;padding:5px 9px}#breadcrumb{font-size:10px}.mobile-pane-switch{display:flex;align-items:center;border-bottom:1px solid var(--border);padding:5px 12px;gap:4px;background:#f9f8f2;min-height:42px}.mobile-pane-switch>button{min-height:31px;border:0;border-radius:6px;background:none;padding:5px 11px;color:var(--muted);font-size:12px}.mobile-pane-switch>button[aria-pressed=true]{background:var(--moss-soft);color:var(--moss);font-weight:600}.studio-workbench{display:flex;min-height:0}.chat-panel,.preview-panel{width:100%;flex:1}.preview-panel{display:none}body[data-mobile-pane=preview] .chat-panel{display:none}body[data-mobile-pane=preview] .preview-panel{display:flex}body[data-sidebar-open=true] .sidebar{transform:translateX(0)}body[data-sidebar-open=true]:after{content:'';position:fixed;inset:53px 0 0 224px;background:#2028203d;z-index:19}.pane-heading{height:44px;min-height:44px;padding:8px 16px}.pane-heading h2{font-size:16px}.chat-messages{padding:20px 18px}.chat-composer{padding:13px 16px 9px}.chat-empty{padding:20px 0 30px}.chat-composer textarea{min-height:62px}.composer-actions{flex-wrap:nowrap}.composer-actions>.caption{flex-basis:auto}.composer-actions .button{margin-left:0}.chat-request{padding:15px 18px}.app-footer{padding:3px 13px;font-size:9px;min-height:22px;display:flex}.app-footer>span{display:block;margin:0}.preview-tabbar{height:38px;min-height:38px}.browser-navigation{flex-wrap:nowrap;padding:9px 11px}.browser-nav-buttons{order:0}.browser-navigation .button{order:0;margin:0}#browser-url{flex-basis:auto;order:0}.browser-info>.caption{display:block;font-size:9px}.browser-bottom>.caption{display:block}.browser-bottom{justify-content:space-between}.browser-surface{padding:0}.studio-pane main{padding:26px 18px}.studio-pane .page-head h1{font-size:29px}.studio-pane .panel{padding:19px}.studio-pane .select-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.browser-nav-buttons .icon-button{width:22px}.browser-navigation{gap:4px;padding:8px}.browser-navigation .button{padding:5px 8px;font-size:11px}.browser-info>.caption{display:none}.browser-bottom>.caption{font-size:9px;max-width:210px}.studio-pane .select-list{grid-template-columns:1fr}.composer-actions>.caption{font-size:9px}.composer-help{font-size:9px}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}
.schedule-status{margin:16px;padding:20px}.schedule-status label{display:flex;gap:10px;align-items:center;margin:12px 0}.schedule-status p{overflow-wrap:anywhere}
