.research-context-button{margin-left:14px}
body.research-context-open{overflow:hidden}
.research-context-dialog{box-sizing:border-box;width:min(1060px,calc(100vw - 36px));max-width:none;max-height:calc(100dvh - 36px);padding:0;border:1px solid var(--border);border-radius:16px;background:var(--surface,#fff);color:var(--text,#17202b);box-shadow:0 22px 90px #0006}
.research-context-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
.research-context-dialog::backdrop{background:#06101cb3}
.context-header{display:flex;justify-content:space-between;gap:18px;padding:20px 24px;border-bottom:1px solid var(--border);align-items:flex-start;flex-shrink:0}
.context-header h2{margin:0 0 6px;font-size:22px}.context-header p{margin:0}
.context-controls{display:flex;gap:8px;flex-shrink:0}
.context-body{padding:20px 24px;overflow:auto;min-height:0;flex:1}
.context-notices{margin-bottom:18px}.context-notices p{margin:4px 0}
.context-layout{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:28px;align-items:start}
.context-video{position:sticky;top:0;min-width:0}.context-video h3,.context-conversation h3{margin:0 0 14px}
.context-video a{color:var(--link)}.context-caption{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.context-player{margin:16px 0}.context-player>button{width:100%;min-height:92px;background:var(--evidence,#f3f5f8)}
.context-player iframe{display:block;width:100%;height:490px;max-height:60dvh;border:0;border-radius:12px;background:#111}
.context-comment{padding:16px;border:1px solid var(--border);border-radius:12px;margin-bottom:12px;min-width:0;overflow-wrap:anywhere}
.context-selected{border:2px solid var(--link,#5465df);background:var(--evidence,#f3f5f8)}
.context-label{display:block;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:9px}
.context-comment-heading{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;font-size:13px}
.context-comment-body{white-space:pre-wrap;line-height:1.55;margin:12px 0}.context-reply-target{font-size:12px;color:var(--muted);margin:8px 0}
.context-open-reply{font-size:12px;padding:6px 10px}.context-replies{margin-top:14px}
@media(max-width:700px){.research-context-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.context-header{padding:16px;gap:10px}.context-header h2{font-size:19px}.context-controls{flex-direction:column;align-items:flex-end}.context-body{padding:16px;min-height:0}.context-layout{grid-template-columns:1fr;gap:24px}.context-video{position:static}.context-player iframe{max-width:340px;margin:auto;height:490px}.context-comment-heading{flex-direction:column}.research-context-button{margin:10px 0 0;display:block}}

@media(max-width:450px){.context-header{display:block}.context-header>div:first-child{margin-bottom:12px;min-width:0}.context-controls{width:100%;flex-direction:row;justify-content:flex-end;align-items:center}.context-controls button{min-width:0;white-space:normal}.context-controls button:first-child:not([hidden]){margin-right:auto}}
