
.tg-attachment {
  position: relative;
  max-width: 100%;
  border-radius: 12px;
  margin-top: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}


.tg-image-wrap {
  position: relative;
  cursor: pointer;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s;
}
.tg-image-wrap:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.tg-image-wrap:active {
  transform: scale(0.97);
}
.tg-attach-img {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}


.tg-video-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.tg-attach-video {
  width: 100%;
  max-height: 350px;
  display: block;
  border-radius: inherit;
  outline: none;
}


.tg-audio-player-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 18px;
  min-width: 260px;
  transition: all 0.3s ease;
}
.tg-voice-bubble {
  padding: 0 !important;
  border: none !important;
  transition: transform 0.2s;
}
.tg-voice-bubble:active {
  transform: scale(0.98);
}
.tg-voice-bubble .tg-audio-player-wrap {
  background: none !important;
  box-shadow: none !important;
}

.tg-audio-player-active {
  display: flex !important;
  align-items: center !important;
  padding: 6px 8px 12px 8px !important;
  gap: 8px !important;
}


.tg-audio-control {
  cursor: pointer;
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}
.tg-play-btn {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.play-icon-svg {
  margin-left: 2px;
}


.tg-audio-info-col {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  position: relative;
  gap: 4px;
}
.tg-audio-waveform-container {
  height: 28px;
  min-height: 28px;
  flex-shrink: 0;
  position: relative;
  width: 100%;
  min-width: 140px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.tg-audio-waveform-bar {
  flex: 1;
  min-width: 1.5px;
  max-width: 3px;
  border-radius: 2px;
  background-color: currentColor;
  transition: height 0.15s ease-out;
}


.tg-wave-bg-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1px;
  color: rgba(255, 255, 255, 0.45);
}
.tg-waveform-progress {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1px;
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
  transition: clip-path 0.1s linear;
  color: rgba(255, 255, 255, 0.95);
}


html[data-theme='light'] .tg-wave-bg-wrap,
html:not(.dark) .tg-wave-bg-wrap {
  color: rgba(0, 0, 0, 0.35);
}
html[data-theme='light'] .tg-waveform-progress,
html:not(.dark) .tg-waveform-progress {
  color: rgba(0, 0, 0, 0.85);
}


.tg-audio-meta {
  font-size: 12px;
  user-select: none;
  font-family: 'Vazir', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
}
.tg-audio-time {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.tg-speed-btn {
  background: rgba(128, 128, 128, 0.25);
  border: none;
  border-radius: 8px;
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 5px;
  cursor: pointer;
  line-height: 1.4;
}

.bubble.voice-bubble .tg-audio-player-wrap {
  width: 292px !important;
  max-width: min(292px, calc(100vw - 86px)) !important;
  min-width: 0 !important;
  min-height: 56px !important;
  padding: 7px 11px 7px 9px !important;
  gap: 9px !important;
  align-items: center !important;
  border-radius: 16px !important;
}
.bubble.voice-bubble .tg-audio-control {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  margin-top: 0 !important;
  background: var(--voice-control-bg, #ffffff) !important;
  color: var(--voice-control-icon, var(--accent)) !important;
  box-shadow: none !important;
}
.bubble.voice-bubble .tg-play-btn {
  color: var(--voice-control-icon, var(--accent)) !important;
  position: relative !important;
  overflow: visible !important;
}
.bubble.voice-bubble .tg-play-btn svg {
  color: currentColor !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}
.bubble.voice-bubble .tg-play-btn .play-icon-svg {
  width: 24px !important;
  height: 24px !important;
  margin-left: 2px !important;
}
.bubble.voice-bubble .tg-play-btn .audio-dl-icon,
.bubble.voice-bubble .tg-play-btn .audio-cancel-icon {
  color: var(--voice-control-icon, var(--accent)) !important;
}
.bubble.voice-bubble .tg-play-btn .audio-dl-icon {
  fill: none !important;
  stroke: currentColor !important;
}
.bubble.voice-bubble .tg-play-btn .audio-cancel-icon svg {
  fill: none !important;
  stroke: currentColor !important;
}
.bubble.voice-bubble .tg-play-btn .audio-progress-ring {
  z-index: 1 !important;
}
.bubble.voice-bubble .tg-play-btn .audio-dl-icon {
  z-index: 3 !important;
}
.bubble.voice-bubble .tg-play-btn .audio-cancel-icon {
  z-index: 4 !important;
}
.bubble.voice-bubble .tg-audio-info-col {
  min-width: 0 !important;
  height: 42px !important;
  gap: 3px !important;
  justify-content: center !important;
  padding-top: 0 !important;
}
.bubble.voice-bubble .tg-audio-waveform-container {
  height: 23px !important;
  min-height: 23px !important;
  min-width: 0 !important;
  margin: 0 !important;
}
.bubble.voice-bubble .tg-audio-meta {
  height: 15px !important;
  line-height: 15px !important;
  margin-top: 0 !important;
  opacity: 0.9 !important;
  color: inherit !important;
  gap: 8px !important;
}
.bubble.voice-bubble .tg-audio-meta .tg-audio-time {
  color: inherit !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.bubble.voice-bubble .tg-speed-btn {
  height: 18px !important;
  min-width: 26px !important;
  border-radius: 9px !important;
  padding: 0 6px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: inherit !important;
  font-size: 11px !important;
  line-height: 18px !important;
  font-weight: 700 !important;
}
.bubble:not(.me).voice-bubble .tg-speed-btn {
  background: color-mix(in srgb, var(--fg) 14%, transparent) !important;
}

.bubble.audio-file-bubble {
  --audio-control-bg: #ffffff;
  --audio-control-icon: var(--out2, var(--accent));
  --audio-primary: #ffffff;
  --audio-secondary: rgba(255, 255, 255, 0.78);
  --audio-track: rgba(255, 255, 255, 0.34);
  --audio-progress: #ffffff;
  padding: 0 !important;
  border-radius: 20px !important;
  overflow: visible !important;
}
.bubble:not(.me).audio-file-bubble {
  --audio-control-bg: var(--accent);
  --audio-control-icon: #ffffff;
  --audio-primary: var(--fg);
  --audio-secondary: color-mix(in srgb, var(--fg) 68%, transparent);
  --audio-track: color-mix(in srgb, var(--fg) 20%, transparent);
  --audio-progress: var(--accent);
  background: var(--bg, #ffffff) !important;
  color: var(--fg) !important;
  border: 1px solid var(--border, rgba(0,0,0,0.1)) !important;
}
.dark .bubble:not(.me).audio-file-bubble,
[data-theme="dark"] .bubble:not(.me).audio-file-bubble {
  --audio-track: rgba(255, 255, 255, 0.24);
  --audio-secondary: rgba(255, 255, 255, 0.68);
  background: var(--bg, #1e293b) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
}
.bubble.audio-file-bubble .body {
  padding: 0 !important;
  border-radius: inherit !important;
  overflow: visible !important;
}
.bubble.audio-file-bubble .meta-spacer {
  display: none !important;
}
.bubble.audio-file-bubble .msg-text {
  display: block !important;
  padding: 0 13px 12px !important;
  color: inherit !important;
}
.bubble.audio-file-bubble .msg-text:empty {
  display: none !important;
}
.bubble.audio-file-bubble .meta {
  position: absolute !important;
  right: 10px !important;
  bottom: 7px !important;
  margin: 0 !important;
  z-index: 3 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  pointer-events: none !important;
}
.bubble:not(.me).audio-file-bubble .meta {
  color: var(--muted) !important;
}
.bubble.audio-file-bubble .tg-file-audio-player {
  width: 320px !important;
  max-width: min(320px, calc(100vw - 84px)) !important;
  min-width: 0 !important;
  min-height: 72px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 9px 13px 21px 10px !important;
  border-radius: 20px !important;
  color: var(--audio-primary) !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
  direction: ltr !important;
}
.bubble.audio-file-bubble .tg-file-audio-player .tg-audio-control {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 999px !important;
  background: var(--audio-control-bg) !important;
  color: var(--audio-control-icon) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 44px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
  position: relative !important;
  top: -3px !important;
  left: -2px !important;
}
.bubble:not(.me).audio-file-bubble .tg-file-audio-player .tg-audio-control {
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 28%, transparent) !important;
}
.bubble.audio-file-bubble .tg-file-audio-player .tg-play-btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: inherit !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: visible !important;
}
.bubble.audio-file-bubble .tg-file-audio-player .tg-play-btn svg {
  color: currentColor !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}
.bubble.audio-file-bubble .tg-file-audio-player .tg-play-btn .play-icon-svg {
  width: 24px !important;
  height: 24px !important;
  margin-left: 2px !important;
}
.bubble.audio-file-bubble .tg-file-audio-player .tg-play-btn .audio-dl-icon,
.bubble.audio-file-bubble .tg-file-audio-player .tg-play-btn .audio-cancel-icon svg {
  fill: none !important;
  stroke: currentColor !important;
}
.bubble.audio-file-bubble .tg-file-audio-player .tg-audio-info-col {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  height: 44px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.bubble.audio-file-bubble .tg-file-audio-title {
  width: 100% !important;
  color: var(--audio-primary) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
}
.bubble.audio-file-bubble .tg-file-audio-artist {
  width: 100% !important;
  color: var(--audio-secondary) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
  opacity: 1 !important;
}
.bubble.audio-file-bubble .tg-file-audio-slider-wrap {
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  color: var(--audio-primary) !important;
}
.bubble.audio-file-bubble .tg-file-audio-cur,
.bubble.audio-file-bubble .tg-file-audio-dur {
  min-width: 27px !important;
  color: var(--audio-primary) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 14px !important;
  font-variant-numeric: tabular-nums !important;
}
.bubble.audio-file-bubble .tg-file-audio-track {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 14px !important;
  position: relative !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
}
.bubble.audio-file-bubble .tg-file-audio-track-bg {
  width: 100% !important;
  height: 3px !important;
  border-radius: 999px !important;
  position: absolute !important;
  background: var(--audio-track) !important;
}
.bubble.audio-file-bubble .tg-file-audio-progress {
  position: absolute !important;
  left: 0 !important;
  height: 3px !important;
  width: 0%;
  border-radius: 999px !important;
  pointer-events: none !important;
  z-index: 1 !important;
  background: var(--audio-progress) !important;
}
.bubble.audio-file-bubble .tg-file-audio-progress-knob {
  position: absolute !important;
  right: -5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: var(--audio-progress) !important;
  box-shadow: none !important;
}
@media (max-width: 640px) {
  .bubble.audio-file-bubble {
    max-width: none !important;
    overflow: visible !important;
  }
  .bubble.me.audio-file-bubble .tg-file-audio-player {
    max-width: calc(100vw - 64px) !important;
  }
  .bubble:not(.me).audio-file-bubble .tg-file-audio-player {
    max-width: calc(100vw - 84px) !important;
  }
  .bubble.audio-file-bubble .tg-file-audio-player {
    width: 320px !important;
    box-sizing: border-box !important;
  }
  .bubble.audio-file-bubble .tg-file-audio-player .tg-audio-control {
    top: -4px !important;
    left: -3px !important;
  }
}
.tg-file-wrap .tg-file-icon-wrap {
  overflow: hidden !important;
  background: color-mix(in srgb, var(--accent) 13%, var(--glass2)) !important;
  color: var(--accent) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent) !important;
}
.tg-file-wrap .tg-file-download-icon,
.tg-file-wrap .tg-file-cancel,
.tg-file-wrap .tg-file-progress {
  transition: opacity 0.16s ease, transform 0.16s ease !important;
}
.tg-file-wrap[data-download-state="idle"] .tg-file-download-icon {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}
.tg-file-wrap[data-download-state="idle"] .tg-file-progress,
.tg-file-wrap[data-download-state="idle"] .tg-file-cancel {
  display: none !important;
  opacity: 0 !important;
}
.tg-file-wrap[data-download-state="downloading"] .tg-file-download-icon {
  display: none !important;
  opacity: 0 !important;
}
.tg-file-wrap[data-download-state="downloading"] .tg-file-progress {
  display: block !important;
  opacity: 1 !important;
}
.tg-file-wrap[data-download-state="downloading"] .tg-file-cancel {
  display: flex !important;
  opacity: 1 !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: color-mix(in srgb, var(--accent) 18%, transparent) !important;
  color: currentColor !important;
}
.tg-file-wrap .tg-file-progress circle {
  stroke-width: 2.6 !important;
  stroke-linecap: round !important;
}
.bubble.voice-bubble,
.bubble.audio-file-bubble {
  overflow: visible !important;
}
.bubble.voice-bubble:has(.reaction-row),
.bubble.audio-file-bubble:has(.reaction-row) {
  margin-bottom: 12px !important;
}
.bubble.voice-bubble .body,
.bubble.audio-file-bubble .body {
  position: relative !important;
  overflow: visible !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}
.bubble.voice-bubble .msg-text,
.bubble.audio-file-bubble .msg-text {
  display: block !important;
  clear: both !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-break: auto !important;
  text-align: start !important;
  unicode-bidi: plaintext !important;
  hyphens: none !important;
}
.bubble.voice-bubble .msg-text {
  margin: 5px 12px 8px !important;
  padding: 0 0 12px !important;
}
.bubble.audio-file-bubble .msg-text {
  margin: 0 13px 8px !important;
  padding: 0 0 12px !important;
}
.bubble.voice-bubble .msg-text:empty,
.bubble.audio-file-bubble .msg-text:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  width: fit-content !important;
  max-width: calc(100% - 18px) !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  bottom: -10px !important;
  z-index: 9 !important;
  direction: ltr !important;
  clear: none !important;
}
.bubble.me.voice-bubble .reaction-row,
.bubble.me.audio-file-bubble .reaction-row {
  right: 9px !important;
  left: auto !important;
  justify-content: flex-end !important;
}
.bubble:not(.me).voice-bubble .reaction-row,
.bubble:not(.me).audio-file-bubble .reaction-row {
  left: 9px !important;
  right: auto !important;
  justify-content: flex-start !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  min-height: 22px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--bg) 86%, rgba(255,255,255,0.72)) !important;
  color: var(--fg) !important;
  border: 1px solid color-mix(in srgb, var(--line) 68%, transparent) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.14) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
}
.bubble.me.voice-bubble .reaction-chip,
.bubble.me.audio-file-bubble .reaction-chip {
  background: color-mix(in srgb, var(--out2, var(--accent)) 28%, rgba(255,255,255,0.88)) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.34) !important;
}
.bubble.voice-bubble .reaction-chip .emoji,
.bubble.audio-file-bubble .reaction-chip .emoji {
  font-size: 14px !important;
}
.bubble.voice-bubble .reaction-chip .count,
.bubble.audio-file-bubble .reaction-chip .count {
  font-size: 11px !important;
}
.bubble.voice-bubble .body:has(.reply-thread-header),
.bubble.audio-file-bubble .body:has(.reply-thread-header) {
  padding-top: 8px !important;
}
.bubble.voice-bubble .reply-thread-header,
.bubble.audio-file-bubble .reply-thread-header {
  margin: 0 8px 6px !important;
  border-radius: 14px !important;
  padding: 7px 10px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.bubble.voice-bubble .reply-thread-header + .tg-audio-player-wrap,
.bubble.audio-file-bubble .reply-thread-header + .tg-audio-player-wrap {
  border-top-left-radius: 13px !important;
  border-top-right-radius: 13px !important;
}
.bubble.voice-bubble .body:has(.reply-thread-header) .tg-audio-player-wrap,
.bubble.audio-file-bubble .body:has(.reply-thread-header) .tg-file-audio-player {
  margin-top: 0 !important;
}
.scroll-to-bottom-btn {
  background: rgba(255, 255, 255, 0.88) !important;
  color: var(--accent) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,0.7)) !important;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.18), 0 2px 8px rgba(17, 24, 39, 0.10) !important;
}
.scroll-to-bottom-btn svg {
  color: currentColor !important;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.65)) !important;
}
[data-theme="dark"] .scroll-to-bottom-btn,
.dark .scroll-to-bottom-btn {
  background: rgba(30, 30, 30, 0.7) !important;
  color: var(--color-text-secondary, #d1d5db) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28) !important;
}
.tg-floating-player {
  position: fixed;
  left: var(--tg-floating-left, 0);
  top: var(--tg-floating-top, 56px);
  width: var(--tg-floating-width, 100vw);
  min-height: 52px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 7px;
  border-radius: 0 0 18px 18px;
  background: color-mix(in srgb, var(--bg) 90%, rgba(255,255,255,0.78));
  color: var(--fg);
  border: none;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, rgba(255,255,255,0.36));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16), 0 1px 0 rgba(255,255,255,0.24) inset;
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
  z-index: 1198;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  box-sizing: border-box;
  overflow: hidden;
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.tg-floating-player.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
.tg-floating-player.is-paused {
  opacity: 0.98;
}
.tg-floating-play,
.tg-floating-close {
  border: none;
  border-radius: 999px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tg-floating-play {
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 32%, transparent);
}
.tg-floating-close {
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
}
.tg-floating-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tg-floating-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.tg-floating-title,
.tg-floating-subtitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tg-floating-title {
  font-size: 14px;
  line-height: 17px;
  font-weight: 800;
}
.tg-floating-state {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
  line-height: 14px;
  font-weight: 800;
}
.tg-floating-subtitle {
  font-size: 12px;
  line-height: 14px;
  color: var(--muted);
  font-weight: 600;
}
.tg-floating-subtitle.hidden {
  display: none;
}
.tg-floating-time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.tg-floating-progress {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 14%, transparent);
  overflow: hidden;
  cursor: pointer;
}
.tg-floating-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
[data-theme="dark"] .tg-floating-player,
.dark .tg-floating-player {
  background: rgba(24, 31, 42, 0.9);
  border-bottom-color: rgba(255,255,255,0.10);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28), 0 1px 0 rgba(255,255,255,0.06) inset;
}
@media (min-width: 721px) {
  .tg-floating-player {
    min-height: 50px;
    padding-left: 16px;
    padding-right: 16px;
  }
}
.bubble.voice-bubble,
.bubble.audio-file-bubble {
  overflow: visible !important;
}
.bubble.voice-bubble .body,
.bubble.audio-file-bubble .body {
  overflow: visible !important;
  position: relative !important;
}
.bubble.voice-bubble.has-reactions,
.bubble.audio-file-bubble.has-reactions {
  margin-bottom: 18px !important;
}
.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row {
  position: absolute !important;
  inset-inline-end: 10px !important;
  bottom: -13px !important;
  margin: 0 !important;
  clear: none !important;
  z-index: 30 !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  direction: ltr !important;
  pointer-events: auto !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  min-height: 23px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  backdrop-filter: blur(18px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
  box-shadow: 0 2px 7px rgba(0,0,0,0.14) !important;
}
.bubble.voice-bubble .msg-text,
.bubble.audio-file-bubble .msg-text {
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: pre-wrap !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  line-break: auto !important;
  hyphens: none !important;
}
.bubble.voice-bubble .msg-text:not(:empty) {
  display: block !important;
  padding: 0 12px 13px !important;
  margin-top: 2px !important;
  color: inherit !important;
}
.bubble.audio-file-bubble .msg-text:not(:empty) {
  padding-bottom: 15px !important;
}
html[data-theme='light'] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html:not(.dark)[data-theme='light'] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html:not(.dark) .bubble:not(.me).voice-bubble .tg-wave-bg-wrap {
  color: rgba(15, 23, 42, 0.34) !important;
  opacity: 1 !important;
}
html[data-theme='light'] .bubble:not(.me).voice-bubble .tg-waveform-progress,
html:not(.dark)[data-theme='light'] .bubble:not(.me).voice-bubble .tg-waveform-progress,
html:not(.dark) .bubble:not(.me).voice-bubble .tg-waveform-progress {
  color: var(--accent, #2481cc) !important;
  opacity: 1 !important;
}
html[data-theme='light'] .bubble:not(.me).voice-bubble .tg-audio-waveform-bar,
html:not(.dark) .bubble:not(.me).voice-bubble .tg-audio-waveform-bar {
  opacity: 1 !important;
}
html[data-theme='light'] .bubble:not(.me).voice-bubble canvas.voice-waveform,
html:not(.dark) .bubble:not(.me).voice-bubble canvas.voice-waveform {
  opacity: 1 !important;
  filter: contrast(1.4) brightness(0.65) !important;
}
.bubble.voice-bubble .reply-thread-header + .tg-audio-player-wrap,
.bubble.audio-file-bubble .reply-thread-header + .tg-audio-player-active,
.bubble.audio-file-bubble .reply-thread-header + .tg-file-audio-player {
  border-top-left-radius: 14px !important;
  border-top-right-radius: 14px !important;
}

.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row {
  position: absolute !important;
  bottom: -11px !important;
  top: auto !important;
  width: auto !important;
  max-width: calc(100% - 18px) !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 40 !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 4px !important;
  pointer-events: auto !important;
}
html[dir="rtl"] .bubble.me.voice-bubble .reaction-row,
html[dir="rtl"] .bubble.me.audio-file-bubble .reaction-row {
  left: 9px !important;
  right: auto !important;
  justify-content: flex-start !important;
}
html[dir="rtl"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).audio-file-bubble .reaction-row {
  right: 9px !important;
  left: auto !important;
  justify-content: flex-end !important;
}
html[dir="ltr"] .bubble.me.voice-bubble .reaction-row,
html[dir="ltr"] .bubble.me.audio-file-bubble .reaction-row {
  right: 9px !important;
  left: auto !important;
  justify-content: flex-end !important;
}
html[dir="ltr"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).audio-file-bubble .reaction-row {
  left: 9px !important;
  right: auto !important;
  justify-content: flex-start !important;
}
.bubble.voice-bubble.has-reactions,
.bubble.audio-file-bubble.has-reactions {
  margin-bottom: 20px !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  height: 24px !important;
  min-height: 24px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--bg) 82%, rgba(255,255,255,0.84)) !important;
  color: var(--fg) !important;
  border: 1px solid color-mix(in srgb, var(--line) 72%, rgba(255,255,255,0.52)) !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.16) !important;
}
.bubble.me.voice-bubble .reaction-chip,
.bubble.me.audio-file-bubble .reaction-chip {
  background: color-mix(in srgb, var(--out2, var(--accent)) 26%, rgba(255,255,255,0.9)) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.36) !important;
}
.bubble.audio-file-bubble .tg-file-audio-player {
  width: 292px !important;
  max-width: min(292px, calc(100vw - 86px)) !important;
}
@media (max-width: 420px) {
  .bubble.audio-file-bubble .tg-file-audio-player,
  .bubble.voice-bubble .tg-audio-player-wrap {
    width: min(292px, calc(100vw - 86px)) !important;
  }
}
html:not(.dark) .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html[data-theme="light"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
body:not([data-theme="dark"]) .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
body[data-theme="light"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap {
  color: rgba(15, 23, 42, 0.46) !important;
  opacity: 1 !important;
}
html:not(.dark) .bubble:not(.me).voice-bubble .tg-waveform-progress,
html[data-theme="light"] .bubble:not(.me).voice-bubble .tg-waveform-progress,
body:not([data-theme="dark"]) .bubble:not(.me).voice-bubble .tg-waveform-progress,
body[data-theme="light"] .bubble:not(.me).voice-bubble .tg-waveform-progress {
  color: var(--accent, #2481cc) !important;
  opacity: 1 !important;
}
html:not(.dark) .bubble:not(.me).voice-bubble .tg-audio-waveform-bar,
html[data-theme="light"] .bubble:not(.me).voice-bubble .tg-audio-waveform-bar,
body:not([data-theme="dark"]) .bubble:not(.me).voice-bubble .tg-audio-waveform-bar,
body[data-theme="light"] .bubble:not(.me).voice-bubble .tg-audio-waveform-bar {
  opacity: 1 !important;
}

.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row {
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
}


.bubble.voice-bubble,
.bubble.audio-file-bubble {
  position: relative !important;
  overflow: visible !important;
}
.bubble.voice-bubble .body,
.bubble.audio-file-bubble .body {
  position: relative !important;
  overflow: visible !important;
}
.bubble.voice-bubble.has-reactions,
.bubble.audio-file-bubble.has-reactions {
  margin-bottom: 14px !important;
}
.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row {
  position: absolute !important;
  top: auto !important;
  bottom: -7px !important;
  width: auto !important;
  max-width: calc(100% - 20px) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 4px !important;
  z-index: 80 !important;
  direction: ltr !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}
html[dir="rtl"] .bubble.me.voice-bubble .reaction-row,
html[dir="rtl"] .bubble.me.audio-file-bubble .reaction-row {
  left: 10px !important;
  right: auto !important;
  justify-content: flex-start !important;
}
html[dir="rtl"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).audio-file-bubble .reaction-row {
  right: 10px !important;
  left: auto !important;
  justify-content: flex-end !important;
}
html[dir="ltr"] .bubble.me.voice-bubble .reaction-row,
html[dir="ltr"] .bubble.me.audio-file-bubble .reaction-row {
  right: 10px !important;
  left: auto !important;
  justify-content: flex-end !important;
}
html[dir="ltr"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).audio-file-bubble .reaction-row {
  left: 10px !important;
  right: auto !important;
  justify-content: flex-start !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  height: 23px !important;
  min-height: 23px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: color-mix(in srgb, var(--bg) 88%, rgba(255,255,255,0.86)) !important;
  color: var(--fg) !important;
  border: 1px solid color-mix(in srgb, var(--line) 70%, rgba(255,255,255,0.5)) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.16) !important;
  backdrop-filter: blur(16px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(170%) !important;
}
.bubble.me.voice-bubble .reaction-chip,
.bubble.me.audio-file-bubble .reaction-chip {
  color: #ffffff !important;
  background: color-mix(in srgb, var(--out2, var(--accent)) 32%, rgba(255,255,255,0.72)) !important;
  border-color: rgba(255,255,255,0.34) !important;
}
.tg-floating-player {
  border-radius: 16px !important;
  min-height: 54px !important;
  grid-template-columns: 40px minmax(0, 1fr) auto 32px !important;
  padding: 7px 10px !important;
  box-shadow: 0 10px 26px rgba(15,23,42,0.18), 0 1px 0 rgba(255,255,255,0.32) inset !important;
  transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1), transform 0.26s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.tg-floating-player.is-chat {
  border-radius: 0 0 18px 18px !important;
}
.tg-floating-player.is-list {
  border-radius: 16px !important;
  transform: translateY(0) scale(1) !important;
}
.tg-floating-player.hidden.is-list,
.tg-floating-player.hidden {
  transform: translateY(-8px) scale(0.985) !important;
}
#app.tg-floating-player-out-chat #pane-chats .chatlist,
#app.tg-floating-player-out-chat #pane-contacts .contactlist {
  padding-top: 74px !important;
}
#app.tg-floating-player-out-chat #pane-settings,
#app.tg-floating-player-out-chat #pane-profile {
  scroll-padding-top: 74px !important;
}
.bubble.pending-message {
  opacity: 0.72 !important;
}

.tg-floating-space {
  flex: 0 0 auto !important;
  height: 0;
  min-height: 0;
  transition: height 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.tg-floating-space.hidden {
  height: 0 !important;
}
.tg-floating-space.is-chat {
  margin: 0 !important;
}
.tg-floating-space.is-list {
  margin: 0 !important;
}
.tg-floating-player {
  background: rgba(255,255,255,0.94) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,0.08) !important;
  box-shadow: 0 12px 30px rgba(15,23,42,0.16), inset 0 1px 0 rgba(255,255,255,0.72) !important;
  backdrop-filter: blur(26px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%) !important;
}
.tg-floating-player.is-chat {
  border-radius: 0 0 18px 18px !important;
  border-top: 0 !important;
}
.tg-floating-player.is-list {
  border-radius: 18px !important;
}
.tg-floating-title {
  color: #0f172a !important;
}
.tg-floating-subtitle,
.tg-floating-time,
.tg-floating-close {
  color: #64748b !important;
}
.tg-floating-state,
.tg-floating-progress-bar {
  color: var(--accent, #2481cc) !important;
  background: var(--accent, #2481cc) !important;
}
.tg-floating-progress {
  background: rgba(15,23,42,0.12) !important;
}
[data-theme="dark"] .tg-floating-player,
.dark .tg-floating-player {
  background: rgba(24, 31, 42, 0.92) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .tg-floating-title,
.dark .tg-floating-title {
  color: #f8fafc !important;
}
[data-theme="dark"] .tg-floating-subtitle,
.dark .tg-floating-subtitle,
[data-theme="dark"] .tg-floating-time,
.dark .tg-floating-time,
[data-theme="dark"] .tg-floating-close,
.dark .tg-floating-close {
  color: #94a3b8 !important;
}
[data-theme="dark"] .tg-floating-progress,
.dark .tg-floating-progress {
  background: rgba(255,255,255,0.14) !important;
}
#messages,
#scrollArea {
  box-sizing: border-box !important;
}
body.keyboard-open #messages,
body.keyboard-open #scrollArea {
  overflow-anchor: none !important;
}
#app.tg-floating-player-out-chat #pane-chats .chatlist,
#app.tg-floating-player-out-chat #pane-contacts .contactlist {
  padding-top: 0 !important;
}
#app.tg-floating-player-out-chat #pane-settings,
#app.tg-floating-player-out-chat #pane-profile {
  scroll-padding-top: 0 !important;
}

