.ob-chat-notice {
  position:fixed; z-index:65; inset-inline:12px; bottom:calc(82px + env(safe-area-inset-bottom));
  margin-inline:auto; width:fit-content; max-width:min(460px,calc(100vw - 24px));
  background:var(--text); color:white; border-radius:10px; padding:8px 14px;
  overflow-wrap:anywhere; pointer-events:none;
}
.ob-chat-notice:empty { display:none; }
[data-member-nav][hidden], [data-guest-nav][hidden], .ob-nav-count[hidden] { display: none !important; }
.ob-nav-count { display:inline-flex; align-items:center; justify-content:center; margin-inline-start:.35rem; min-width:1.35rem; height:1.35rem; padding-inline:.3rem; border-radius:1em; color:white; background:#be123c; font:700 .75rem/1 var(--body); font-variant-numeric:tabular-nums; }
.ob-floating-chat { display:none; }
@media screen {
  .ob-floating-chat:not([hidden]) {
    position:fixed; z-index:64; right:24px; bottom:16px;
    display:grid; justify-items:end; gap:8px; color:var(--text);
    font:400 1rem/1.65 var(--body);
  }
  .ob-floating-chat [hidden] { display:none !important; }
  .ob-floating-chat :is(button,input,select,textarea,a) { font:inherit; }
  .ob-floating-chat button {
    border:1px solid var(--border); border-radius:8px; padding:6px 10px; background:var(--surface); color:var(--text);
    cursor:pointer; min-height:48px; font-weight:600;
  }
  .ob-floating-chat button:not(:disabled):hover { background:var(--selected); }
  .ob-floating-chat :is(button,input,select,textarea,a):focus-visible { outline:3px solid var(--focus-color); outline-offset:2px; }
  .ob-floating-chat button:disabled { cursor:wait; opacity:.65; }
  .ob-floating-chat .ob-chat-launch {
    border:0; border-radius:10px; min-height:48px; padding:8px 16px; font-weight:600;
    background:var(--brand); color:#fff; box-shadow:0 2px 6px rgb(32 59 80 / .08);
  }
  .ob-floating-chat .ob-chat-launch:hover { background:var(--brand-hover); }
  .ob-chat-panel {
    display:flex; flex-direction:column; width:min(350px,calc(100vw - 40px)); height:510px;
    max-height:calc(100vh - 100px); max-height:calc(100dvh - 100px);
    border:1px solid var(--border); border-radius:10px; background:var(--surface);
    box-shadow:0 3px 10px rgb(32 59 80 / .1); overflow:hidden;
  }
  .ob-chat-heading {
    display:flex; align-items:center; gap:6px; padding:6px 8px; border-bottom:1px solid var(--border);
    background:var(--surface);
  }
  .ob-chat-heading h2 {
    flex:1; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    color:var(--text); font:700 1rem/1.3 var(--body);
  }
  .ob-chat-inbox,.ob-chat-history { flex:1; min-height:0; overflow:auto; padding:10px; margin:0; overscroll-behavior:contain; }
  .ob-chat-inbox p { margin:8px 0; }
  .ob-chat-inbox .ob-chat-person {
    display:flex; align-items:center; gap:8px; width:100%; margin-bottom:5px; text-align:left; overflow-wrap:anywhere;
  }
  .ob-chat-person strong,.ob-chat-person div span { display:block; }
  .ob-chat-person div span,.ob-chat-feedback { font-size:.82rem; }
  .ob-chat-new-group { align-self:flex-start; margin:8px 10px 0; }
  .ob-chat-group-create { flex:1; min-height:0; padding:10px; overflow:auto; }
  .ob-chat-group-create form,.ob-chat-group-people { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
  .ob-chat-group-create input { flex:1; min-width:0; padding:6px; min-height:48px; border:1px solid var(--border); border-radius:8px; }
  .ob-chat-group-create form:not(.ob-chat-group-search) input { flex-basis:100%; }
  .ob-chat-group-create .ob-chat-group-people:empty { display:none; }
  .ob-chat-history { display:flex; flex-direction:column; gap:7px; list-style:none; }
  .ob-chat-history li {
    align-self:flex-start; max-width:86%; padding:6px 10px; border-radius:10px; background:var(--background);
    white-space:pre-wrap; overflow-wrap:anywhere;
  }
  .ob-chat-history strong { display:block; }
  .ob-chat-profile { display:block; color:var(--link); font-weight:600; }
  .ob-chat-history li.mine { align-self:flex-end; background:var(--selected); }
  .ob-chat-history .ob-chat-day {
    align-self:stretch; display:flex; align-items:center; gap:8px; max-width:none;
    padding:4px 0; background:transparent; font-size:.76rem; color:var(--muted);
  }
  .ob-chat-day::before,.ob-chat-day::after { content:''; flex:1; border-top:1px solid var(--border); }
  .ob-chat-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-size:.75rem; color:var(--muted); }
  .ob-chat-meta .ob-avatar { width:26px; height:26px; flex:0 0 26px; }
  .ob-chat-bubble { margin:0 0 4px; white-space:pre-wrap; }
  .ob-chat-bubble[role=button] { user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; cursor:context-menu; }
  .ob-chat-feedback { margin:0; padding:4px 10px; overflow-wrap:anywhere; }
  .ob-chat-feedback:empty,.ob-chat-person span:empty { display:none; }
  .ob-chat-compose { display:flex; gap:6px; padding:7px 10px; }
  .ob-chat-compose :is(input,select),.ob-chat-editor textarea { flex:1; min-width:0; padding:6px 8px; min-height:48px; border:1px solid var(--border); background:var(--surface); color:var(--text); border-radius:8px; }
  .ob-chat-editor { flex-wrap:wrap; }
  .ob-chat-editor textarea { flex-basis:100%; resize:vertical; max-height:110px; font:inherit; }
  .ob-floating-chat :is(.ob-chat-collapse,.ob-chat-full) {
    display:grid; place-items:center; flex:none; box-sizing:border-box; width:48px; height:48px; padding:0;
    border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); font-size:1.25rem; text-decoration:none;
  }
}
@media (min-width:761px) and (max-width:1299px) {
  body.ob-has-app-nav .ob-floating-chat:not([hidden]) { bottom:calc(78px + env(safe-area-inset-bottom)); }
  body.ob-has-app-nav .ob-chat-panel { max-height:calc(100vh - 145px); max-height:calc(100dvh - 145px); }
}
@media (pointer:coarse), (max-width:760px) {
  .ob-floating-chat:not([hidden]) { right:20px; bottom:calc(78px + env(safe-area-inset-bottom)); }
  .ob-chat-panel { max-height:calc(100vh - 145px); max-height:calc(100dvh - 145px - env(safe-area-inset-bottom)); }
  .ob-floating-chat :is(.ob-chat-collapse,.ob-chat-full) { width:48px; height:48px; }
  .ob-chat-compose :is(input,textarea,select) { font-size:16px; }
}
@media (max-width:760px), (pointer:coarse) and (max-height:500px), (horizontal-viewport-segments:2) {
  .ob-floating-chat:not(.ob-group-from-messages) { display:none; }
  .ob-floating-chat.ob-group-from-messages .ob-chat-launch { display:none; }
}
