/* Scoped to the connected workspace; tool dialogs retain their existing layout. */
.zenshi-rich{font:400 15px/1.7 Arial,sans-serif;white-space:normal!important;overflow-wrap:anywhere;color:inherit}
.zenshi-rich p{font:inherit!important;white-space:normal!important;margin:.65em 0!important}
.zenshi-rich h1,.zenshi-rich h2,.zenshi-rich h3,.zenshi-rich h4{line-height:1.3;margin:1.2em 0 .45em;color:inherit;letter-spacing:-.015em}
.zenshi-rich h1{font-size:25px}.zenshi-rich h2{font-size:21px}.zenshi-rich h3{font-size:18px}.zenshi-rich h4{font-size:16px}
.zenshi-rich strong{font-size:inherit!important;color:inherit!important;font-weight:700}.zenshi-rich ul,.zenshi-rich ol{padding-left:1.6em;margin:.7em 0}.zenshi-rich li{margin:.3em 0}.zenshi-rich blockquote{border-left:3px solid #77b9e8;padding:4px 16px;margin:16px 0;background:#eef6fc}
.zenshi-rich pre{white-space:pre;overflow:auto;max-width:100%;background:#142c44;color:#eaf3ff;border-radius:10px;padding:16px;font:13px/1.65 Consolas,monospace}.zenshi-rich code{font-family:Consolas,monospace}.zenshi-rich :not(pre)>code{background:#e6eef7;border-radius:4px;padding:2px 4px;color:#173554}.zenshi-rich a{color:#0865ad;text-decoration:underline;text-underline-offset:3px}.rich-table{overflow-x:auto;max-width:100%;border:1px solid #d2dfeb;border-radius:10px;margin:16px 0}.rich-table table{border-collapse:collapse;width:100%}.rich-table th,.rich-table td{text-align:left;padding:10px 14px;border-bottom:1px solid #d2dfeb;min-width:100px}.rich-table th{background:#edf5fc}
.focused-workspace{height:100dvh;overflow:hidden}.focused-workspace .app-shell{height:100dvh;min-height:0!important}.focused-workspace .app-sidebar{height:100dvh;min-height:0!important;box-sizing:border-box}.focused-workspace .app-main{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.focused-workspace .app-topbar{position:relative;flex:none}.focused-workspace .app-content{display:flex;flex:1;flex-direction:column;position:relative;min-height:0;max-width:none;width:100%;box-sizing:border-box;padding:0 32px 16px;overflow:hidden}
.focused-workspace #workspace-thread{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:28px max(0px,calc((100% - 880px)/2)) 20px;scrollbar-gutter:stable}
.focused-workspace .welcome{margin:7vh auto 30px;padding:25px;max-width:720px;box-sizing:border-box}.focused-workspace .welcome h1{font-size:clamp(25px,3vw,36px)}
.focused-workspace .app-content>.provider-choices,.focused-workspace .app-content>.provider-availability,.focused-workspace .app-content>.prompt-examples,.focused-workspace .app-content>.widgets-heading,.focused-workspace .app-content>.tool-grid,.focused-workspace .app-content>.tool-shortcuts,.focused-workspace .app-content>.bottom-tip,.focused-workspace .app-content>#account-message,.focused-workspace .app-feedback-footer,.focused-workspace .app-provider-attribution{display:none!important}
.focused-workspace .composer{flex:none;max-width:880px;width:100%;box-sizing:border-box;margin:0 auto!important;padding:16px 20px!important;border:1px solid #bfd3e6;border-radius:18px;box-shadow:0 8px 28px #1636530c;background:#fff}.focused-workspace .composer-heading{display:none}.focused-workspace #task-label{display:block;font-size:12px;margin:0 0 8px;color:#536e87}.focused-workspace #task-input{min-height:52px!important;height:64px;max-height:130px!important;font-size:16px!important;line-height:1.5;padding:8px 0!important;resize:vertical}.focused-workspace .composer-controls{margin:0!important;justify-content:flex-end}.focused-workspace #credit-area{margin-left:auto}.focused-workspace #chat-model-settings{max-height:30dvh;overflow:auto;margin:4px 0}.focused-workspace #chat-model-settings>summary{cursor:pointer;min-height:40px;display:list-item;font-size:13px;font-weight:600;color:#173554;padding:10px;box-sizing:border-box}.focused-workspace #chat-model-settings .model-catalogue{margin:10px 0;padding:12px}.focused-workspace #chat-model-settings select{max-width:100%;width:100%}.focused-workspace #chat-model-settings #model-area{flex-wrap:wrap}.focused-workspace .account-composer-status{font-size:13px;padding:8px 12px;margin:6px 0}.focused-workspace .saved-message{padding:22px 24px;margin-bottom:18px}.focused-workspace .saved-message>strong{display:block;margin-bottom:12px;font-size:12px}.focused-workspace #latest-reply{position:absolute;bottom:225px;align-self:center;border:1px solid #b8d2e9;border-radius:20px;background:#fff;color:#173554;padding:10px 16px;cursor:pointer;z-index:2}
.focused-workspace #account-history{margin:12px 0 16px;padding:0 0 16px;border:0;border-bottom:1px solid #d3dfeb;border-radius:0;background:transparent}.focused-workspace #account-history summary{cursor:pointer;font-size:13px;font-weight:700;padding:12px 4px}.focused-workspace #account-history input{width:100%;box-sizing:border-box;padding:10px;border:1px solid #ccdae8;border-radius:8px;background:#fff;color:#173554;font-size:12px}.focused-workspace #account-conversations{display:grid;max-height:28dvh;overflow-y:auto;gap:4px}.focused-workspace #account-conversations button{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-height:40px;background:transparent;border-color:transparent;padding:9px;font-size:12px;width:100%}.focused-workspace #account-conversations button[aria-pressed=true]{background:#dcebf8;border-color:#bdd5ea}.focused-workspace .account-history-toolbar{margin-top:6px}.focused-workspace .account-history-toolbar button{font-size:11px;min-height:32px;padding:4px 8px}.focused-workspace .project-item,.focused-workspace .sidebar-note,.focused-workspace .side-label{display:none!important}.focused-workspace .flow-nav-help{color:#173554}.focused-workspace .workspace-support{bottom:18px;right:18px}.focused-workspace .tour-fab{display:none!important}.focused-workspace .assistance-fab{min-width:0;padding:10px!important;font-size:12px!important;max-width:145px}
#model-help-dialog{width:min(720px,92vw);max-height:85dvh;overflow:auto;border:1px solid #c7d9e9;border-radius:18px;padding:24px;color:#173554}#model-help-dialog::backdrop{background:#122b4877}#model-help-dialog .provider-guide{margin:10px 0;border:0}#model-help-dialog .provider-guide>summary{display:none}.flow-close{display:block;margin-left:auto;border:1px solid #bad1e6;border-radius:9px;padding:10px 16px;background:#173554;color:#fff;cursor:pointer}
.dark-mode .zenshi-rich blockquote,.dark-mode .rich-table th{background:#203b55}.dark-mode .zenshi-rich a{color:#90caff}.dark-mode.focused-workspace .composer,.dark-mode.focused-workspace #account-history input,.dark-mode #model-help-dialog{background:#162e46;color:#e5f0fb}.dark-mode.focused-workspace #chat-model-settings>summary{color:#cce6ff}.dark-mode.focused-workspace #task-label{color:#b4cce0}
@media(max-width:1100px){.focused-workspace .workspace-support{bottom:10px;right:8px}.focused-workspace .assistance-fab{width:44px;height:44px;overflow:hidden}.focused-workspace .assistance-fab span{display:none}.focused-workspace .app-content{padding:0 16px 14px}}
@media(max-width:700px){.focused-workspace .app-shell{display:flex;flex-direction:column}.focused-workspace .app-sidebar{height:auto;min-height:0;max-height:65dvh;padding:10px 16px;flex:none}.focused-workspace .side-brand{margin:0!important}.focused-workspace .app-main{height:auto;flex:1;min-height:0}.focused-workspace .app-topbar{padding:10px 14px}.focused-workspace .app-content{padding:0 10px 10px}.focused-workspace #workspace-thread{padding:14px 0}.focused-workspace .welcome{margin:16px auto;padding:16px}.focused-workspace .composer{padding:12px 14px!important;border-radius:14px}.focused-workspace #task-label{font-size:11px}.focused-workspace .saved-message{padding:16px}.focused-workspace .workspace-support{bottom:auto;top:12px;right:65px}.focused-workspace #account-conversations{max-height:180px}.focused-workspace #chat-model-settings{max-height:24dvh}}
.focused-workspace .composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 8px}.focused-workspace #task-label,.focused-workspace #task-input,.focused-workspace .account-composer-status{grid-column:1/-1}.focused-workspace .composer-controls{padding:0!important;border:0!important;align-self:end;min-height:0}.focused-workspace #chat-model-settings{align-self:end}.focused-workspace .app-disclaimer{font-size:11px;padding:4px 8px;margin:4px 0!important;flex:none}.output-editor{margin:12px 0;border:1px solid #c8dbea;border-radius:10px;padding:12px}.output-editor>summary{cursor:pointer;font-weight:600;color:#234e74;min-height:32px}.output-editor textarea{width:100%;box-sizing:border-box}.zenshi-rich a:not([href]){text-decoration:none;color:inherit}
@media(max-width:1100px){.focused-workspace .workspace-support{top:82px!important;bottom:auto!important;right:12px!important}.focused-workspace .assistance-fab{min-width:44px!important;max-width:44px!important;width:44px!important;height:44px!important;padding:4px!important;overflow:hidden}.focused-workspace .assistance-fab>span{display:none!important}}
.focused-workspace #account-conversations{max-height:180px}.focused-workspace .welcome{width:100%;max-width:720px}.focused-workspace #model-help-dialog button{min-height:44px}
.focused-workspace .app-content>#operations-desk{display:none!important}
.focused-workspace .assistance-fab{min-width:48px!important;max-width:48px!important;width:48px!important;height:48px!important;padding:6px!important;overflow:hidden}.focused-workspace .assistance-fab>span{display:none!important}
.focused-workspace .assistance-fab img{width:34px!important;height:36px!important;object-fit:contain}

.focused-workspace #help-toggle.assistance-fab>span{display:none!important}.focused-workspace #help-toggle.assistance-fab{display:flex!important;align-items:center!important;justify-content:center!important}.focused-workspace #help-toggle.assistance-fab>img{display:block!important;flex:0 0 34px!important;margin:0!important}
/* Model selection has one bounded dialog and an always-visible Done control. */
.focused-workspace #chat-model-settings{width:min(680px,calc(100vw - 32px));max-height:80dvh;margin:auto;padding:0 20px 20px;border:1px solid #bfd3e6;border-radius:18px;box-sizing:border-box;background:#fff;color:#173554;overflow:auto}
#chat-model-settings::backdrop{background:#122b4877}.model-dialog-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:16px;background:inherit;padding:16px 0;border-bottom:1px solid #d6e3ee}.model-dialog-header h2{font-size:21px;margin:0}.model-dialog-header .flow-close{margin-left:auto;min-height:44px}
.focused-workspace #model-picker-toggle{align-self:end;justify-self:start;text-align:left;font-size:13px;color:#173554;background:#eef5fc;border:1px solid #bfd3e6;border-radius:10px;padding:12px;min-height:44px;max-width:100%;white-space:normal}
.focused-workspace #chat-model-settings .model-catalogue{max-height:none!important;overflow:visible!important}.focused-workspace #chat-model-settings #model-area{margin:16px 0}.focused-workspace #chat-model-settings select{width:100%;max-width:100%}
/* An empty conversation is a normal page, not a cropped scrollable hero. */
.focused-workspace .app-content:has(#account-messages:empty){overflow-y:auto;display:block;padding-top:24px}
.focused-workspace .app-content:has(#account-messages:empty) #workspace-thread{overflow:visible;padding:0;flex:none}
.focused-workspace .app-content:has(#account-messages:empty) .welcome{margin:12px auto 24px!important;padding:24px!important}
.focused-workspace .app-content:has(#account-messages:empty) #latest-reply{display:none!important}
.focused-workspace #task-input{resize:none!important;height:64px!important}.focused-workspace #task-input:focus{height:96px!important}
.dark-mode.focused-workspace #chat-model-settings,.dark-mode.focused-workspace #model-picker-toggle{background:#162e46;color:#e5f0fb}
/* A crisp, dimensional launcher using the original transparent mascot artwork. */
.focused-workspace #help-toggle.assistance-fab{position:relative;width:60px!important;min-width:60px!important;max-width:60px!important;height:60px!important;padding:6px!important;border:1px solid #a7dbf5!important;border-radius:20px!important;background:linear-gradient(145deg,#245d83 0%,#173c5d 52%,#102c48 100%)!important;box-shadow:inset 0 1px 0 #ffffff66,inset 0 -2px 4px #071b3333,0 7px 18px #15395430!important;transition:transform .18s ease,box-shadow .18s ease!important;overflow:visible!important}
.focused-workspace #help-toggle.assistance-fab::before{content:''!important;position:absolute;inset:3px;border:1px solid #9bdbff30;border-radius:16px;pointer-events:none}
.focused-workspace #help-toggle.assistance-fab>img{width:44px!important;height:46px!important;flex-basis:44px!important;object-fit:contain!important;filter:drop-shadow(0 2px 2px #061b3544)}
.focused-workspace #help-toggle.assistance-fab:hover{transform:translateY(-2px);box-shadow:inset 0 1px 0 #ffffff88,0 10px 24px #15395445!important}
.focused-workspace #help-toggle.assistance-fab:focus-visible{outline:3px solid #0878ce;outline-offset:4px}
@media(prefers-reduced-motion:reduce){.focused-workspace #help-toggle.assistance-fab{transition:none!important;transform:none!important}}
@media(max-width:700px){.focused-workspace #help-toggle.assistance-fab{width:52px!important;min-width:52px!important;max-width:52px!important;height:52px!important;border-radius:17px!important}.focused-workspace #help-toggle.assistance-fab>img{width:38px!important;height:40px!important;flex-basis:38px!important}}
/* Xero: scoped presentation, existing IDs and connection handlers preserved. */
.cf-xero-live{padding:0!important;overflow:hidden!important;background:#fff!important;border-color:#bdd3e5!important;box-shadow:0 12px 32px #1735540d}
.cf-xero-live .xero-hero{display:flex;align-items:center;gap:20px;padding:28px;background:linear-gradient(120deg,#122e4b,#205677);color:#fff}.cf-xero-live .xero-hero h3{color:#fff!important;margin:7px 0!important;font-size:26px!important;line-height:1.2}.cf-xero-live .xero-hero p{color:#d5e6f4!important;margin:0!important;max-width:46ch}.cf-xero-live .xero-hero .cf-kicker{color:#a9d8f3!important;font-size:11px;letter-spacing:.14em}.xero-monogram{display:grid;place-items:center;width:68px;height:68px;flex:0 0 68px;border-radius:50%;background:#13a8d3;font:400 25px Arial,sans-serif;letter-spacing:-1px;border:1px solid #8fe0f6;box-shadow:0 4px 14px #071d3033}.xero-readonly{margin-left:auto;border:1px solid #7ea9c4;border-radius:999px;padding:8px 12px;white-space:nowrap;font-size:12px;color:#e7f4ff;background:#ffffff0a}
.cf-xero-live .xero-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;list-style:none;margin:0;padding:24px 28px;border-bottom:1px solid #e0eaf2;background:#f4f9fd}.xero-steps li{display:flex;gap:12px}.xero-steps li>span{font-weight:700;color:#2077a7;font-size:13px}.xero-steps strong{display:block;font-size:14px;color:#173751}.xero-steps small{display:block;margin-top:6px;color:#526d83;line-height:1.5;font-size:12px}.cf-xero-live .xero-assurance{margin:20px 28px!important;font-size:13px;color:#526d83}.cf-xero-live>.cf-actions{padding:0 28px;gap:10px}.cf-xero-live button{min-height:44px;border-radius:10px;padding:10px 16px;font-weight:600}.cf-xero-live #xero-connect,.cf-xero-live #xero-import{background:#116b9d!important;border-color:#116b9d!important;color:#fff!important}.cf-xero-live #xero-connect:hover,.cf-xero-live #xero-import:hover{background:#0d5078!important;color:#fff!important}.cf-xero-live #xero-status{margin:20px 28px;padding:14px 16px;border:1px solid #d0dfeb;border-radius:12px;background:#f2f7fb;color:#274d6a;line-height:1.5}.cf-xero-live[data-connected=true] #xero-status{border-left:4px solid #207b76}.cf-xero-live #xero-connected{margin:0 28px 24px;padding:22px;border:1px solid #d3e1ed;border-radius:14px}.cf-xero-live .cf-inputs{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px}.cf-xero-live .cf-inputs label{font-size:13px;font-weight:600}.cf-xero-live .cf-inputs input,.cf-xero-live .cf-inputs select{width:100%;min-height:44px;box-sizing:border-box;margin-top:8px}.cf-xero-live #xero-disconnect{background:transparent!important;color:#80515a!important;margin-left:auto}.cf-xero-live #xero-result.has-import{padding:24px 28px;border-top:1px solid #dbe7f0}.cf-xero-live #xero-saved-list{display:grid;gap:10px;padding:0 28px 24px}.cf-xero-live #xero-saved-list:empty{display:none}.cf-xero-live th{padding:12px;background:#eaf3fa;color:#173751;font-size:12px}.cf-xero-live td{font-size:13px}.xero-scroll-cue{font-size:12px;color:#31688e;margin:10px 0}
@media(max-width:700px){.cf-xero-live .xero-hero{flex-wrap:wrap;padding:22px;gap:14px}.cf-xero-live .xero-hero>div:nth-child(2){flex:1;min-width:160px}.cf-xero-live .xero-hero h3{font-size:22px!important}.xero-readonly{margin-left:0}.cf-xero-live .xero-steps{grid-template-columns:1fr;padding:22px}.cf-xero-live .cf-inputs{grid-template-columns:1fr}.cf-xero-live #xero-connected{margin:0 16px 20px;padding:16px}.cf-xero-live>.cf-actions{padding:0 16px}.cf-xero-live #xero-status,.cf-xero-live .xero-assurance{margin:16px!important}.cf-xero-live .cf-actions{display:flex;flex-wrap:wrap}.cf-xero-live .cf-actions button{flex:1 1 160px}.cf-xero-live #xero-disconnect{margin-left:0}.cf-xero-live #xero-result.has-import{padding:20px 16px}}
.dark-mode .cf-xero-live{background:#162e46!important;color:#e5f0fb!important}.dark-mode .cf-xero-live .xero-steps,.dark-mode .cf-xero-live #xero-status{background:#1c3852;color:#d6e8f6}.dark-mode .xero-steps strong,.dark-mode .xero-steps small,.dark-mode .cf-xero-live .xero-assurance{color:#d6e8f6!important}

/* Compact, keyboard-accessible explanation of the existing Xero permission scope. */
.cf-xero-live .xero-readonly{display:inline-flex;align-items:center;gap:6px;padding:4px 6px 4px 12px}
.cf-xero-live #xero-access-info{display:inline-grid;place-items:center;width:34px;height:34px;min-height:34px;padding:0;border:1px solid #a9d8f3;border-radius:50%;background:#ffffff12;color:#fff;font:700 16px Georgia,serif;cursor:pointer;flex:none}
.cf-xero-live #xero-access-info:hover,.cf-xero-live #xero-access-info[aria-expanded=true]{background:#fff;color:#173751}
.cf-xero-live #xero-access-info:focus-visible{outline:3px solid #8ce6ff;outline-offset:3px}
.cf-xero-live .xero-access-detail{padding:14px 28px;background:#eaf4fb;border-bottom:1px solid #bdd3e5;color:#173751;font-size:13px;line-height:1.55}
.cf-xero-live .xero-access-detail[hidden]{display:none}
.cf-xero-live .xero-access-detail p{margin:5px 0 0;font-size:13px;line-height:1.55;color:inherit}
.dark-mode .cf-xero-live .xero-access-detail{background:#1c3852;color:#e5f0fb}
@media(max-width:700px){.cf-xero-live .xero-access-detail{padding:14px 22px}.cf-xero-live #xero-access-info{width:40px;height:40px;min-height:40px}}

/* Clear home/chat navigation, with compact controls and visible refresh feedback. */
.focused-workspace .conversation-navigation{display:flex;align-items:center;gap:20px;flex:none;padding:14px 0 8px;max-width:880px;width:100%;margin:0 auto}
.focused-workspace .conversation-navigation[hidden]{display:none}
.focused-workspace .conversation-navigation button{flex:none;border:0;background:transparent;color:#245776;padding:8px 0;min-height:36px;font-size:13px;font-weight:600;cursor:pointer;box-shadow:none}
.focused-workspace .conversation-navigation button:hover{color:#0869ad;text-decoration:underline;text-underline-offset:4px}
.focused-workspace .conversation-navigation button:focus-visible{outline:2px solid #0878ce;outline-offset:4px;border-radius:4px}
.focused-workspace .conversation-navigation span{font-size:12px;color:#526d83;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.focused-workspace #history-refresh-status{margin:6px 0 2px;flex-basis:100%;font-size:11px;line-height:1.5;color:#47647d;text-align:left}
.focused-workspace #history-refresh-status:empty{display:none}
.focused-workspace .account-history-toolbar{flex-wrap:wrap}
.focused-workspace #account-conversations button{font-size:12px;line-height:1.4;min-height:38px;border-radius:8px}
.focused-workspace.viewing-conversation #workspace-thread{padding-top:12px}
.focused-workspace:not(.viewing-conversation) .app-content>.widgets-heading{display:flex!important;max-width:880px;margin:28px auto 14px;width:100%}
.focused-workspace:not(.viewing-conversation) .app-content>.tool-grid{display:grid!important;max-width:880px;margin:0 auto 20px;width:100%}
.focused-workspace:not(.viewing-conversation) .app-content>.tool-shortcuts{display:flex!important;max-width:880px;margin:0 auto 24px;flex-wrap:wrap}
.focused-workspace:not(.viewing-conversation) .composer{margin-bottom:24px!important}
.dark-mode.focused-workspace .conversation-navigation button,.dark-mode.focused-workspace .conversation-navigation span,.dark-mode.focused-workspace #history-refresh-status{color:#c9e4f8}
.cf-xero-live #xero-access-info{width:28px;height:28px;min-height:28px;border:0;background:transparent;font:700 13px Georgia,serif}
.cf-xero-live #xero-access-info::first-letter{border:1px solid currentColor;border-radius:50%}
@media(max-width:700px){.focused-workspace .conversation-navigation{gap:12px;padding:8px 0}.focused-workspace .conversation-navigation button{min-height:44px}.focused-workspace .conversation-navigation span{max-width:45%}.cf-xero-live #xero-access-info{width:32px;height:32px;min-height:32px}}

/* Allan's review: retain the workspace, recover space above its working controls. */
.focused-workspace .app-content:has(#account-messages:empty):has(.welcome-compact){padding-top:16px}
.focused-workspace .app-content:has(#account-messages:empty) .welcome.welcome-compact{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;column-gap:18px;row-gap:5px;width:100%;max-width:880px;margin:0 auto 14px!important;padding:14px 20px!important;text-align:left;border-radius:16px}
.focused-workspace .welcome-compact #empty-companion{grid-column:1;grid-row:1/3;align-self:center;min-width:0}
.focused-workspace .welcome-compact #empty-companion .zenshi-mascot{--mascot-size:64px!important;width:64px!important;height:72px!important;margin:0}
.focused-workspace .welcome-compact #empty-companion img{width:100%;height:100%;object-fit:contain}
.focused-workspace .welcome-compact h1{grid-column:2;margin:0!important;font-size:clamp(22px,2.15vw,29px)!important;line-height:1.25;letter-spacing:-.6px;text-wrap:balance}
.focused-workspace .welcome-compact p{grid-column:2;margin:0!important;text-align:left!important;font-size:14px!important;line-height:1.5}
.focused-workspace:not(.viewing-conversation) .app-content:has(.welcome-compact)>.widgets-heading{margin-top:14px}
.focused-workspace:not(.viewing-conversation) .app-content:has(.welcome-compact)>.tool-shortcuts{margin-bottom:16px}
@media(max-width:700px){
 .focused-workspace .app-content:has(#account-messages:empty):has(.welcome-compact){padding-top:12px}
 .focused-workspace .app-content:has(#account-messages:empty) .welcome.welcome-compact{grid-template-columns:44px minmax(0,1fr);column-gap:12px;padding:12px 14px!important;border-radius:12px}
 .focused-workspace .welcome-compact #empty-companion .zenshi-mascot{--mascot-size:44px!important;width:44px!important;height:54px!important}
 .focused-workspace .welcome-compact h1{font-size:22px!important;letter-spacing:-.35px}
 .focused-workspace .welcome-compact p{font-size:12px!important}
}
/* Typing hides the decorative mascot; text must then use the full grid width. */
.focused-workspace .welcome.welcome-compact.is-working{grid-template-columns:minmax(0,1fr)!important;column-gap:0}
.focused-workspace .welcome.welcome-compact.is-working>h1,.focused-workspace .welcome.welcome-compact.is-working>p{grid-column:1/-1;min-width:0;max-width:100%;text-align:left!important}

/* Tablet help stays above the account row, clear of its tap target. */
@media(min-width:701px) and (max-width:1100px){.focused-workspace .workspace-support{top:12px!important;right:16px!important;bottom:auto!important}.focused-workspace #help-toggle.assistance-fab{top:auto;bottom:auto;right:auto}.focused-workspace .app-topbar>div:first-child{padding-right:72px;box-sizing:border-box}}

@media(min-width:701px) and (max-width:1100px){.focused-workspace .workspace-support{top:8px!important}.focused-workspace #help-toggle.assistance-fab{box-sizing:border-box;min-height:44px!important;width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;padding:4px!important;border-radius:14px!important}.focused-workspace #help-toggle.assistance-fab>img{width:30px!important;height:32px!important;flex-basis:30px!important}}
/* Keep all workspace regions reachable on short and narrow viewports. */
@media(min-width:701px){.focused-workspace .app-sidebar{padding-bottom:max(40px,env(safe-area-inset-bottom));scroll-padding-bottom:40px}}
.focused-workspace .app-content{overflow-y:auto;overscroll-behavior-y:contain;scroll-padding-block:20px 96px;padding-bottom:max(96px,calc(env(safe-area-inset-bottom) + 80px))}
.focused-workspace .app-content{display:block}
.focused-workspace #workspace-thread{overflow:visible;min-height:0;flex:none}
.focused-workspace #latest-reply{position:fixed;left:calc(50% + 80px);bottom:90px!important;transform:translateX(-50%)}
@media(max-width:700px){.focused-workspace #latest-reply{left:50%;bottom:80px!important}}
.focused-workspace .workspace-support{position:fixed!important;top:auto!important;left:auto!important;right:max(16px,env(safe-area-inset-right))!important;bottom:max(16px,env(safe-area-inset-bottom))!important;width:auto;height:auto;padding:0!important;margin:0;border:0;background:transparent;z-index:45;display:flex;align-items:center}
.focused-workspace #help-toggle.assistance-fab{position:relative!important;inset:auto!important;margin:0!important;transform:none}
@media(max-width:700px){.focused-workspace .app-shell.mobile-nav-open .app-sidebar{overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(40px,env(safe-area-inset-bottom))}.focused-workspace .app-content{padding-bottom:max(88px,calc(env(safe-area-inset-bottom) + 76px))}}

/* Composer controls remain inside their own grid cells at every width. */
.focused-workspace .composer{grid-template-columns:minmax(0,1fr) auto;gap:12px;overflow:visible}
.focused-workspace .composer>*{min-width:0;box-sizing:border-box}
.focused-workspace #task-input{width:100%;margin:0;grid-column:1/-1}
.focused-workspace #model-picker-toggle{position:static;grid-column:1;max-width:100%;margin:0;overflow-wrap:anywhere}
.focused-workspace .composer-controls{position:static!important;grid-column:2;display:flex;gap:12px;width:auto!important;max-width:100%;margin:0!important;transform:none!important}
.focused-workspace #credit-area{display:flex;gap:12px;position:static!important;max-width:100%}
.focused-workspace #run-preview{position:static!important;margin:0!important;transform:none!important;flex:none}
.focused-workspace .top-bug-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:10px;border:1px solid #45657d;border-radius:12px;background:#23465e;color:#fff;cursor:pointer}
.focused-workspace .top-bug-button svg{width:20px;height:20px;flex:none}
.focused-workspace .top-bug-button span{display:none}
.focused-workspace .top-bug-button:hover{background:#32627e}
.focused-workspace .top-bug-button:focus-visible{outline:3px solid #8ce6ff;outline-offset:3px}
@media(max-width:420px){.focused-workspace .composer{grid-template-columns:minmax(0,1fr);padding:16px!important}.focused-workspace #model-picker-toggle,.focused-workspace .composer-controls{grid-column:1}.focused-workspace .composer-controls{justify-self:end}}

@media(max-width:700px){.focused-workspace .app-main{min-width:0;width:100%;max-width:100%}.focused-workspace .top-actions{min-width:0;max-width:100%;flex-wrap:wrap;gap:8px}.focused-workspace .app-topbar{min-width:0;box-sizing:border-box}}

.focused-workspace #account-history summary{display:flex;align-items:center;gap:9px;list-style:none;padding:12px 8px}
.focused-workspace #account-history summary::-webkit-details-marker{display:none}
.focused-workspace #account-history summary>svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.focused-workspace #account-history summary::after{content:'';width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-left:auto;transition:transform .18s}
.focused-workspace #account-history[open] summary::after{transform:rotate(225deg)}
.focused-workspace .account-history-toolbar{padding:0 10px;box-sizing:border-box;gap:8px}
.focused-workspace #account-history>input{width:calc(100% - 16px);margin:0 8px}
/* Conversation first, with optional tools below the first message. */
.focused-workspace #workspace-toolbox{max-width:880px;margin:20px auto 24px;border:1px solid #c8dbea;border-radius:14px;padding:0 18px;box-sizing:border-box;color:#173554;background:#f5f9fd}
#workspace-toolbox>summary{min-height:48px;display:list-item;padding:15px 0;cursor:pointer;font-size:14px;font-weight:600}
#workspace-toolbox .widgets-heading{margin:8px 0 16px!important}#workspace-toolbox .tool-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:18px}
.focused-workspace.viewing-conversation #workspace-toolbox{display:none}
.workspace-tour-start{font:600 13px/1.4 Arial,sans-serif;min-height:44px;padding:10px 16px;background:#edf5fc;color:#174e77;border:1px solid #bfd3e6;border-radius:10px;cursor:pointer}
.focused-workspace .app-main,.focused-workspace .app-content,.focused-workspace #workspace-thread,.focused-workspace #account-messages,.focused-workspace .saved-message,.zenshi-rich{min-width:0;max-width:100%;box-sizing:border-box}
.rich-table{width:100%;box-sizing:border-box;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.rich-table:focus-visible{outline:3px solid #278ed2;outline-offset:3px}.table-scroll-hint{display:none}
.dark-mode #workspace-toolbox,.dark-mode .workspace-tour-start{background:#19384f;color:#e2effb;border-color:#47647d}
@media(max-width:700px){.focused-workspace #workspace-toolbox{margin:14px auto;padding:0 14px}#workspace-toolbox .tool-grid{grid-template-columns:1fr}.rich-table table{min-width:480px}.table-scroll-hint{display:block;font-size:12px;color:#536e87;margin:8px 0}.focused-workspace .welcome{padding:12px!important}.focused-workspace .welcome h1{font-size:26px}.focused-workspace .saved-message{overflow:hidden}.zenshi-rich{overflow-wrap:anywhere}.dark-mode .table-scroll-hint{color:#b9d5e8}}
.focused-workspace .welcome .workspace-tour-start{grid-column:2;justify-self:start;width:auto;max-width:none;white-space:nowrap;padding:10px 16px;margin-top:10px}
@media(max-width:700px){.focused-workspace .welcome .workspace-tour-start{grid-column:1/-1}}
