#research-dialog .research-body{padding:20px 26px 28px}#research-dialog .research-heading{margin-bottom:16px}#research-dialog .research-heading h2{font-size:30px}#research-dialog .research-heading p{font-size:15px;color:#65715f;margin-top:5px}
#research-dialog .room-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding-bottom:18px;margin-bottom:20px;border-bottom:1px solid #dce3d7}#research-dialog .room-study-select{flex:1;min-width:180px}#research-dialog .room-study-select label{display:block;font-size:13px;margin-bottom:6px;color:#63705c}#research-dialog #lab-study{width:100%;max-width:520px;padding:10px 12px;font:16px var(--sans);border:1px solid #ccd6c4;border-radius:7px;color:#284635;background:#fffef8}#research-dialog .small-button,#research-dialog .room-toolbar button{font-size:14px;min-height:40px}#research-dialog .room-toolbar .is-active{background:#e1eddf;color:#204831;border-color:#82a17c}
#research-dialog .room-desk{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:26px}#research-dialog .room-source{min-width:0;padding:20px;border:1px solid #dedfcd;border-radius:10px;background:#faf8ee}#research-dialog .room-source h3{margin:0 0 5px;font-size:25px}#research-dialog #room-source-ref{font-size:14px;margin:0 0 18px}#research-dialog #room-source-quote{margin:10px 0 16px;padding:0;border:0;color:#283d2f;font:23px/1.9 var(--serif);white-space:pre-wrap}#research-dialog #room-source-question{font-size:15px;line-height:1.9;color:#4b5f45}#research-dialog #lab-source-link{font-size:14px;line-height:1.8}#research-dialog details{margin:12px 0}#research-dialog summary{cursor:pointer;font:500 15px/1.6 var(--sans);padding:9px 0}#research-dialog #room-study-steps p{font-size:16px;line-height:1.9}#research-dialog #room-study-steps h4{font-size:17px;margin:18px 0 4px}
#research-dialog .shared-discussion{padding:0;margin:0;border:0}#research-dialog .discussion-top h3{font-size:25px}#research-dialog .discussion-top .tool-info{margin:5px 0}#research-dialog .discussion-messages{max-height:340px;min-height:140px}#research-dialog #discussion-text{font-size:16px;min-height:90px}#research-dialog .room-ai-help p{font-size:13px}#research-dialog .tool-info{font-size:13px}
#research-dialog #room-video{padding:18px;margin-bottom:24px;border:1px solid #d6ded0;border-radius:10px;background:#eef3e9}#research-dialog #room-video h3{font-size:24px;margin:0 0 8px}#research-dialog #meeting-stage:not(.has-meeting){display:none}#research-dialog #meeting-stage.has-meeting{height:clamp(280px,48vh,540px);padding:0}#research-dialog #room-video .invite-tools{align-items:baseline}#research-dialog #room-video .invite-tools button,#research-dialog #room-video .invite-tools a{font-size:14px}#research-dialog #room-video .invite-tools details>*:not(summary){margin-inline-end:16px}#research-dialog #room-video .invite-tools details{margin:0}
#research-dialog #room-tools{border-top:1px solid #d6ded0;margin-top:24px;padding:12px 0}#research-dialog #room-tools>details{padding:4px 16px;border:1px solid #dce3d7;border-radius:8px;background:#f6f8f2}#research-dialog #room-tools label{display:block;font-size:14px;margin:12px 0 6px}#research-dialog #room-tools input,#research-dialog #room-tools select,#research-dialog #room-tools textarea{width:100%;box-sizing:border-box;max-width:100%;font:15px/1.7 var(--sans);padding:8px;border:1px solid #ced8c6;border-radius:5px;background:#fffef8;color:#31472d}#research-dialog [hidden]{display:none!important}
@media(max-width:760px){#research-dialog .research-body{padding:16px}#research-dialog .room-desk{grid-template-columns:1fr;gap:22px}#research-dialog .room-toolbar{gap:8px}#research-dialog .room-study-select{flex-basis:100%}#research-dialog .room-toolbar button{flex:1}#research-dialog .room-source{padding:16px}#research-dialog #room-source-quote{font-size:22px}#research-dialog #room-video{padding:12px}#research-dialog .research-heading h2{font-size:28px}}

/* Compact desk: one heading, direct tools, and a mobile reading/conversation switch. */
#research-dialog .dialog-top{height:56px;padding:8px 20px}#research-dialog .room-title{font:500 21px var(--serif)}
#research-dialog .research-body{padding-top:12px}#research-dialog .room-controls{position:sticky;top:56px;z-index:4;background:#fafaf6;padding:8px 0 0}
#research-dialog .room-toolbar{align-items:end;gap:8px;margin-bottom:16px;padding-bottom:12px}#research-dialog .room-study-select label{margin-bottom:3px}
#research-dialog .room-toolbar button{white-space:nowrap}#research-dialog .room-mobile-views{display:none}
#research-dialog .room-source{max-height:max(300px,calc(100dvh - 260px));overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-wrap:anywhere}
#research-dialog .room-desk{gap:22px}#research-dialog .discussion-messages{max-height:clamp(180px,32dvh,380px)}
#research-dialog #room-tools{margin:0 0 20px;border:1px solid #d6ded0;border-radius:9px;padding:12px 16px;background:#f1f5ee;scroll-margin-top:190px}
#research-dialog .room-tools-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}#research-dialog #room-tools>details{background:#fafbf7}
#research-dialog #room-video{scroll-margin-top:190px}#research-dialog .room-toolbar button[aria-expanded=true]{background:#e1eddf;border-color:#82a17c}
@media(max-width:760px){
 #research-dialog .research-body{padding:6px 14px 18px}#research-dialog .room-toolbar{gap:6px;margin-bottom:8px;padding-bottom:8px}
 #research-dialog .room-toolbar button{flex:1;min-height:42px;padding:8px 10px}#research-dialog #lab-study{max-width:none;font-size:16px}
 #research-dialog .room-mobile-views{display:flex;gap:6px;padding-bottom:10px;margin-bottom:12px;border-bottom:1px solid #dce3d7}
 #research-dialog .room-mobile-views button{flex:1;border:1px solid #d6dfcf;border-radius:6px;font:15px var(--sans);min-height:42px;padding:8px;background:#fafbf7}
 #research-dialog .room-mobile-views button[aria-pressed=true]{background:#294d3b;color:#fff;border-color:#294d3b}
 #research-dialog[data-room-view=source] #room-workarea,#research-dialog[data-room-view=conversation] #room-source-pane{display:none}
 #research-dialog .room-source{max-height:none;overflow:visible;padding:15px;scrollbar-gutter:auto}#research-dialog .room-source h3,#research-dialog .discussion-top h3{font-size:23px}
 #research-dialog .discussion-messages{max-height:42dvh}#research-dialog #room-tools{padding:10px;scroll-margin-top:245px}
}

/* Shared room: media above the desk; the left column always belongs to the chat. */
#research-dialog .room-workarea{min-width:0}
#research-dialog .room-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#research-dialog .room-toolbar #room-researcher-account{order:10;margin-inline-start:auto}
#research-dialog #room-video{padding:12px 16px;margin-bottom:18px}
#research-dialog #room-video h3{font:500 21px var(--serif);margin:0}
#research-dialog #room-video .embedded-video-controls{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap}
#research-dialog .room-media-modes{display:flex;gap:6px}
#research-dialog .room-media-modes [aria-pressed=true]{background:#294d3b;color:#fff}
#research-dialog #room-video .meeting-tools{margin:6px 0}
#research-dialog #video-availability{flex-basis:100%;margin:0}
#research-dialog #video-mode-hint,#research-dialog #study-host,#research-dialog #meeting-status{margin:4px 0}
#research-dialog #meeting-stage.has-meeting{height:var(--room-media-height,240px);margin-top:8px}
#research-dialog #room-video[data-sharing=true] #meeting-stage.has-meeting{height:clamp(300px,46dvh,540px)}
#research-dialog #video-participants{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:5px 0}
#research-dialog #video-participants li{background:#fafbf7;border:1px solid #d2ddcb;border-radius:20px;padding:3px 12px;font-size:13px;overflow-wrap:anywhere}
#research-dialog #video-participants .is-speaking{border-color:#598767;background:#dcecd9}
#research-dialog #video-participant-count{margin:4px 0}
#research-dialog #meeting-actions .tool-info{display:none}
#research-dialog #meeting-actions .invite-tools{margin:4px 0}
#research-dialog #room-tools{margin:14px 0}
#research-dialog #discussion-references{border-top:1px solid #d6ddce;padding-top:8px;scroll-margin-top:190px}
#research-dialog #discussion-references input,#research-dialog #discussion-references textarea,#research-dialog #discussion-references select{font-size:15px}
#research-dialog .torah-picker-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}
#research-dialog #torah-picker-results{display:flex;gap:6px;flex-wrap:wrap;max-height:220px;overflow:auto}
#research-dialog #torah-picker-results button{text-align:start;min-height:40px;border:1px solid #ccd8c5;border-radius:5px;padding:6px 12px;background:#fffef9;font-size:15px}
#research-dialog #torah-picker-results small{display:block;font-size:13px;color:#607257}
#research-dialog #torah-picker-preview{padding:12px;background:#eef3e8;border-radius:6px;margin-top:10px}
#research-dialog #torah-picked-text{font:22px/1.85 var(--serif);white-space:pre-wrap}
#research-dialog #reference-status[data-error=true],#research-dialog #torah-picker-status[data-error=true]{color:#913a2a}
@media(max-width:760px){#research-dialog #room-video .embedded-video-controls{display:block}#research-dialog #meeting-stage.has-meeting{height:260px}#research-dialog .room-title{font-size:19px}#research-dialog .room-toolbar #room-researcher-account{flex-basis:100%}#research-dialog #discussion-references{scroll-margin-top:245px}}

#research-dialog .room-membership{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 0;border-bottom:1px solid #dce3d7}#research-dialog .room-membership p{margin:0}#research-dialog .room-membership button{font-size:13px;white-space:nowrap}

#research-dialog #room-tools>.is-tool-hidden{display:none}

#research-dialog #video-participants li{border-radius:7px;min-width:105px;padding:5px 10px}#research-dialog #video-participants small{display:block;font-size:11px;color:#576f4a}

#research-dialog .reference-card{overflow-wrap:anywhere}#research-dialog .reference-card.just-saved{border:2px solid #6d9668;background:#f0f7e9;border-radius:8px;padding:12px}#research-dialog .reference-card:focus{outline:2px solid #668760;outline-offset:3px}#research-dialog #reference-status:not([data-error=true]){color:#2e6338;font-weight:600}

/* Temporary action panels share a viewport-centered, bounded surface. The chat keeps its full width. */
#research-dialog .room-video-menu,#research-dialog.chat-first #room-tools,#demo-tools-overlay{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:20;box-sizing:border-box;margin:0;max-height:calc(100dvh - 28px);overflow:auto;overscroll-behavior:contain;overflow-wrap:anywhere}
#research-dialog .room-video-control{position:relative}#research-dialog .room-video-menu{width:min(420px,calc(100vw - 28px));padding:16px;background:#fafbf7;border:1px solid #9eb297;border-radius:10px;box-shadow:0 12px 35px #102e302b;text-align:start}#research-dialog .room-video-menu h3{font-size:20px}#research-dialog .room-video-menu .room-media-modes,#research-dialog .room-video-menu .meeting-tools{display:flex;flex-wrap:wrap;gap:6px}#research-dialog .room-video-menu :is(input,select){max-width:100%;width:100%;box-sizing:border-box;padding:8px;font:14px var(--sans)}#research-dialog .room-video-menu button{white-space:normal;font-size:13px}#research-dialog .room-video-menu p{font-size:13px;margin:8px 0}#research-dialog #room-video{padding:0;border:0;background:transparent}#research-dialog #room-video .meeting-stage{margin-top:0}#research-dialog .room-video-menu #room-meeting-options{border-top:1px solid #d4dfcc;padding-top:5px}#research-dialog .room-video-menu .invite-tools{display:flex;flex-wrap:wrap;gap:6px}
@media(max-width:760px){#research-dialog .room-video-control{flex:1}#research-dialog .room-video-control>button{width:100%}}

/* Keep the working surface high: one room title and one compact tools row. */
#research-dialog .dialog-top{height:48px;padding:5px 16px;min-height:48px;box-sizing:border-box}#research-dialog .research-body{padding:4px 18px 18px}#research-dialog .room-controls{top:48px;padding:0}#research-dialog .room-toolbar{margin-bottom:6px;padding-bottom:6px;gap:6px}#research-dialog .room-desk{gap:16px}#research-dialog .room-source{padding:14px 16px}#research-dialog .room-membership,#research-dialog .discussion-top .tool-info{display:none}#research-dialog .discussion-top h3{margin-top:0}#research-dialog #discussion-status{margin:4px 0 8px;font-size:12px}#research-dialog #room-thesis{margin-top:0}#research-dialog #room-video{margin-bottom:10px}#research-dialog .room-mobile-views{margin-bottom:6px;padding-bottom:6px}
@media(max-width:760px){#research-dialog .research-body{padding:3px 12px 14px}#research-dialog .room-toolbar #room-researcher-account{flex:initial;margin-inline-start:0}#research-dialog .room-toolbar button,#research-dialog .room-toolbar .small-button{font-size:13px;padding:6px 9px}#research-dialog .room-source{padding:12px}}

/* Soft, consistent zones: warm sources, green conversation, blue participants. */
#research-dialog .room-source{background:#faf7ed;border-color:#dfd6bb}#research-dialog #room-thesis{border-bottom:1px solid #e1d8bd;padding-bottom:8px}#research-dialog .room-workarea{padding:14px 16px;background:#f0f6f2;border:1px solid #ccdcd2;border-radius:10px;box-sizing:border-box}#research-dialog .discussion-messages{background:#fafdFA;border:1px solid #d8e5dc;border-radius:8px}#research-dialog .discussion-message{border-color:#d8e4da}#research-dialog .discussion-message.is-ai{background:#e8f0e6}#research-dialog #discussion-text{background:#fcfefb;border-color:#c4d7cb}#research-dialog #room-video{background:#edf2f7;border:1px solid #cedae6;border-radius:10px;padding:6px 10px 10px}#research-dialog .room-participants{display:flex;align-items:center;gap:10px;flex-wrap:wrap}#research-dialog #video-participants{margin:3px 0}#research-dialog #video-participants li{background:#f7faff;border-color:#ccd8e5;color:#344f63}#research-dialog #video-participants .is-speaking{background:#e4f0e9;border-color:#88ac98}#research-dialog #video-participant-count{color:#566e80;font-size:12px}#research-dialog :is(.room-source,.room-workarea) :is(h2,h3){color:#304f43}
@media(max-width:760px){#research-dialog .room-workarea{padding:12px}#research-dialog #room-video{padding:5px 7px 7px}}

#research-dialog #room-presence{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;padding:5px 10px;margin:0 0 8px;border:1px solid #d0dce7;background:#edf3f7;border-radius:9px;position:relative;z-index:3}#research-dialog #room-presence #video-participant-count:empty{display:none}#research-dialog .room-ai-participant{position:relative;flex:none}#research-dialog #ask-chavruta{min-height:36px;background:#e6edf4;color:#304e66;border:1px solid #acbfd0;border-radius:7px;padding:6px 14px;font:14px var(--sans)}#research-dialog #ask-chavruta:before{content:'✦';margin-inline-end:7px;color:#708aaa}#research-dialog .room-hover-help{display:none;position:absolute;inset:calc(100% + 5px) 0 auto auto;z-index:40;width:min(340px,calc(100vw - 50px));padding:14px 16px;background:#183849;color:#f3f7f5;border:1px solid #8aa6b5;border-radius:9px;box-shadow:0 8px 22px #18384922;font:14px/1.8 var(--sans);pointer-events:none}#research-dialog .room-ai-participant:is(:hover,:focus-within) .room-hover-help{display:block}#research-dialog .room-controls{z-index:10}

#research-dialog #room-presence{flex-wrap:nowrap;align-items:center;gap:10px}#research-dialog .room-people-label{font:500 17px var(--sans);color:#3d586b;flex:none}#research-dialog #room-presence>#room-video{flex:1;min-width:0;overflow-x:auto;margin:0;border:0;padding:0;background:transparent;border-radius:8px}#research-dialog #room-presence #meeting-stage.has-meeting{width:max(100%,var(--room-media-width,100%));height:var(--room-media-height,128px)}#research-dialog #room-presence:has(.has-meeting) #video-participants,#research-dialog #room-presence:has(.has-meeting) #video-participant-count{display:none}#research-dialog #room-presence:has([data-joined=true]) #ask-chavruta{width:110px;min-height:120px;white-space:normal;line-height:1.8}#research-dialog #room-presence #room-video[data-sharing=true] .meeting-stage.has-meeting{width:100%;height:clamp(280px,42dvh,480px)}#research-dialog #room-presence #video-participants{flex-wrap:nowrap;overflow:auto}#research-dialog #room-presence #video-participants:empty{display:none}
@media(max-width:760px){#research-dialog #room-presence{gap:6px;padding:5px}#research-dialog .room-people-label{font-size:14px}#research-dialog #room-presence:has([data-joined=true]) #ask-chavruta{width:76px;padding:6px;min-height:90px;font-size:12px}#research-dialog #room-presence>#room-video{min-width:120px}}

/* The conversation is the main working surface; reading stays at the right. */
#research-dialog .room-desk{grid-template-columns:minmax(240px,1fr) minmax(0,3fr)}#research-dialog .discussion-messages{max-height:calc(100dvh - 330px);min-height:220px}#research-dialog #discussion-text{min-height:66px}#research-dialog .room-ai-participant:focus-visible{outline:2px solid #799fb8;outline-offset:3px}
@media(max-width:900px){#research-dialog .room-desk{grid-template-columns:minmax(220px,1fr) minmax(0,2fr)}}
@media(max-width:760px){#research-dialog .room-desk{grid-template-columns:1fr}#research-dialog .discussion-messages{max-height:55dvh;min-height:180px}}

#research-dialog .room-self-researcher{flex:none;min-width:100px;max-width:150px;min-height:54px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#f6f9fc;border:1px solid #c2d2df;border-radius:8px;padding:5px 9px;text-align:center;overflow-wrap:anywhere}#research-dialog .room-self-researcher strong{font:500 14px var(--sans)}#research-dialog .room-self-researcher small{font:11px var(--sans);color:#5e7586}

/* A single working surface: persistent thesis, independent chat scroll, sources below. */
#research-dialog.chat-first .room-desk{display:block;margin:0;min-height:0}#research-dialog.chat-first .room-splitter,#research-dialog.chat-first .room-mobile-views,#research-dialog.chat-first #room-open-conversation{display:none}
#research-dialog.chat-first #room-workarea{display:block!important;width:100%;padding:10px 14px}#research-dialog.chat-first .room-workarea{width:100%}#research-dialog.chat-first #room-source-pane[hidden]{display:none!important}
#research-dialog.chat-first #room-thesis{background:#faf7ed;border:1px solid #ded6be;border-radius:8px;padding:8px 12px;margin:0 0 8px;flex:none}#research-dialog .thesis-heading-row{display:flex;align-items:center;justify-content:space-between;gap:10px}#research-dialog .thesis-heading-row h3{font:500 17px var(--sans);margin:0}#research-dialog .thesis-heading-row button{min-height:30px;padding:3px 12px}#research-dialog #thesis-view{margin:5px 0 0;max-height:130px;overflow:auto;font-size:15px}#research-dialog #thesis-controls textarea{box-sizing:border-box;width:100%;font:16px/1.6 var(--sans);margin:6px 0}#research-dialog.chat-first .discussion-top h3{font-size:18px}#research-dialog.chat-first .discussion-messages{max-height:none;height:clamp(220px,calc(100dvh - 390px),900px);min-height:160px}#research-dialog.chat-first:has(#room-video:not([hidden])) .discussion-messages{height:clamp(160px,calc(100dvh - 550px),740px)}
#research-dialog.chat-first #discussion-references{background:#faf7ed;border:1px solid #ded6be;border-radius:8px;padding:0 12px;margin:6px 0 0;max-height:38dvh;overflow:auto;overscroll-behavior:contain}#research-dialog.chat-first #discussion-references>summary{position:sticky;top:0;background:#faf7ed;z-index:1}#research-dialog.chat-first #discussion-form{margin:6px 0}#research-dialog.chat-first #discussion-form>label{display:none}#research-dialog.chat-first #discussion-text{min-height:52px;height:58px}#research-dialog.chat-first #discussion-form details{margin:0}#research-dialog.chat-first #discussion-form .meeting-tools{margin:3px 0}
#research-dialog.chat-first #room-tools{width:min(460px,calc(100vw - 28px));box-shadow:0 10px 28px #18384925}#research-dialog.chat-first #room-researchers{display:flex;gap:6px;overflow:auto;min-width:0;flex:1}#research-dialog .room-researcher-card{flex:none;min-width:95px;max-width:160px;display:flex;flex-direction:column;align-items:center;background:#f7faff;border:1px solid #c2d2df;border-radius:7px;padding:5px 10px;overflow-wrap:anywhere}#research-dialog .room-researcher-card strong{font:500 14px var(--sans)}#research-dialog .room-researcher-card small{font:11px var(--sans);color:#5e7586}#research-dialog.chat-first #room-video .meeting-stage.has-meeting{height:var(--room-media-height,128px);width:max(100%,var(--room-media-width,100%))}#research-dialog.chat-first #room-video{overflow-x:auto;margin:0 0 7px}#research-dialog.chat-first #room-video[data-sharing=true] .meeting-stage.has-meeting{height:clamp(280px,42dvh,480px);width:100%}
@media(max-width:760px){#research-dialog.chat-first #room-workarea{padding:8px}#research-dialog.chat-first .discussion-messages{height:42dvh}#research-dialog.chat-first #room-thesis{padding:7px 10px}#research-dialog.chat-first #thesis-view{max-height:100px}}

#research-dialog .researcher-tools{display:flex;gap:4px;margin-top:4px}#research-dialog .researcher-tools span{font:10px var(--sans);border:1px solid #ccd3d8;color:#73818d;background:#f1f3f5;border-radius:4px;padding:2px 4px}#research-dialog .researcher-tools .is-on{color:#185c43;background:#d9f0e1;border-color:#63aa83;box-shadow:0 0 5px #70b48c55}#research-dialog .researcher-tools .is-on:before{content:'●';font-size:8px;margin-inline-end:3px}

#demo-tools-overlay{width:min(450px,calc(100vw - 28px));background:#f7faf4;border:1px solid #bbccbd;border-radius:9px;padding:14px;box-sizing:border-box;box-shadow:0 10px 28px #18384925}.room-demo #demo-participants{min-width:0;flex:1}.room-demo #room-thesis p{max-height:100px;overflow:auto;margin:4px 0;font-size:15px}.room-demo #room-video:has(#demo-screen[hidden]){display:none}.room-demo #demo-thesis-input{box-sizing:border-box;width:100%}

#research-dialog #room-basis{margin:0 0 8px;padding:7px 12px;background:#f9f7ef;border-inline-start:3px solid #cabb92;border-radius:5px}#research-dialog .room-basis-heading{display:flex;gap:10px;justify-content:space-between;align-items:baseline;font:13px var(--sans)}#research-dialog .room-basis-heading a{white-space:nowrap;color:#355774}#research-dialog #room-basis-text{font:17px/1.65 var(--serif);margin:4px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;overflow-wrap:anywhere;white-space:pre-wrap}#research-dialog.chat-first .discussion-messages{height:clamp(190px,calc(100dvh - 475px),820px)}#research-dialog.chat-first:has(#room-video:not([hidden])) .discussion-messages{height:clamp(150px,calc(100dvh - 640px),680px)}

#research-dialog .room-video-control{display:flex;align-items:center;gap:5px}#research-dialog #video-fullscreen{min-width:40px;padding:5px 8px}#research-dialog #room-video.is-fullscreen{position:fixed;inset:0;z-index:1000;margin:0;padding:46px 0 0;box-sizing:border-box;background:#10232c;overflow:hidden;width:100%;height:100dvh;border-radius:0}#research-dialog #room-video.is-fullscreen #meeting-stage.has-meeting{width:100%!important;height:calc(100dvh - 46px)!important;max-height:none!important;margin:0}#research-dialog .room-exit-fullscreen{position:absolute;top:6px;right:12px;z-index:1001;border:1px solid #819cab;border-radius:6px;background:#eff6f7;color:#254959;min-height:34px;padding:5px 14px;font:14px var(--sans)}

#research-dialog .room-researcher-card{min-height:65px;padding:6px 8px 4px;justify-content:space-between}#research-dialog .room-researcher-card>strong{align-self:stretch;text-align:center;margin-top:5px;padding:3px 0 0;border-top:1px solid #d8e2e9}

#video-connection-guide{background:#eef4f6;border:1px solid #c0d2dc;border-radius:8px;padding:5px 10px;margin:0 0 10px!important}#video-connection-guide>summary{font-size:14px!important}#video-connection-guide ol{padding-inline-start:18px;font-size:13px;line-height:1.7;margin:8px 0}#video-connection-guide label,#video-connection-guide a{font-size:12px}#video-connection-guide select{font-size:13px!important;padding:5px!important}#video-connection-guide[data-phase=joined]{background:#edf5ed}#research-dialog #room-toggle-video{white-space:normal;line-height:1.35;max-width:160px}

/* Research products follow the full-width conversation; editing stays centered. */
#research-outputs{margin:12px 0;padding:12px;border:1px solid #cbd9cf;background:#f8faf6;border-radius:8px}#research-outputs .output-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px}#research-outputs h3{font:500 18px var(--sans);margin:0 0 8px}#research-outputs .research-output-card{border-top:1px solid #d7e1d9;padding:6px 0}#research-outputs .output-content,#research-outputs .output-source-text{white-space:pre-wrap;overflow-wrap:anywhere;font:15px/1.85 var(--sans)}#research-outputs .output-source-text{display:block;margin:5px 0;font-size:14px}#research-outputs a{overflow-wrap:anywhere}#research-outputs .output-approved{color:#285e3b;font-size:13px}#research-outputs .output-review-note{background:#faf3df;padding:10px;border-radius:6px;white-space:pre-wrap}#research-output-dialog{position:fixed;inset:0;margin:auto;width:min(720px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:20px;overflow:auto;border:1px solid #9eb297;border-radius:10px;background:#fafbf7;box-sizing:border-box}#research-output-dialog::backdrop{background:#15352650}#research-output-dialog .room-tools-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}#research-output-dialog h2{font:500 20px var(--sans);margin:0 0 16px}#research-output-dialog label{display:block;margin:8px 0}#research-output-dialog textarea{box-sizing:border-box;width:100%;font:16px/1.7 var(--sans);padding:10px;border:1px solid #bacdbd;border-radius:6px}#output-dialog-error{color:#9d332e}#research-output-dialog button{min-height:40px}#research-output-dialog .tool-info{font:13px/1.7 var(--sans)}

#message-version-dialog{position:fixed;inset:0;margin:auto;width:min(720px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:20px;overflow:auto;box-sizing:border-box;border:1px solid #9eb297;border-radius:10px;background:#fafbf7}#message-version-dialog::backdrop{background:#15352650}#message-version-dialog .room-tools-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}#message-version-dialog textarea{box-sizing:border-box;width:100%;font:16px/1.7 var(--sans);padding:10px}#message-version-dialog .discussion-text{white-space:pre-wrap;overflow-wrap:anywhere}#message-version-history article{border-top:1px solid #ccdcd2;padding-top:10px}#message-version-error{color:#9d332e}.message-version-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:5px}.message-version-actions button{font-size:12px;padding:3px 8px}#rav-room-settings{border-top:1px solid #ccdcd2;margin-top:14px;padding-top:8px}#rav-task-choices{display:flex;flex-wrap:wrap;gap:10px}#rav-task-choices label{display:flex;align-items:center;gap:5px}#output-kind-options button{min-height:42px}

#research-dialog #room-presence #room-video[data-joined=true]:not([data-sharing=true]):not(.is-fullscreen){flex:0 1 auto;width:var(--room-media-width,300px);max-width:min(540px,55vw)}#research-dialog #room-presence:has([data-joined=true]) #ask-chavruta{min-height:90px}#research-dialog #video-session-status{font-size:11px;margin:2px 0;line-height:1.4}@media(max-width:760px){#research-dialog #room-presence #room-video[data-joined=true]:not([data-sharing=true]):not(.is-fullscreen){max-width:100%;width:100%}}

#research-dialog .discussion-message.is-ai,#research-outputs,#rav-room-settings{background:#f1edf7;border-color:#cbc3db}#research-outputs{border-inline-start:4px solid #8b75aa}#research-outputs :is(h3,summary),#rav-room-settings h4{color:#514267}#research-output-dialog{background:#f5f1fa;border-color:#b7a7cf}#research-output-dialog::backdrop{background:#33234b45}#research-dialog #ask-chavruta{background:#ede7f5;border-color:#bbaaca;color:#514267}#rav-room-settings{padding:12px;border:1px solid #cbc3db;border-radius:8px}#research-dialog .discussion-message.is-ai>header strong{color:#514267}

#research-dialog .discussion-message{border-radius:8px;padding:10px 12px;margin:8px 0;border:1px solid #d8e4da;border-inline-start:3px solid var(--message-author-accent,#8b75aa)}#research-dialog .discussion-message:not(.is-ai){background:var(--message-author-background,#fafdFA)}#research-dialog .discussion-message header{margin-bottom:5px}#research-dialog .discussion-message.is-ai{border-inline-start-color:#8b75aa}

/* The live media box is a sibling of the researcher strip. Keep the entire
   iframe in view so the local tile cannot land beyond a scrolling viewport. */
#research-dialog.chat-first #room-video[data-joined=true]:not([data-sharing=true]):not(.is-fullscreen){width:min(540px,100%);max-width:100%;overflow:hidden}
#research-dialog.chat-first #room-video[data-joined=true]:not([data-sharing=true]):not(.is-fullscreen) #meeting-stage.has-meeting{width:100%;height:var(--room-media-height,240px);min-height:0}

@media(max-width:760px){#research-dialog.chat-first #room-video[data-joined=true]:not([data-sharing=true]):not(.is-fullscreen) #meeting-stage.has-meeting{height:max(260px,var(--room-media-height,240px))}}

/* Participant names and live controls belong to the media box, not a separate
   researcher toolbar. RAV-CHAT remains attached to the text discussion. */
#research-dialog #room-video>#room-presence{display:block;padding:0;margin:0 0 7px;border:0;background:transparent;z-index:auto}
#research-dialog #room-video #room-researchers{display:flex;flex-wrap:wrap;overflow:visible;gap:6px}
#research-dialog #room-video .room-researcher-card{flex-direction:row;gap:8px;min-width:0;max-width:none;padding:5px 8px;border-radius:7px}
#research-dialog #room-video .researcher-tools{display:flex;gap:4px}
#research-dialog #room-video .researcher-tools :is(button,span){font:12px var(--sans);padding:4px 7px;border:1px solid #c3d0d8;background:#f3f6f8;color:#627582;border-radius:6px}
#research-dialog #room-video .researcher-tools .is-on{background:#d9efdf;color:#235740;border-color:#96c6a7}
#research-dialog #room-video .researcher-tools button:disabled{opacity:.55}
#research-dialog #room-conversation-pane>.room-ai-participant{margin:7px 0 12px;display:inline-block}
#research-dialog #room-conversation-pane #ask-chavruta{background:#efe8f6;border-color:#c3b0d2;color:#58416c;min-height:34px}
@media(max-width:760px) and (orientation:portrait){#research-dialog.chat-first #room-video[data-joined=true]:not([data-sharing=true]):not(.is-fullscreen) #meeting-stage.has-meeting{height:clamp(400px,52dvh,480px)}}

#research-dialog .room-notebook-control{position:relative;display:inline-flex;flex:none}
#research-dialog .room-notebook-control:has(button[hidden]){display:none}
#research-dialog #room-open-notes{width:38px;height:38px;padding:6px;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;background:#faf4df;border-color:#c9b787;color:#735d2d}
#research-dialog #room-open-notes svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#research-dialog .room-notebook-help{display:none;position:absolute;z-index:45;top:calc(100% + 7px);inset-inline-start:0;width:min(280px,calc(100vw - 36px));box-sizing:border-box;padding:10px 13px;border-radius:8px;background:#273e4c;color:#fff;font:13px/1.7 var(--sans);box-shadow:0 5px 18px #17334633;pointer-events:none}
#research-dialog .room-notebook-control:is(:hover,:focus-within) .room-notebook-help{display:block}
