
.chat-nav-badge { background: var(--info, #2563eb); color: #fff; margin-left: 4px; }
.chat-nav-badge.bn-chat { position: absolute; top: 4px; right: calc(50% + 6px); left: auto; margin: 0; line-height: 16px; min-width: 18px; font-size: 10px; padding: 0 5px; }
.bn-link { position: relative; }

.notify-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.notify-row:last-child { border-bottom: 0; }
.notify-row input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.notify-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.assignee-mini { font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--info, #2563eb) 14%, transparent);
  color: var(--text); white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.assignee-mini.me { background: var(--info, #2563eb); color: #fff; }

.assign-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.assign-line select { max-width: 170px; }

.poll-warn { margin: 6px 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--urgent, #c62828);
  background: color-mix(in srgb, var(--urgent, #c62828) 9%, var(--surface)); font-size: 13px; overflow-wrap: anywhere; }
.poll-warn b { color: var(--urgent, #c62828); }

.conv-hint { font-size: 11.5px; color: var(--muted); padding: 2px 2px 0; }
.conv-hint kbd, .kbd-help kbd { font: inherit; font-size: 11px; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.kbd-help { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; font-size: 14px; }

.slash-menu { display: flex; flex-direction: column; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.slash-menu[hidden] { display: none; }
.slash-item { display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; color: inherit; }
.slash-item:last-child { border-bottom: 0; }
.slash-item small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.slash-item.on, .slash-item:hover { background: var(--gold-soft, #fff8e1); }

.qr-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; width: 0; min-width: 100%; }
.slash-menu { width: 0; min-width: 100%; }
.qr-chips .btn { white-space: nowrap; flex-shrink: 0; }

@media (max-width: 720px) {
  .conv-hint { display: none; }
  .assignee-mini { max-width: 64px; }
}

@media (max-width: 720px) {
  .thread-card.kb-open .qr-chips { display: none; }
  .thread-card.kb-open .slash-menu { max-height: 150px; }
}


.poll-warn.compact { display: flex; align-items: center; gap: 4px; margin: 0; padding: 5px 10px; font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; }
.poll-warn.compact b { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.poll-warn.compact span { flex-shrink: 0; }
.poll-warn.compact a { margin-left: auto; flex-shrink: 0; font-weight: 600; }
.conv-tools { gap: 6px; }
.conv-tools .page-chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; margin-bottom: 0; }
.conv-tools .page-chip-row::-webkit-scrollbar { display: none; }
.conv-tools .page-chip { flex: 0 0 auto; }
.conv-filter-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.conv-filter-row::-webkit-scrollbar { display: none; }
.conv-filter-row > div { flex: 0 0 auto; }
.conv-filter-row .closed-chip-row { margin: 0; }
.conv-filter-row .chips { padding-bottom: 0; }
.conv-tools .view-chips { margin-top: 0; }
.conv-tools .chips > * { flex: 0 0 auto; }


@media (max-width: 720px) {
  .modal .img-grid { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }

  .main > .page-head:has(~ .conv-layout.has-thread) { display: none; }
  .main:has(> .conv-layout.has-thread) { padding-top: 6px; padding-bottom: 0; }
  .conv-layout.has-thread .thread-card:not(.kb-open) {
    min-height: 300px; margin-bottom: 0;
    height: calc(100vh - var(--thread-top, calc(62px + env(safe-area-inset-top))) - var(--bottom-h) - env(safe-area-inset-bottom) - 6px);
  }
  @supports (height: 100dvh) {
    .conv-layout.has-thread .thread-card:not(.kb-open) {
      height: calc(100dvh - var(--thread-top, calc(62px + env(safe-area-inset-top))) - var(--bottom-h) - env(safe-area-inset-bottom) - 6px);
    }
  }
}


.push-block { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.push-opts { padding-left: 28px; display: flex; flex-direction: column; gap: 4px; }
.push-opts .notify-row span { display: flex; flex-direction: column; gap: 4px; }
.push-nudge { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between;
  background: var(--surface, #1b1b1b); color: var(--text, #fff); border: 1px solid var(--line, #333); border-radius: 12px;
  padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: 14px; }
.push-nudge-text { flex: 1 1 220px; }
.push-nudge-actions { display: flex; gap: 6px; }
@media (min-width: 900px) { .push-nudge { left: auto; right: 20px; bottom: 20px; max-width: 420px; } }
