#presence-dialog.presence-dialog { width:min(960px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); padding:0; overflow:hidden; }
#presence-dialog>.dialog-card { display:flex; flex-direction:column; padding:0; max-height:calc(100dvh - 24px); overflow:hidden; background:#fff; }
#presence-dialog>.dialog-card>header { flex:none; position:static; margin:0; padding:18px 24px; border-bottom:1px solid var(--line); background:#fff; }
#presence-dialog .quick-presence-body { padding:20px 24px; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.quick-activity { border-top:1px solid var(--line); padding:18px 0; }
.quick-activity [hidden] { display:none!important; }
.quick-current { display:flex; justify-content:space-between; align-items:center; gap:14px; background:#e8f6f3; border-left:4px solid var(--turquoise); padding:14px; }
.quick-current>div { min-width:0; }
.quick-current span,.quick-current strong,.quick-current small,.quick-recent small { display:block; overflow-wrap:anywhere; }
.quick-current span { font-size:11px; font-weight:800; color:var(--blue-dark); }
.quick-current strong { font-size:17px; margin:5px 0; }
.quick-hint,.quick-activity small,.quick-recent p { font-size:12px; color:var(--muted); }
.quick-kinds,.quick-categories,.quick-form-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.quick-kinds .button { flex:1; }
.quick-activity button { min-height:44px; white-space:normal; }
.quick-activity [aria-pressed=true] { background:var(--navy); color:#fff; border-color:var(--navy); }
.quick-activity form { padding:14px; border:1px solid var(--line); background:#f7f9f8; display:grid; gap:10px; }
.quick-activity label { display:grid; gap:6px; font-size:13px; font-weight:650; }
.quick-activity input { width:100%; min-width:0; font-size:16px; min-height:44px; }
.quick-form-actions { margin:0; }
.quick-form-actions .primary { flex:1; }
.quick-results { display:grid; max-height:180px; overflow:auto; }
.quick-results button { text-align:left; padding:10px; background:white; border:1px solid var(--line); overflow-wrap:anywhere; }
.quick-recent h3 { font-size:15px; margin:20px 0 8px; }
.quick-recent article { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.quick-recent article>div { min-width:0; overflow-wrap:anywhere; }
.quick-recent article .button { flex:none; }
.quick-presence-history summary { padding:12px 0; cursor:pointer; font-size:13px; font-weight:650; }
.quick-activity [role=alert] { background:#fff1ee; border-left:3px solid #a52b22; padding:12px; }
.quick-activity [role=status]:empty { display:none; }
@media(max-width:600px) {
  #presence-dialog.presence-dialog[open] { width:100%; height:100dvh; max-height:100dvh; margin:0; border-radius:0; }
  #presence-dialog>.dialog-card { height:100%; max-height:100dvh; }
  #presence-dialog>.dialog-card>header { padding:12px 14px; }
  #presence-dialog .quick-presence-body { padding:12px 14px max(20px,env(safe-area-inset-bottom)); }
  #presence-dialog .presence-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #presence-dialog .presence-summary>div { padding:9px; }
  #presence-dialog .presence-actions { display:flex; }
  .quick-kinds { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .quick-kinds .button { padding:8px 4px; font-size:12px; }
  .quick-current { flex-wrap:wrap; }
}
