/* Team chat floating widget — shared across all authenticated hub pages.
   Uses hub.css tokens so it inherits theme + dark/perf modes automatically. */

.tc-root {
  position: fixed;
  bottom: 22px;
  inset-inline-start: 22px;
  z-index: 90;
  font-family: "Modam", system-ui, sans-serif;
}

/* Floating bubble */
.tc-bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, var(--primary), var(--primary-lite));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px var(--primary-glow), 0 4px 12px var(--glass-shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}
.tc-bubble:hover { transform: translateY(-2px) scale(1.04); }
.tc-bubble:active { transform: scale(0.96); }
.tc-bubble svg { width: 27px; height: 27px; }

.tc-badge {
  position: absolute;
  top: -3px;
  inset-inline-end: -3px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--page-bg);
}
.tc-badge.is-on { display: flex; }

/* Panel.
   The panel carries dir="ltr": the *interface* is laid out left-to-right like
   Telegram's default (incoming bubbles left, outgoing right, send button on the
   right), while the Persian *text* inside it stays right-to-left — see the
   `unicode-bidi: plaintext` block below. The launcher bubble keeps the page's
   RTL anchoring, so the panel is pinned to the same (right) edge physically. */
.tc-panel {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 130px));
  background: var(--glass-strong);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px var(--glass-shadow-deep, var(--glass-shadow));
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.tc-panel.is-open { display: flex; }

