/* Use the normal chat layout: fixed frame, a scrollable message area, anchored composer. */
body.study3-shell .study-main{position:relative;display:flex!important;flex-direction:column;padding:0!important;overflow:hidden!important}
body.study3-shell .study-main[hidden],body.study3-shell .study-detail-view[hidden]{display:none!important}
.study3-shell .study-main>.conversation-head{flex:none;margin:0;padding:18px 21px;border-bottom:1px solid var(--line);gap:16px;align-items:center}
.study3-shell .conversation-head>div:first-child{min-width:0}.study3-shell .conversation-head h1{font-family:Georgia,'Songti SC',serif;font-size:17px;font-weight:500;margin:0;line-height:1.5}.study3-shell .conversation-head p{font-size:10px;margin:0 0 5px;color:#507988}
.study3-shell .head-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}.study3-shell .head-actions label{margin:0}.study3-shell .head-actions .ghost-btn{font-size:10px;margin:0;background:#fff;color:#718087;border:1px solid var(--line);padding:8px 11px}.study3-shell .head-actions .end-session-btn{background:#fff5f5;border-color:#f5d2d2;color:#98676d}.study3-shell .head-actions .model-switch{font-size:11px}.study3-shell .head-actions select{font-size:12px;min-width:140px;background:#f7fbf9;padding:9px}
.study3-shell .model-mode-hint{flex:none;margin:0;padding:8px 21px 0;font-size:11px;color:#748078}
.study3-shell .conversation-flow{display:flex!important;flex-direction:row;flex:none;gap:10px;margin:0;padding:14px 18px;border-bottom:1px solid var(--line)}.study3-shell .conversation-flow button{display:flex;flex:1;align-items:center;text-align:left;gap:9px;margin:0;padding:11px 12px;border:1px solid #e2e9ec;border-radius:12px;background:#fff;color:var(--ink);font-size:12px}.study3-shell .conversation-flow button.done{background:#f0f9f2;border-color:#bde3c3}.study3-shell .conversation-flow button.active{background:#edf7fa;border-color:#a3ccda}.study3-shell .conversation-flow button>span{flex:none;width:25px;height:25px;display:grid;place-items:center;background:#edf1f1;border-radius:9px}.study3-shell .conversation-flow button b{display:block;font-size:12px}.study3-shell .conversation-flow button small{display:block;margin-top:4px;font-size:10px;color:#78878e}
.study3-shell #experiment{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}.study3-shell #experiment[hidden]{display:none!important}
.study3-shell #visitHeading,.study3-shell #topicDetails,.study3-shell #startBoth{display:none!important}.study3-shell #status:not(.error){display:none}.study3-shell #status.error{flex:none;margin:0;padding:8px 20px;background:#fff4f4;font-size:12px}
body.study3-shell #dualChat{display:flex!important;flex:1;min-height:0;overflow:hidden;gap:0}.study3-shell #dualChat[hidden]{display:none!important}
.study3-shell .chat-pane{flex:1;min-height:0;height:100%;display:flex;flex-direction:column;border:0;border-radius:0;overflow:hidden}.study3-shell .chat-pane[hidden]{display:none!important}.study3-shell .pane-head{display:none}
body.study3-shell .chat-pane .messages{flex:1;height:auto!important;min-height:0;overflow-y:auto;padding:22px 24px;background:linear-gradient(180deg,#fff,#fdfefd);scroll-behavior:smooth}.study3-shell .messages:has(.new-chat-welcome){display:grid!important;place-items:center;align-content:center}.study3-shell .messages .new-chat-welcome{width:min(720px,92%);padding:28px 15px 55px}.study3-shell .new-chat-welcome h3{font-size:27px;font-weight:500}.study3-shell .new-chat-welcome>p{font-size:12px;color:#87939a}.study3-shell .message{margin-bottom:20px;animation:none}.study3-shell .message-content{max-width:min(720px,82%)!important}.study3-shell .message .bubble{font-size:13px;line-height:1.85}.study3-shell .message.user .bubble{background:#a3ccda;color:#34434a}.study3-shell .message-avatar{background:transparent!important}.study3-shell .message.user .message-avatar{display:none}.study3-shell .message time{display:block;font-size:10px;color:#9ba6a4;margin:5px 3px 0}.study3-shell .message.user time{text-align:right}
.study3-shell .pane-controls{flex:none;padding:10px 18px 12px;border-top:1px solid var(--line)}.study3-shell .chat-form>label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.study3-shell .preference-row{margin-bottom:7px;display:flex;gap:5px;overflow:auto}.study3-shell .preference-row button{margin:0;padding:5px 10px;font-size:10px;background:white;color:#64766f;border:1px solid var(--line);border-radius:20px}.study3-shell .composer{background:#f6f8f8;border:1px solid transparent;padding:8px 8px 8px 13px;border-radius:14px}.study3-shell .composer:focus-within{background:#fff;border-color:#a3ccda}.study3-shell .composer textarea{height:42px;min-height:42px;max-height:110px;overflow-y:auto;margin:0;padding:7px 0;resize:none;line-height:1.7}.study3-shell .composer button{flex:none;width:36px;height:36px;min-width:36px;padding:0;border-radius:10px;background:#a3ccda;color:#34535e;font-size:23px}
.study3-shell #setup{flex:none;border:0;border-top:1px solid var(--line);border-radius:0;margin:0;padding:10px 18px 12px;background:#fff;max-width:none}.study3-shell #setupForm>label{display:none}.study3-shell #setup .composer{margin:0}.study3-shell #setup #opening{min-height:42px;font-size:13px}.study3-shell #setupForm .composer button{font-size:23px}.study3-shell .composer-note{font-size:9px;color:#94a19d;text-align:center;margin:6px 0 0}
.study3-shell .pane-error,.study3-shell .pending{flex:none;font-size:12px;margin:0;padding:8px 20px}.study3-shell .read-only-note,.study3-shell .finished{flex:none;font-size:11px;padding:12px 20px;margin:0;background:#fafcfc}.study3-shell .workspace-toast{position:absolute;bottom:7px;right:14px;max-width:70%;font-size:11px;color:#6f7e81;margin:0;pointer-events:none}.study3-shell .workspace-toast:empty{display:none}
.study3-shell .workspace-back{flex:none;margin:8px 20px;align-self:flex-start;font-size:11px}.study3-shell .workspace-back[hidden]{display:none!important}
/* Questionnaires occupy the content area, rather than sitting below the chat. */
.study3-shell .study-main[data-content=feedback] .messages,.study3-shell .study-main[data-content=feedback] .pane-controls,.study3-shell .study-main[data-content=feedback] #setup,.study3-shell .study-main[data-content=feedback] .read-only-note{display:none!important}
.study3-shell .study-main[data-content=feedback] .post-form:not([hidden]){display:block;flex:1;overflow-y:auto;min-height:0;width:100%;max-width:none;margin:0;padding:15px max(24px,calc((100% - 820px)/2)) 35px;border-top:0}
.study3-shell .study-main[data-content=feedback] .post-form h3{font-size:16px}
.study3-shell .study-main[data-content=chat] #comparisonPanel,.study3-shell .study-main[data-content=chat] #completePanel,.study3-shell .study-main[data-content=chat] #visitComplete,.study3-shell .study-main[data-content=chat] #finalPanel{display:none!important}
.study3-shell .study-main[data-content=comparison] #dualChat,.study3-shell .study-main[data-content=comparison] #setup,.study3-shell .study-main[data-content=complete] #dualChat,.study3-shell .study-main[data-content=complete] #setup,.study3-shell .study-main[data-content=final] #dualChat,.study3-shell .study-main[data-content=final] #setup{display:none!important}
.study3-shell .study-main[data-content=comparison] #comparisonPanel,.study3-shell .study-main[data-content=complete] #completePanel,.study3-shell .study-main[data-content=complete] #visitComplete,.study3-shell .study-main[data-content=final] #finalPanel{flex:1;min-height:0;overflow-y:auto;width:100%;max-width:none;margin:0;border:0;border-radius:0;padding:20px max(24px,calc((100% - 820px)/2)) 35px}
.study3-shell .study-main[data-content=final] #visitComplete{display:none!important}
.study3-shell .study-detail-view{grid-column:3;overflow-y:auto;min-height:0;background:#fff;border:1px solid var(--line);border-radius:18px;padding:26px 28px}.study3-shell .study-detail-view .account-view-head{margin-bottom:20px}.study3-shell .study-detail-view .account-view-head h1{font-size:25px}.study3-shell #studyDetailBody .account-field-grid{margin-top:18px}.study3-shell #studyDetailBody .account-view-card h2{font-size:17px}.study3-shell #studyDetailBody>.account-view-note{margin:16px 0}.study3-shell .study-detail-view .account-field strong{font-size:14px}.study3-shell .study-detail-view .account-view-card>.account-field{margin:10px 0}.study3-shell .study-detail-view .logout-btn{margin:10px 8px 0 0;display:inline-block;text-decoration:none;font-size:12px}
.study3-shell .conversation-list-row>.conversation-list-item{padding-right:36px!important}.study3-shell .conversation-menu-toggle{margin:0;background:transparent;font-size:21px;top:18px}.study3-shell .conversation-menu button{margin:0;box-shadow:none}.study3-shell .conversation-menu[hidden]{display:none!important}
#workspaceRenameLabel{font-size:13px}#workspaceRenameInput{display:block;width:100%;padding:10px;border:1px solid #cad8cc;border-radius:9px;margin-top:8px;font:inherit}#workspaceActionDialog{max-width:470px}#workspaceActionDialog p{font-size:13px;line-height:1.8}
@media(max-width:1100px){.study3-shell .conversation-head{flex-wrap:wrap}.study3-shell .head-actions{gap:6px}.study3-shell .conversation-flow{padding:10px;gap:6px}.study3-shell .conversation-flow button{padding:9px 7px;gap:6px}.study3-shell .conversation-flow button b{font-size:11px}.study3-shell .conversation-flow button small{font-size:9px}.study3-shell .head-actions .model-switch{font-size:10px}.study3-shell .head-actions select{min-width:130px}}

body.study3-shell[data-study="study2"] .pane-controls .end-chat{display:none!important}

/* Detail headers have no architecture selector; keep the title and return action intact. */
.study3-shell .study-detail-view .account-view-head{align-items:center;flex-wrap:wrap}
.study3-shell .study-detail-view .account-view-head>div{flex:1 1 auto;min-width:max-content}
.study3-shell #studyDetailTitle,.study3-shell #studyDetailScope,.study3-shell #studyDetailReturn{white-space:nowrap}
.study3-shell #studyDetailReturn{flex:0 0 auto;width:auto;min-width:max-content}
