/* One stable meeting dock. Keep capture, transcription and chat behavior independent. */
#ym-dialog[hidden],#ym-mini[hidden]{display:none!important}
#ym-dialog:not([hidden]){
 position:fixed!important;inset:auto 16px 112px auto!important;
 width:min(330px,calc(100vw - 32px))!important;max-width:330px!important;
 height:min(480px,calc(100dvh - 230px))!important;max-height:calc(100dvh - 230px)!important;
 display:flex!important;flex-direction:column;overflow:hidden!important;
 border:1px solid var(--border,#d7e4dc);border-radius:12px!important;
 box-shadow:0 3px 16px #142a1d0d!important;
}
#ym-dialog .ym-top{position:static!important;flex:none;padding:14px 16px!important;gap:12px}
#ym-dialog .ym-top strong{font-size:15px!important;display:flex;flex-direction:column;gap:2px}
#ym-dialog .ym-top small{display:block!important;margin:0;font-size:11px!important;font-weight:450}
#ym-dialog .ym-top button{width:34px;min-height:34px;border-radius:10px;font-size:22px}
#ym-dialog .ym-body{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;padding:16px!important;gap:14px!important}
#ym-dialog .ym-hero{padding:13px 14px!important;border-radius:14px!important}
#ym-dialog .ym-hero .ym-eyebrow{display:none}
#ym-dialog .ym-hero h2{font-size:18px!important;line-height:1.3}
#ym-dialog .ym-hero p{font-size:12px!important;line-height:1.55;margin-top:6px}
#ym-dialog .ym-source-cards{gap:8px!important}
#ym-dialog .ym-source-card{min-width:0;min-height:100px!important;padding:12px!important;border-radius:13px!important}
#ym-dialog .ym-source-card strong{font-size:13px!important}
#ym-dialog .ym-source-card small{font-size:11px!important}
#ym-dialog textarea,#ym-dialog select{min-width:0;max-width:100%;box-sizing:border-box}
#ym-dialog .ym-script-styles{flex-wrap:wrap}
#ym-dialog .ym-script-size-row{flex-wrap:wrap}
#ym-dialog #ym-start{min-height:44px!important;font-size:14px!important}
#ym-mini:not([hidden]){
 display:flex!important;position:fixed!important;inset:auto 16px 112px auto!important;
 width:260px!important;max-width:calc(100vw - 32px);min-height:56px;
 padding:10px 12px;border-radius:16px;gap:10px;
 box-shadow:0 6px 24px #142a1d18!important
}
#ym-mini #ym-mini-preview{display:none}
#ym-mini .ym-mini-copy strong{font-size:13px}
#ym-mini .ym-mini-copy small{font-size:11px}
#ym-mini button{min-height:36px}
#ym-mini #ym-mini-finish{display:none}
/* Reserve a separate rail so the dock cannot cover the reading area or composer. */
@media(min-width:1100px){
 body:has(> #ym-dialog:not([hidden])) > main > .workspace{
  box-sizing:border-box!important;padding-right:362px!important;min-width:0!important
 }
}
/* Narrow windows use a bounded sheet; minimizing immediately restores the chat. */
@media(max-width:1099px){
 #ym-dialog:not([hidden]){
  inset:auto 12px 112px auto!important;width:min(330px,calc(100vw - 24px))!important;
  height:min(480px,calc(100dvh - 210px))!important;max-height:calc(100dvh - 210px)!important
 }
 #ym-mini:not([hidden]){right:12px!important;bottom:112px!important}
}
@media(max-width:540px){
 #ym-dialog:not([hidden]){left:12px!important;right:12px!important;width:auto!important;max-width:none!important}
 #ym-mini:not([hidden]){left:auto!important;width:240px!important}
}

/* Calm controls: keep the existing + entry as the only minimized launcher. */
#ym-mini{display:none!important}
#ym-dialog .ym-top{padding:11px 14px!important}
#ym-dialog .ym-top strong{font-size:14px!important;font-weight:600}
#ym-dialog .ym-hero{background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important}
#ym-dialog .ym-hero h2{font-size:15px!important;font-weight:550}
#ym-dialog .ym-hero p{font-size:12px!important;opacity:.65}
#ym-dialog .ym-body{padding:14px!important;gap:12px!important}
#ym-dialog .ym-source-card{min-height:76px!important;background:var(--panel,#fff)!important;box-shadow:none!important;border:1px solid var(--border,#d7e0da)!important;padding:10px!important}
#ym-dialog .ym-source-card[aria-pressed="true"]{border-color:var(--accent,#21874d)!important;background:color-mix(in srgb,var(--panel,#fff) 97%,var(--accent,#21874d) 3%)!important}
#ym-dialog .ym-source-card .ym-source-icon{width:24px!important;height:24px!important;background:transparent!important}
#ym-dialog .ym-source-card strong{font-weight:550!important}
#ym-dialog #ym-start{box-shadow:none!important;background:var(--accent,#21874d)!important;border-radius:9px!important;min-height:40px!important;font-size:13px!important}
#ym-dialog .ym-script-card{box-shadow:none!important;background:var(--panel,#fff)!important;border:1px solid var(--border,#d7e0da)!important;border-radius:10px!important}
#ym-dialog #ym-answer{font-size:16px!important;line-height:1.65!important}

/* Same far-right meeting rail in the native YapThing shell and browser chat. */
html.yap-desktop-app #ym-dialog:not([hidden]){right:16px!important;left:auto!important;}
@media(min-width:1100px){html.yap-desktop-app body:has(> #ym-dialog:not([hidden])) > main > .workspace{padding-right:362px!important;}}

/* When the meeting is open, the chat text keeps a reserved right rail,
   but its scrolling surface reaches the actual window edge. */
@media(min-width:1100px){
 body:has(> #ym-dialog:not([hidden])) > main > .workspace,
 html.yap-desktop-app body:has(> #ym-dialog:not([hidden])) > main > .workspace{
  padding-right:0!important;
 }
 body:has(> #ym-dialog:not([hidden])) > main > .workspace > .messages{
  width:100%!important;max-width:none!important;
  padding-right:calc(362px + clamp(16px,4vw,80px))!important;
  scrollbar-gutter:auto!important;
 }
 body:has(> #ym-dialog:not([hidden])) > main > .workspace > .composer{
  width:calc(100% - 362px)!important;
 }
}