.tc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text);
  flex: 0 0 auto;
}
.tc-head__title { font-weight: 800; font-size: 15px; flex: 1; }
.tc-iconbtn {
  width: 30px; height: 30px;
  border: none; background: transparent;
  color: var(--text-muted); cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.tc-iconbtn:hover { background: var(--primary-soft); color: var(--primary); }
.tc-iconbtn svg { width: 18px; height: 18px; }
.tc-back { display: none; }
.tc-panel[data-view="thread"] .tc-back { display: flex; }

.tc-body { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; }

/* Conversation list */
.tc-convo {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(var(--surface-rgb), 0.35);
  color: var(--text);
}
.tc-convo:hover { background: var(--primary-soft); }
.tc-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-lite), var(--violet));
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.tc-convo__main { flex: 1; min-width: 0; }
.tc-convo__name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.tc-convo__last { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-convo__unread {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tc-root-tag {
  font-size: 10px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border-radius: 6px; padding: 1px 5px;
}

.tc-empty { padding: 32px 20px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* Saved Messages (Telegram-style self-chat) */
.tc-avatar--saved { background: linear-gradient(135deg, var(--primary), var(--primary-lite)); }
.tc-avatar--saved svg { width: 20px; height: 20px; color: #fff; }
.tc-convo--saved { border-bottom: 1px solid var(--glass-border); }

/* Thread */
.tc-thread { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.tc-msg { position: relative; max-width: 78%; padding: 8px 12px; border-radius: var(--radius-md); font-size: 13.5px; line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.tc-msg--in { align-self: flex-start; background: var(--glass); color: var(--text); border-bottom-inline-start-radius: 4px; }
.tc-msg--out { align-self: flex-end; background: linear-gradient(135deg, var(--primary), var(--primary-lite)); color: #fff; border-bottom-inline-end-radius: 4px; }
.tc-msg__time { display: block; font-size: 10px; opacity: 0.7; margin-top: 3px; }
.tc-url { color: var(--primary); text-decoration: underline; word-break: break-all; }
.tc-msg--out .tc-url { color: #fff; text-decoration: underline; }

/* Per-message hover action strip (copy / save / delete) */
.tc-msg__acts {
  position: absolute; top: 50%; transform: translateY(-50%);
  inset-inline-start: calc(100% + 4px);
  display: flex; gap: 3px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition-fast);
}
.tc-msg--out .tc-msg__acts { inset-inline-start: auto; inset-inline-end: calc(100% + 4px); }
.tc-msg:hover .tc-msg__acts { opacity: 1; pointer-events: auto; }
.tc-msg__act {
  width: 26px; height: 26px; padding: 0;
  border: 1px solid var(--glass-border); border-radius: 50%;
  background: var(--glass-strong); color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.tc-msg__act:hover { color: var(--primary); }
.tc-msg__act--danger:hover { color: var(--danger, #e3342f); border-color: var(--danger, #e3342f); }
.tc-msg__act svg { width: 13px; height: 13px; }

/* Delivered / read ticks on outgoing DM messages */
.tc-msg__time { display: flex; align-items: center; gap: 4px; }
.tc-msg--out .tc-msg__time { justify-content: flex-end; }
.tc-tick { display: inline-flex; opacity: 0.85; }
.tc-tick svg { width: 14px; height: 12px; }
.tc-tick.is-read { color: #7fd1ff; opacity: 1; }

/* Day separators */
.tc-daysep { text-align: center; margin: 6px 0 2px; }
.tc-daysep span {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: var(--text-faint); background: var(--glass);
  border-radius: 10px; padding: 3px 12px;
}

/* Attachments */
.tc-att-img { display: block; max-width: 100%; max-height: 220px; border-radius: var(--radius-sm); margin-bottom: 2px; }
.tc-att-imglink { display: block; }
.tc-att-file {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 6px 4px 6px 6px; color: inherit; min-width: 170px;
}
.tc-att-file__ic svg, .tc-att-file__dl svg { width: 18px; height: 18px; }
.tc-att-file__ic { opacity: 0.85; flex: 0 0 auto; }
.tc-att-file__dl { opacity: 0.7; flex: 0 0 auto; }
.tc-att-file__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tc-att-file__name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-att-file__size { font-size: 10.5px; opacity: 0.7; }
.tc-msg__text { margin-bottom: 1px; }

/* Header title + presence subtitle */
.tc-head__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tc-head__sub { font-size: 11px; font-weight: 500; color: var(--text-faint); align-items: center; gap: 4px; }
.tc-head__sub.is-typing { color: var(--primary); font-weight: 700; }

/* Animated "…" that trails the typing notice */
.tc-dots { display: inline-flex; gap: 3px; align-items: flex-end; padding-bottom: 2px; }
.tc-dots i {
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: 0.35;
  animation: tc-dot 1.05s infinite ease-in-out;
}
.tc-dots i:nth-child(2) { animation-delay: 0.18s; }
.tc-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes tc-dot {
  0%, 60%, 100% { opacity: 0.3; transform: none; }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Header bell (notifications) */
.tc-h-bell.is-off { color: var(--text-faint); opacity: 0.7; }

/* Search bar */
.tc-search { padding: 8px 12px; border-bottom: 1px solid var(--glass-border); flex: 0 0 auto; }
.tc-search[hidden] { display: none; }
.tc-search__in {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  background: var(--glass); color: var(--text);
  padding: 8px 12px; font-family: inherit; font-size: 13px;
}
.tc-search__in:focus { outline: none; border-color: var(--primary); }

/* Composer attach button */
.tc-attach {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  color: var(--text-muted); cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.tc-attach:hover { color: var(--primary); background: var(--primary-soft); }
.tc-attach svg { width: 20px; height: 20px; }

/* Composer */
.tc-composer {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--glass-border);
  flex: 0 0 auto;
}
.tc-composer[hidden] { display: none; }
.tc-input {
  flex: 1; resize: none; max-height: 96px;
  border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  background: var(--glass); color: var(--text);
  padding: 9px 12px; font-family: inherit; font-size: 13.5px; line-height: 1.5;
}
.tc-input:focus { outline: none; border-color: var(--primary); }
.tc-send {
  width: 42px; height: 42px; border: none; border-radius: 50%;
  background: var(--primary); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  transition: transform var(--transition-fast);
}
.tc-send:hover { transform: scale(1.06); }
.tc-send:disabled { opacity: 0.5; cursor: default; transform: none; }
.tc-send svg { width: 18px; height: 18px; }

/* ---- Text direction ------------------------------------------------------
   Every string the users write (and every Persian label) resolves its own
   direction from its first strong character, exactly like Telegram: Persian
   runs right-to-left, a bare URL or English word runs left-to-right, inside an
   interface that itself stays left-to-right. */
.tc-msg__text,
.tc-convo__name,
.tc-convo__last,
.tc-head__title,
.tc-head__sub,
.tc-sender,
.tc-section,
.tc-hint,
.tc-empty,
.tc-daysep span,
.tc-group-name,
.tc-member,
.tc-check__name,
.tc-att-file__name,
.tc-sheet__title,
.tc-sheet__item span,
.tc-input,
.tc-field,
.tc-search__in {
  unicode-bidi: plaintext;
  text-align: start;
}
.tc-daysep span, .tc-sheet__cancel { text-align: center; }

/* Group avatars */
.tc-avatar--group { background: linear-gradient(135deg, var(--violet), var(--accent-lite)); }
.tc-avatar--group svg { width: 20px; height: 20px; color: #fff; }
.tc-avatar--sm { width: 30px; height: 30px; font-size: 12px; }
.tc-avatar--sm svg { width: 15px; height: 15px; }
.tc-avatar--xs { width: 20px; height: 20px; font-size: 10px; flex: 0 0 auto; }
.tc-avatar--xl { width: 88px; height: 88px; font-size: 34px; }

/* Photo avatars */
.tc-avatar--img { padding: 0; overflow: hidden; background: var(--glass); }
.tc-avatar--img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Profile picture editor */
.tc-avatar-edit {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 0 6px;
}
.tc-avatar-actions { display: flex; gap: 14px; }

/* Section labels / hints */
.tc-section {
  padding: 12px 16px 6px; font-size: 11px; font-weight: 700;
  color: var(--text-faint); letter-spacing: .02em;
}
.tc-hint { padding: 0 16px 4px; font-size: 12px; color: var(--text-faint); line-height: 1.7; }

/* New-chat: "create group" launcher row */
.tc-newgroup-btn {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; cursor: pointer; color: var(--primary); font-weight: 700;
  border-bottom: 1px solid rgba(var(--surface-rgb), 0.35);
}
.tc-newgroup-btn:hover { background: var(--primary-soft); }
.tc-newgroup-btn .tc-convo__name { color: var(--primary); }

/* Forms */
.tc-form { padding: 8px 16px 16px; }
.tc-field {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  background: var(--glass); color: var(--text);
  padding: 10px 12px; font-family: inherit; font-size: 14px; margin-bottom: 6px;
}
.tc-field:focus { outline: none; border-color: var(--primary); }

.tc-checklist { display: flex; flex-direction: column; gap: 2px; }
.tc-check {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; cursor: pointer; color: var(--text); font-size: 14px;
}
.tc-check input { width: 17px; height: 17px; accent-color: var(--primary); flex: 0 0 auto; }
.tc-check__name { flex: 1; }

/* Buttons / footer */
.tc-footer { padding: 12px 16px; border-top: 1px solid var(--glass-border); flex: 0 0 auto; }
.tc-btn {
  width: 100%; border: none; border-radius: var(--radius-md);
  background: var(--primary); color: #fff; font-family: inherit;
  font-size: 14px; font-weight: 700; padding: 11px; cursor: pointer;
  transition: filter var(--transition-fast);
}
.tc-btn:hover { filter: brightness(1.06); }
.tc-btn--danger { background: transparent; color: var(--danger, #e3342f); border: 1px solid var(--danger, #e3342f); }
.tc-link {
  border: none; background: transparent; color: var(--primary);
  font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0 4px;
}

/* Sender name label inside group threads */
.tc-sender {
  align-self: flex-start; font-size: 11px; font-weight: 700;
  color: var(--violet); margin: 4px 4px -3px; padding: 0 4px;
  display: flex; align-items: center; gap: 6px;
}

/* Group info */
.tc-group-name { font-size: 16px; font-weight: 800; color: var(--text); padding: 8px 0 4px; }
.tc-member {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; color: var(--text); font-size: 14px;
}
.tc-add { cursor: pointer; border-radius: var(--radius-sm); }
.tc-add:hover { background: var(--primary-soft); }
.tc-add > span:nth-child(2) { flex: 1; }
.tc-add svg { width: 16px; height: 16px; color: var(--primary); }

/* Transient inline error */
.tc-flash {
  position: absolute; bottom: 70px; left: 16px; right: 16px;
  background: var(--accent); color: #fff; border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 12.5px; text-align: center;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.tc-flash.is-on { opacity: 1; transform: translateY(0); }

/* Header avatar (thread view, phones only) */
.tc-head__av { display: none; flex: 0 0 auto; }

/* Jump-to-latest button — sits above the composer inside the thread */
.tc-scrolldown {
  position: absolute;
  inset-inline-end: 14px;
  bottom: 74px; /* clears the composer; the panel itself already shrinks for the keyboard */
  width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--glass-border); border-radius: 50%;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px var(--glass-shadow);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 3;
}
.tc-scrolldown.is-on { opacity: 1; pointer-events: auto; transform: none; }
.tc-scrolldown svg { width: 20px; height: 20px; }
.tc-scrolldown__n {
  position: absolute; top: -5px; inset-inline-end: -3px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}
.tc-scrolldown__n.is-on { display: flex; }

/* Floating "new chat" button (phones only) */
.tc-fab {
  position: absolute;
  inset-inline-end: 18px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; padding: 0;
  border: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-lite));
  color: #fff; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px var(--primary-glow), 0 3px 10px var(--glass-shadow);
  z-index: 3;
}
.tc-fab:active { transform: scale(0.94); }
.tc-fab svg { width: 24px; height: 24px; }

/* Long-press action sheet */
.tc-sheet-wrap {
  position: fixed; inset: 0; z-index: 130;
  display: flex; align-items: flex-end;
  font-family: "Modam", system-ui, sans-serif;
}
.tc-sheet-wrap[hidden] { display: none; }
.tc-sheet-bd {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0; transition: opacity 0.22s ease;
}
.tc-sheet-wrap.is-on .tc-sheet-bd { opacity: 1; }
.tc-sheet {
  position: relative; width: 100%;
  background: rgba(var(--surface-rgb), 0.97);
  -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
  border-top: 1px solid var(--glass-border);
  border-radius: 20px 20px 0 0;
  padding: 6px 10px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.2, 0.85, 0.25, 1);
  max-height: 70vh; overflow-y: auto;
}
.tc-sheet-wrap.is-on .tc-sheet { transform: none; }
.tc-sheet__grip {
  width: 38px; height: 4px; border-radius: 2px; margin: 6px auto 4px;
  background: var(--text-faint); opacity: 0.35;
}
.tc-sheet__title {
  padding: 6px 12px 10px; font-size: 12.5px; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-bottom: 1px solid var(--glass-border); margin-bottom: 4px;
}
.tc-sheet__item {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 14px 12px; border: none; background: transparent;
  color: var(--text); font-family: inherit; font-size: 15px; font-weight: 600;
  text-align: start; cursor: pointer; border-radius: var(--radius-md);
}
.tc-sheet__item:active { background: var(--primary-soft); }
.tc-sheet__item svg { width: 20px; height: 20px; flex: 0 0 auto; opacity: 0.9; }
.tc-sheet__item.is-danger { color: var(--danger, #e3342f); }
.tc-sheet__cancel { justify-content: center; color: var(--text-muted); margin-top: 4px; }

/* View push/pop transitions */
@keyframes tc-in-fwd { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes tc-in-back { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.tc-anim-fwd { animation: tc-in-fwd 0.22s ease-out; }
.tc-anim-back { animation: tc-in-back 0.22s ease-out; }

/* ---- Mobile: the panel takes over the whole screen ---- */
@media (max-width: 640px) {
  .tc-root { z-index: 120; }

  .tc-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    /* Shrink with the on-screen keyboard so the composer stays visible */
    height: calc(100dvh - var(--tc-kb, 0px));
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--page-bg, var(--glass-strong));
    transform-origin: bottom center;
  }
  .tc-panel.is-open { animation: tc-panel-up 0.24s cubic-bezier(0.2, 0.85, 0.25, 1); }
  @keyframes tc-panel-up { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

  /* Header: back arrow leads, then avatar, then the title block */
  .tc-head {
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top));
    gap: 8px;
    background: var(--glass-strong);
  }
  .tc-h-back { order: -2; }
  .tc-panel[data-view="thread"] .tc-head__av { display: flex; }
  .tc-head__av { order: -1; }
  .tc-head__title { font-size: 16px; }
  .tc-iconbtn { width: 40px; height: 40px; }
  .tc-iconbtn svg { width: 21px; height: 21px; }

  .tc-composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }
  .tc-footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

  /* The bubble would float on top of the full-screen panel — hide it while open */
  .tc-panel.is-open ~ .tc-bubble { display: none; }
  .tc-panel[data-view="list"] .tc-fab { display: flex; }

  /* iOS zooms the page when a focused field is under 16px */
  .tc-input, .tc-field, .tc-search__in { font-size: 16px; }
  .tc-input { border-radius: 22px; padding: 11px 16px; }
  .tc-send, .tc-attach { width: 46px; height: 46px; }

  /* Roomier, thumb-friendly conversation rows */
  .tc-convo, .tc-newgroup-btn { padding: 11px 14px; }
  .tc-convo:active { background: var(--primary-soft); }
  .tc-avatar { width: 48px; height: 48px; font-size: 17px; }
  .tc-avatar--sm { width: 36px; height: 36px; font-size: 13px; }
  .tc-avatar--xs { width: 22px; height: 22px; }
  .tc-convo__name { font-size: 15px; }
  .tc-convo__last { font-size: 13px; }

  /* Messages: wider bubbles, grouped runs, no hover strip */
  .tc-thread { padding: 10px 10px 16px; gap: 6px; }
  .tc-msg {
    max-width: 84%;
    font-size: 15px;
    padding: 8px 12px;
    -webkit-user-select: none; user-select: none;
    -webkit-touch-callout: none;
    transition: transform 0.12s ease;
  }
  .tc-msg.is-pressed { transform: scale(0.97); }
  .tc-msg--cont { margin-top: -3px; }
  .tc-msg--in.tc-msg--cont { border-start-start-radius: 8px; }
  .tc-msg--out.tc-msg--cont { border-start-end-radius: 8px; }
  .tc-msg__acts { display: none; }
  .tc-msg__time { font-size: 11px; }
  .tc-att-img { max-height: 300px; }

  /* Day chips float over the messages as you scroll, like a native client */
  .tc-daysep { position: sticky; top: 2px; z-index: 2; pointer-events: none; }
  .tc-daysep span {
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur));
    box-shadow: 0 2px 8px var(--glass-shadow);
  }

  .tc-sender { font-size: 12px; }
  .tc-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

  /* Page behind the panel must not scroll while chat is open */
  body.tc-locked { overflow: hidden; }
}

/* The sheet is a touch affordance — never show it on pointer devices */
@media (min-width: 641px) {
  .tc-sheet-wrap { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .tc-anim-fwd, .tc-anim-back, .tc-panel.is-open { animation: none; }
  .tc-sheet { transition: none; }
}