.tg-floating-state {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}
#tgFloatingSpace.hidden,
.tg-floating-space.hidden {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
#app.tg-floating-player-out-chat #pane-chats .chatlist,
#app.tg-floating-player-out-chat #pane-contacts .contactlist {
  padding-top: 0 !important;
}
#app.tg-floating-player-out-chat #pane-settings,
#app.tg-floating-player-out-chat #pane-profile {
  scroll-padding-top: 0 !important;
}

.bubble.voice-bubble,
.bubble.audio-file-bubble {
  overflow: visible !important;
}
.bubble.voice-bubble .body,
.bubble.audio-file-bubble .body {
  overflow: visible !important;
  min-width: 0 !important;
}
.bubble.voice-bubble.has-reactions,
.bubble.audio-file-bubble.has-reactions,
.bubble.voice-bubble:has(.reaction-row),
.bubble.audio-file-bubble:has(.reaction-row) {
  margin-bottom: 4px !important;
}
.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  inset: auto !important;
  z-index: 8 !important;
  clear: both !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 5px !important;
  width: fit-content !important;
  max-width: calc(100% - 20px) !important;
  margin-top: 3px !important;
  margin-bottom: 5px !important;
  padding: 0 !important;
  transform: none !important;
  direction: ltr !important;
}
.bubble.me.voice-bubble .reaction-row,
.bubble.me.audio-file-bubble .reaction-row {
  margin-inline-start: auto !important;
  margin-inline-end: 10px !important;
  justify-content: flex-end !important;
}
.bubble:not(.me).voice-bubble .reaction-row,
.bubble:not(.me).audio-file-bubble .reaction-row {
  margin-inline-start: 10px !important;
  margin-inline-end: auto !important;
  justify-content: flex-start !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  height: 24px !important;
  min-height: 24px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  color: var(--fg) !important;
  background: color-mix(in srgb, var(--bg) 92%, rgba(255,255,255,0.9)) !important;
  border: 1px solid color-mix(in srgb, var(--line) 78%, rgba(255,255,255,0.35)) !important;
  box-shadow: 0 2px 7px rgba(15,23,42,0.13) !important;
  backdrop-filter: blur(18px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(170%) !important;
}
.bubble.me.voice-bubble .reaction-chip,
.bubble.me.audio-file-bubble .reaction-chip {
  color: #fff !important;
  background: rgba(255,255,255,0.16) !important;
  border-color: rgba(255,255,255,0.34) !important;
  box-shadow: 0 2px 7px rgba(0,0,0,0.14) !important;
}
.bubble.voice-bubble .msg-text,
.bubble.audio-file-bubble .msg-text {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  line-break: auto !important;
  hyphens: none !important;
  unicode-bidi: plaintext !important;
}
.bubble.voice-bubble .msg-text:not(:empty) {
  margin: 4px 12px 5px !important;
  padding: 0 0 2px !important;
}
.bubble.audio-file-bubble .msg-text:not(:empty) {
  margin: 2px 13px 5px !important;
  padding: 0 0 2px !important;
}
#messages,
#scrollArea {
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
}
body.keyboard-open #messages,
body.keyboard-open #scrollArea {
  scroll-behavior: auto !important;
}
#app:not(.tg-floating-player-active) #tgFloatingSpace,
#app:not(.tg-floating-player-active) .tg-floating-space {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bubble.voice-bubble,
.bubble.audio-file-bubble {
  position: relative !important;
  overflow: visible !important;
}
.bubble.voice-bubble.has-reactions,
.bubble.audio-file-bubble.has-reactions,
.bubble.voice-bubble:has(.reaction-row),
.bubble.audio-file-bubble:has(.reaction-row) {
  margin-bottom: 22px !important;
}
.bubble.voice-bubble .body,
.bubble.audio-file-bubble .body {
  position: relative !important;
  overflow: visible !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  isolation: isolate !important;
}
.bubble.voice-bubble.has-reactions .body,
.bubble.audio-file-bubble.has-reactions .body,
.bubble.voice-bubble .body:has(.reaction-row),
.bubble.audio-file-bubble .body:has(.reaction-row) {
  padding-bottom: 18px !important;
}
.bubble.audio-file-bubble .meta,
.bubble.voice-bubble .meta,
html[dir="rtl"] .bubble.audio-file-bubble .meta,
html[dir="rtl"] .bubble.voice-bubble .meta {
  position: absolute !important;
  right: 10px !important;
  left: auto !important;
  bottom: 7px !important;
  margin: 0 !important;
  z-index: 4 !important;
  pointer-events: none !important;
}
.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row {
  position: absolute !important;
  top: auto !important;
  bottom: -13px !important;
  inset: auto !important;
  width: fit-content !important;
  max-width: calc(100% - 24px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: none !important;
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 4px !important;
  z-index: 90 !important;
  direction: ltr !important;
  pointer-events: auto !important;
  transform: none !important;
}
html[dir="rtl"] .bubble.me.voice-bubble .reaction-row,
html[dir="rtl"] .bubble.me.audio-file-bubble .reaction-row {
  left: 12px !important;
  right: auto !important;
  justify-content: flex-start !important;
}
html[dir="rtl"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).audio-file-bubble .reaction-row {
  right: 12px !important;
  left: auto !important;
  justify-content: flex-end !important;
}
html[dir="ltr"] .bubble.me.voice-bubble .reaction-row,
html[dir="ltr"] .bubble.me.audio-file-bubble .reaction-row {
  right: 12px !important;
  left: auto !important;
  justify-content: flex-end !important;
}
html[dir="ltr"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).audio-file-bubble .reaction-row {
  left: 12px !important;
  right: auto !important;
  justify-content: flex-start !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  height: 24px !important;
  min-height: 24px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  color: var(--fg) !important;
  background: color-mix(in srgb, var(--bg) 90%, rgba(255,255,255,0.88)) !important;
  border: 1px solid color-mix(in srgb, var(--line) 76%, rgba(255,255,255,0.4)) !important;
  box-shadow: 0 2px 8px rgba(15,23,42,0.16) !important;
  backdrop-filter: blur(18px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(170%) !important;
}
.bubble.me.voice-bubble .reaction-chip,
.bubble.me.audio-file-bubble .reaction-chip {
  color: #ffffff !important;
  background: rgba(255,255,255,0.17) !important;
  border-color: rgba(255,255,255,0.36) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}
.bubble.voice-bubble .reaction-chip .emoji,
.bubble.audio-file-bubble .reaction-chip .emoji {
  font-size: 14px !important;
  line-height: 1 !important;
}
.bubble.voice-bubble .reaction-chip .count,
.bubble.audio-file-bubble .reaction-chip .count {
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}
.bubble.voice-bubble .msg-text,
.bubble.audio-file-bubble .msg-text {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  line-break: auto !important;
  hyphens: none !important;
  unicode-bidi: plaintext !important;
}
.bubble.voice-bubble .msg-text:not(:empty) {
  margin: 5px 12px 0 !important;
  padding: 0 0 16px !important;
}
.bubble.audio-file-bubble .msg-text:not(:empty) {
  margin: 6px 13px 0 !important;
  padding: 0 0 18px !important;
}
.bubble.voice-bubble .msg-text:empty,
.bubble.audio-file-bubble .msg-text:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
#messages,
#scrollArea {
  box-sizing: border-box !important;
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
  padding-bottom: var(--composer-reserved-space, 0px) !important;
  scroll-padding-bottom: var(--composer-reserved-space, 0px) !important;
}
body.keyboard-open #messages,
body.keyboard-open #scrollArea {
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
}


