/* Short primary journey, one optional detail view, one scroll owner per view. */
#ym-dialog:not([hidden]){
 height:auto!important;max-height:calc(100dvh - 260px)!important;
 width:min(300px,calc(100vw - 24px))!important;bottom:160px!important;
}
#ym-dialog .ym-body{display:block!important;padding:14px!important;overflow:auto!important;min-height:0}
#ym-dialog .ym-compact-stage{display:grid;gap:12px}
#ym-dialog .ym-compact-stage[hidden],#ym-dialog .ym-compact-options[hidden]{display:none!important}
#ym-dialog .ym-compact-tools{display:flex;align-items:center;gap:5px}
#ym-dialog .ym-compact-tools button{background:transparent!important;border:0!important;padding:5px 8px!important;min-height:32px;font-size:12px}
#ym-dialog .ym-top strong small{display:none!important}
#ym-dialog .ym-top{padding:9px 12px!important}
#ym-dialog .ym-compact-stage .ym-setup{display:grid;gap:8px}
#ym-dialog .ym-compact-stage .ym-source-cards{display:flex!important;gap:6px!important}
#ym-dialog .ym-compact-stage .ym-source-card{
 display:flex!important;flex:1;align-items:center;justify-content:center;gap:5px;
 min-height:36px!important;padding:6px!important;border-radius:10px!important
}
#ym-dialog .ym-source-card .ym-source-icon,#ym-dialog .ym-source-card small{display:none!important}
#ym-dialog .ym-source-card strong{font-size:12px!important}
#ym-dialog .ym-consent{border:0!important;background:transparent!important;padding:0!important;font-size:12px!important;line-height:1.5}
#ym-dialog .ym-consent input{flex:none;margin-top:3px}
#ym-dialog .ym-primary-actions{display:flex!important;gap:8px;align-items:center}
#ym-dialog:not(.ym-live) #ym-start{width:100%}
#ym-dialog.ym-live .ym-primary-actions{justify-content:space-between;order:4}
#ym-dialog.ym-live .ym-compact-stage>.ym-setup,#ym-dialog.ym-live .ym-compact-stage>.ym-consent{display:none!important}
#ym-dialog:not(.ym-live) .ym-compact-stage>.ym-script-card,#ym-dialog:not(.ym-live) .ym-compact-copy{display:none!important}
#ym-dialog .ym-compact-stage>#ym-status{font-size:11px!important;line-height:1.45;opacity:.72;margin:0;order:0}
#ym-dialog .ym-compact-stage>.ym-script-card{order:1;border:0!important;padding:0!important;background:transparent!important;display:grid;gap:6px}
#ym-dialog .ym-script-label{text-transform:none;letter-spacing:0;font-weight:450;font-size:12px}
#ym-dialog #ym-answer{
 border:0!important;background:transparent!important;padding:0!important;
 min-height:0!important;max-height:none!important;overflow:visible!important;
 font-size:16px!important;line-height:1.6!important;font-weight:450
}
#ym-dialog .ym-compact-copy{order:3}
#ym-dialog #ym-copy{border-radius:999px!important;font-size:12px!important;padding:6px 12px!important}
#ym-dialog .ym-compact-options{display:grid;gap:14px}
#ym-dialog .ym-extra-audio{display:grid;gap:9px}
#ym-dialog .ym-compact-options #ym-captions,
#ym-dialog .ym-compact-options #ym-recent-list,
#ym-dialog .ym-compact-options #ym-commitments-list{
 max-height:none!important;overflow:visible!important
}
#ym-dialog #ym-performance{white-space:pre-wrap;overflow-wrap:anywhere}
#ym-dialog.ym-options-open{height:min(520px,calc(100dvh - 260px))!important}
@media(min-width:1100px){
 body:has(> #ym-dialog:not([hidden])) > main > .workspace{padding-right:0!important}
 body:has(> #ym-dialog:not([hidden])) > main > .workspace > .messages{
  /* Keep the scrolling element full-width: a narrowed #messages puts its
     native scrollbar beside the chat, instead of at the window's right edge. */
  width:100%!important;max-width:none!important;align-self:stretch;
  box-sizing:border-box!important;
  padding-left:max(22px,calc((100% - 332px - 860px)/2 + 22px))!important;
  padding-right:calc(332px + max(22px,calc((100% - 332px - 860px)/2 + 22px)))!important;
  scrollbar-gutter:auto!important
 }
 body:has(> #ym-dialog:not([hidden])) > main > .workspace > .composer{
  width:calc(100% - 332px)!important;
  margin-left:max(0px,calc((100% - 332px - 860px)/2))!important;margin-right:auto!important
 }
}
@media(max-height:600px){
 #ym-dialog:not([hidden]){bottom:100px!important;max-height:calc(100dvh - 180px)!important}
}

/* Keep active controls on one quiet row. */
#ym-dialog .ym-compact-copy{display:flex;align-items:center;gap:6px}
#ym-dialog.ym-live .ym-primary-actions{display:none!important}
#ym-dialog #ym-copy{color:var(--fg,#20362b)!important;background:transparent!important;margin-right:auto}
#ym-dialog.ym-live #ym-pause,#ym-dialog.ym-live #ym-end{border:0!important;background:transparent!important;flex:none!important;padding:6px!important;font-size:12px}
#ym-dialog .ym-compact-stage>#ym-status{background:transparent!important;padding:0!important}
#ym-dialog.ym-live .ym-compact-stage>#ym-status::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent,#21874d);margin-right:6px}
/* Keep the consented meeting controls clear of the taller narrow-screen composer. */
@media(max-width:540px){
 #ym-dialog:not([hidden]){bottom:192px!important;max-height:calc(100dvh - 300px)!important}
}