.bubble.voice-bubble,
.bubble.audio-file-bubble {
  overflow: visible !important;
}
.bubble.voice-bubble.has-reactions,
.bubble.audio-file-bubble.has-reactions,
.bubble.voice-bubble:has(.reaction-row),
.bubble.audio-file-bubble:has(.reaction-row) {
  margin-bottom: 18px !important;
}
.bubble.voice-bubble .body,
.bubble.audio-file-bubble .body {
  position: relative !important;
  overflow: visible !important;
  padding-bottom: 16px !important;
}
.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row,
html[dir="rtl"] .bubble.me.voice-bubble .reaction-row,
html[dir="rtl"] .bubble.me.audio-file-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).audio-file-bubble .reaction-row,
html[dir="ltr"] .bubble.me.voice-bubble .reaction-row,
html[dir="ltr"] .bubble.me.audio-file-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).audio-file-bubble .reaction-row {
  position: absolute !important;
  left: 14px !important;
  right: auto !important;
  top: auto !important;
  bottom: -11px !important;
  width: auto !important;
  max-width: calc(100% - 28px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: none !important;
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  direction: ltr !important;
  z-index: 120 !important;
  transform: none !important;
  pointer-events: auto !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  height: 23px !important;
  min-height: 23px !important;
  padding: 2px 8px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
#messages {
  box-sizing: border-box !important;
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
  padding-bottom: var(--composer-reserved-space, 84px) !important;
  scroll-padding-bottom: var(--composer-reserved-space, 84px) !important;
}
body.keyboard-open #messages {
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
}

/* final media and chat viewport repair */
#pane-chat #messages-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
}
#pane-chat #messages,
#messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding-bottom: calc(var(--composer-reserved-space, 104px) + env(safe-area-inset-bottom)) !important;
  scroll-padding-bottom: calc(var(--composer-reserved-space, 104px) + env(safe-area-inset-bottom)) !important;
}
#messages .bubble,
#messages .service-pill,
#messages .system-msg {
  content-visibility: visible !important;
  contain: layout style paint !important;
  contain-intrinsic-size: auto !important;
}
.bubble.voice-bubble,
.bubble.audio-file-bubble {
  position: relative !important;
  overflow: visible !important;
  margin-bottom: 4px !important;
}
.bubble.voice-bubble.has-reactions,
.bubble.audio-file-bubble.has-reactions,
.bubble.voice-bubble:has(.reaction-row),
.bubble.audio-file-bubble:has(.reaction-row) {
  margin-bottom: 6px !important;
}
.bubble.voice-bubble .body,
.bubble.audio-file-bubble .body {
  position: relative !important;
  overflow: hidden !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding-bottom: 32px !important;
}
.bubble.voice-bubble.has-reactions .body,
.bubble.audio-file-bubble.has-reactions .body,
.bubble.voice-bubble .body:has(.reaction-row),
.bubble.audio-file-bubble .body:has(.reaction-row) {
  padding-bottom: 38px !important;
}
.bubble.voice-bubble .msg-text,
.bubble.audio-file-bubble .msg-text {
  display: block !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  line-break: auto !important;
  hyphens: none !important;
  unicode-bidi: plaintext !important;
  padding-bottom: 10px !important;
}
.bubble.voice-bubble .msg-text:not(:empty) {
  margin: 6px 13px 0 !important;
}
.bubble.audio-file-bubble .msg-text:not(:empty) {
  margin: 7px 14px 0 !important;
}
.bubble.voice-bubble .msg-text:empty,
.bubble.audio-file-bubble .msg-text:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.bubble.voice-bubble .meta,
.bubble.audio-file-bubble .meta,
html[dir="rtl"] .bubble.voice-bubble .meta,
html[dir="rtl"] .bubble.audio-file-bubble .meta,
html[dir="ltr"] .bubble.voice-bubble .meta,
html[dir="ltr"] .bubble.audio-file-bubble .meta {
  position: absolute !important;
  right: 11px !important;
  left: auto !important;
  bottom: 9px !important;
  margin: 0 !important;
  z-index: 4 !important;
  pointer-events: none !important;
}
.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row,
html[dir="rtl"] .bubble.me.voice-bubble .reaction-row,
html[dir="rtl"] .bubble.me.audio-file-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).audio-file-bubble .reaction-row,
html[dir="ltr"] .bubble.me.voice-bubble .reaction-row,
html[dir="ltr"] .bubble.me.audio-file-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).audio-file-bubble .reaction-row {
  position: absolute !important;
  left: 13px !important;
  right: auto !important;
  top: auto !important;
  bottom: 7px !important;
  width: auto !important;
  max-width: calc(100% - 88px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: none !important;
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  direction: ltr !important;
  z-index: 5 !important;
  transform: none !important;
  pointer-events: auto !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  height: 23px !important;
  min-height: 23px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  color: var(--fg) !important;
  background: color-mix(in srgb, var(--bg) 86%, rgba(255,255,255,0.82)) !important;
  border: 1px solid color-mix(in srgb, var(--line) 72%, rgba(255,255,255,0.38)) !important;
  box-shadow: 0 2px 7px rgba(15,23,42,0.16) !important;
  backdrop-filter: blur(14px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(165%) !important;
}
.bubble.me.voice-bubble .reaction-chip,
.bubble.me.audio-file-bubble .reaction-chip {
  color: #ffffff !important;
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.38) !important;
  box-shadow: 0 2px 7px rgba(0,0,0,0.15) !important;
}
.bubble.voice-bubble .reaction-chip .emoji,
.bubble.audio-file-bubble .reaction-chip .emoji {
  font-size: 14px !important;
  line-height: 1 !important;
}
.bubble.voice-bubble .reaction-chip .count,
.bubble.audio-file-bubble .reaction-chip .count {
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}
.bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html[data-theme="light"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html:not(.dark) .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
body[data-theme="light"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
body:not([data-theme="dark"]) .bubble:not(.me).voice-bubble .tg-wave-bg-wrap {
  color: rgba(0, 87, 82, 0.44) !important;
}
.bubble:not(.me).voice-bubble .tg-waveform-progress,
html[data-theme="light"] .bubble:not(.me).voice-bubble .tg-waveform-progress,
html:not(.dark) .bubble:not(.me).voice-bubble .tg-waveform-progress,
body[data-theme="light"] .bubble:not(.me).voice-bubble .tg-waveform-progress,
body:not([data-theme="dark"]) .bubble:not(.me).voice-bubble .tg-waveform-progress {
  color: rgba(255,255,255,0.96) !important;
}
.dark .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html.dark .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html[data-theme="dark"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
body[data-theme="dark"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap {
  color: rgba(255,255,255,0.42) !important;
}
.dark .bubble:not(.me).voice-bubble .tg-waveform-progress,
html.dark .bubble:not(.me).voice-bubble .tg-waveform-progress,
html[data-theme="dark"] .bubble:not(.me).voice-bubble .tg-waveform-progress,
body[data-theme="dark"] .bubble:not(.me).voice-bubble .tg-waveform-progress {
  color: rgba(255,255,255,0.96) !important;
}
.bubble:not(.me).voice-bubble .tg-audio-waveform-bar {
  background-color: currentColor !important;
}


/* final Telegram-style scroll, composer, and media reaction repair */
#pane-chat #messages-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
#pane-chat #messages,
#messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  box-sizing: border-box !important;
  padding-bottom: calc(var(--composer-reserved-space, 112px) + env(safe-area-inset-bottom)) !important;
  scroll-padding-bottom: calc(var(--composer-reserved-space, 112px) + env(safe-area-inset-bottom)) !important;
}
#messages .bubble,
#messages .service-pill,
#messages .system-msg {
  content-visibility: auto !important;
  contain-intrinsic-size: 64px 220px !important;
  contain: layout style paint !important;
}
#messages .bubble.voice-bubble,
#messages .bubble.audio-file-bubble,
#messages .bubble.editing,
#messages .bubble.msg-highlight {
  content-visibility: visible !important;
}
.bubble.voice-bubble,
.bubble.audio-file-bubble {
  position: relative !important;
  overflow: visible !important;
  margin-bottom: 4px !important;
}
.bubble.voice-bubble.has-reactions,
.bubble.audio-file-bubble.has-reactions,
.bubble.voice-bubble:has(.reaction-row),
.bubble.audio-file-bubble:has(.reaction-row) {
  margin-bottom: 4px !important;
}
.bubble.voice-bubble .body,
.bubble.audio-file-bubble .body {
  position: relative !important;
  overflow: hidden !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding-bottom: 30px !important;
}
.bubble.voice-bubble.has-reactions .body,
.bubble.audio-file-bubble.has-reactions .body,
.bubble.voice-bubble .body:has(.reaction-row),
.bubble.audio-file-bubble .body:has(.reaction-row) {
  padding-bottom: 56px !important;
}
.bubble.voice-bubble .msg-text,
.bubble.audio-file-bubble .msg-text {
  display: block !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  line-break: auto !important;
  hyphens: none !important;
  unicode-bidi: plaintext !important;
  padding: 0 !important;
}
.bubble.voice-bubble .msg-text:not(:empty) {
  margin: 5px 13px 0 !important;
}
.bubble.audio-file-bubble .msg-text:not(:empty) {
  margin: 6px 14px 0 !important;
}
.bubble.voice-bubble .msg-text:empty,
.bubble.audio-file-bubble .msg-text:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row,
html[dir="rtl"] .bubble.me.voice-bubble .reaction-row,
html[dir="rtl"] .bubble.me.audio-file-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).audio-file-bubble .reaction-row,
html[dir="ltr"] .bubble.me.voice-bubble .reaction-row,
html[dir="ltr"] .bubble.me.audio-file-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).audio-file-bubble .reaction-row {
  position: absolute !important;
  left: 13px !important;
  right: auto !important;
  top: auto !important;
  bottom: 31px !important;
  width: auto !important;
  max-width: calc(100% - 32px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: none !important;
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  direction: ltr !important;
  z-index: 7 !important;
  transform: none !important;
  pointer-events: auto !important;
}
.bubble.voice-bubble .meta,
.bubble.audio-file-bubble .meta,
html[dir="rtl"] .bubble.voice-bubble .meta,
html[dir="rtl"] .bubble.audio-file-bubble .meta,
html[dir="ltr"] .bubble.voice-bubble .meta,
html[dir="ltr"] .bubble.audio-file-bubble .meta {
  position: absolute !important;
  right: 11px !important;
  left: auto !important;
  bottom: 8px !important;
  margin: 0 !important;
  z-index: 6 !important;
  pointer-events: none !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  height: 23px !important;
  min-height: 23px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  color: var(--fg) !important;
  background: color-mix(in srgb, var(--bg) 86%, rgba(255,255,255,0.82)) !important;
  border: 1px solid color-mix(in srgb, var(--line) 72%, rgba(255,255,255,0.38)) !important;
  box-shadow: 0 2px 7px rgba(15,23,42,0.16) !important;
  backdrop-filter: blur(14px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(165%) !important;
}
.bubble.me.voice-bubble .reaction-chip,
.bubble.me.audio-file-bubble .reaction-chip {
  color: #ffffff !important;
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.38) !important;
  box-shadow: 0 2px 7px rgba(0,0,0,0.15) !important;
}
.bubble.voice-bubble .reaction-chip .emoji,
.bubble.audio-file-bubble .reaction-chip .emoji {
  font-size: 14px !important;
  line-height: 1 !important;
}
.bubble.voice-bubble .reaction-chip .count,
.bubble.audio-file-bubble .reaction-chip .count {
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}

/* final Telegram scroll, keyboard lift, caption, reaction, and waveform repair */
#pane-chat #messages-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
#pane-chat #messages,
#messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
  box-sizing: border-box !important;
  padding-bottom: calc(var(--composer-reserved-space, 96px) + env(safe-area-inset-bottom)) !important;
  scroll-padding-bottom: calc(var(--composer-reserved-space, 96px) + env(safe-area-inset-bottom)) !important;
}
#messages.opening-to-latest {
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
}
#messages .bubble,
#messages .service-pill,
#messages .system-msg {
  content-visibility: visible !important;
  contain: none !important;
  contain-intrinsic-size: auto !important;
}
.bubble.voice-bubble,
.bubble.audio-file-bubble {
  position: relative !important;
  overflow: visible !important;
  margin-bottom: 4px !important;
}
.bubble.voice-bubble.has-reactions,
.bubble.audio-file-bubble.has-reactions,
.bubble.voice-bubble:has(.reaction-row),
.bubble.audio-file-bubble:has(.reaction-row) {
  margin-bottom: 4px !important;
}
.bubble.voice-bubble .body,
.bubble.audio-file-bubble .body {
  position: relative !important;
  overflow: hidden !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding-bottom: 22px !important;
}
.bubble.voice-bubble.has-reactions .body,
.bubble.audio-file-bubble.has-reactions .body,
.bubble.voice-bubble .body:has(.reaction-row),
.bubble.audio-file-bubble .body:has(.reaction-row) {
  padding-bottom: 52px !important;
}
.bubble.voice-bubble .msg-text,
.bubble.audio-file-bubble .msg-text {
  display: block !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  line-break: auto !important;
  hyphens: none !important;
  unicode-bidi: plaintext !important;
  padding: 0 !important;
}
.bubble.voice-bubble .msg-text:not(:empty) {
  margin: 5px 13px 0 !important;
}
.bubble.audio-file-bubble .msg-text:not(:empty) {
  margin: 5px 14px 0 !important;
}
.bubble.voice-bubble .msg-text:empty,
.bubble.audio-file-bubble .msg-text:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.bubble.voice-bubble .reaction-row,
.bubble.audio-file-bubble .reaction-row,
html[dir="rtl"] .bubble.me.voice-bubble .reaction-row,
html[dir="rtl"] .bubble.me.audio-file-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="rtl"] .bubble:not(.me).audio-file-bubble .reaction-row,
html[dir="ltr"] .bubble.me.voice-bubble .reaction-row,
html[dir="ltr"] .bubble.me.audio-file-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).voice-bubble .reaction-row,
html[dir="ltr"] .bubble:not(.me).audio-file-bubble .reaction-row {
  position: absolute !important;
  left: 15px !important;
  right: auto !important;
  top: auto !important;
  bottom: 29px !important;
  width: auto !important;
  max-width: calc(100% - 30px) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: none !important;
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  direction: ltr !important;
  z-index: 7 !important;
  transform: none !important;
  pointer-events: auto !important;
}
.bubble.voice-bubble .meta,
.bubble.audio-file-bubble .meta,
html[dir="rtl"] .bubble.voice-bubble .meta,
html[dir="rtl"] .bubble.audio-file-bubble .meta,
html[dir="ltr"] .bubble.voice-bubble .meta,
html[dir="ltr"] .bubble.audio-file-bubble .meta {
  position: absolute !important;
  right: 11px !important;
  left: auto !important;
  bottom: 7px !important;
  margin: 0 !important;
  z-index: 6 !important;
  pointer-events: none !important;
}
.bubble.voice-bubble .reaction-chip,
.bubble.audio-file-bubble .reaction-chip {
  height: 23px !important;
  min-height: 23px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  color: var(--fg) !important;
  background: color-mix(in srgb, var(--bg) 88%, rgba(255,255,255,0.82)) !important;
  border: 1px solid color-mix(in srgb, var(--line) 72%, rgba(255,255,255,0.38)) !important;
  box-shadow: 0 2px 7px rgba(15,23,42,0.16) !important;
  backdrop-filter: blur(14px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(165%) !important;
}
.bubble.me.voice-bubble .reaction-chip,
.bubble.me.audio-file-bubble .reaction-chip {
  color: #ffffff !important;
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.38) !important;
  box-shadow: 0 2px 7px rgba(0,0,0,0.15) !important;
}
.bubble.voice-bubble .reaction-chip .emoji,
.bubble.audio-file-bubble .reaction-chip .emoji {
  font-size: 14px !important;
  line-height: 1 !important;
}
.bubble.voice-bubble .reaction-chip .count,
.bubble.audio-file-bubble .reaction-chip .count {
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}
.bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html[data-theme="light"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html:not(.dark) .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
body[data-theme="light"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
body:not([data-theme="dark"]) .bubble:not(.me).voice-bubble .tg-wave-bg-wrap {
  color: rgba(0, 88, 84, 0.45) !important;
  opacity: 1 !important;
}
.bubble:not(.me).voice-bubble .tg-waveform-progress,
html[data-theme="light"] .bubble:not(.me).voice-bubble .tg-waveform-progress,
html:not(.dark) .bubble:not(.me).voice-bubble .tg-waveform-progress,
body[data-theme="light"] .bubble:not(.me).voice-bubble .tg-waveform-progress,
body:not([data-theme="dark"]) .bubble:not(.me).voice-bubble .tg-waveform-progress {
  color: rgba(255,255,255,0.96) !important;
  opacity: 1 !important;
}
.dark .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html.dark .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
html[data-theme="dark"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap,
body[data-theme="dark"] .bubble:not(.me).voice-bubble .tg-wave-bg-wrap {
  color: rgba(255,255,255,0.42) !important;
  opacity: 1 !important;
}
.dark .bubble:not(.me).voice-bubble .tg-waveform-progress,
html.dark .bubble:not(.me).voice-bubble .tg-waveform-progress,
html[data-theme="dark"] .bubble:not(.me).voice-bubble .tg-waveform-progress,
body[data-theme="dark"] .bubble:not(.me).voice-bubble .tg-waveform-progress {
  color: rgba(255,255,255,0.96) !important;
  opacity: 1 !important;
}
.bubble:not(.me).voice-bubble .tg-audio-waveform-bar {
  background-color: currentColor !important;
  opacity: 1 !important;
}

.forward-cancel-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 14px 10px !important;
  padding: 9px 10px 9px 14px !important;
  border-radius: 16px !important;
  background: color-mix(in srgb, var(--bg) 88%, var(--accent) 12%) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line)) !important;
  color: var(--fg) !important;
  box-shadow: 0 8px 24px rgba(15,23,42,0.12) !important;
}
.forward-cancel-bar span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
.forward-cancel-bar button {
  appearance: none !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 7px 13px !important;
  background: var(--accent) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
body.forward-mode-active #pane-chats .topbar-title {
  color: var(--accent) !important;
}
#pane-chat #messages,
#messages {
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
}
body.keyboard-open #pane-chat #messages,
body.keyboard-open #messages {
  scroll-snap-type: none !important;
  touch-action: pan-y !important;
}