.composer-dock {
  --composer-dock-active-rail: 2.125rem;
  --composer-dock-activity-bottom: 0.5rem;
  --composer-dock-quiet-inset: 1.25rem;
  --composer-dock-release: calc(
    var(--composer-dock-active-rail) -
    var(--composer-dock-quiet-inset)
  );

  padding-bottom: var(--composer-dock-quiet-inset);
  transition: padding-bottom 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.composer-dock--with-activity {
  padding-bottom: var(--composer-dock-active-rail);
}

.composer-dock-quiet-spacer {
  height: var(--composer-dock-release);
  transition: height 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.composer-dock--with-activity .composer-dock-quiet-spacer {
  height: 0;
}

.composer-dock-rail-mask {
  height: var(--composer-dock-quiet-inset);
  transition: height 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.composer-dock--with-activity .composer-dock-rail-mask {
  height: var(--composer-dock-active-rail);
}

.composer-dock-activity {
  bottom: var(--composer-dock-activity-bottom);
}

.composer-overlay-corner-masks::before,
.composer-overlay-corner-masks::after {
  position: absolute;
  bottom: var(--composer-dock-quiet-inset);
  z-index: 0;
  width: 1rem;
  height: 1rem;
  background: hsl(var(--background));
  content: "";
  transition: bottom 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.composer-dock--with-activity.composer-overlay-corner-masks::before,
.composer-dock--with-activity.composer-overlay-corner-masks::after {
  bottom: var(--composer-dock-active-rail);
}

@media (prefers-reduced-motion: reduce) {
  .composer-dock,
  .composer-dock-quiet-spacer,
  .composer-dock-rail-mask,
  .composer-overlay-corner-masks::before,
  .composer-overlay-corner-masks::after {
    transition: none;
  }
}

.composer-overlay-corner-masks::before {
  left: 1.25rem;
  mask-image: radial-gradient(
    circle at top right,
    transparent 0 1rem,
    black calc(1rem + 0.5px)
  );
  -webkit-mask-image: radial-gradient(
    circle at top right,
    transparent 0 1rem,
    black calc(1rem + 0.5px)
  );
}

.composer-overlay-corner-masks::after {
  right: 1.25rem;
  mask-image: radial-gradient(
    circle at top left,
    transparent 0 1rem,
    black calc(1rem + 0.5px)
  );
  -webkit-mask-image: radial-gradient(
    circle at top left,
    transparent 0 1rem,
    black calc(1rem + 0.5px)
  );
}

.rich-text-composer .tiptap {
  outline: none;
  min-height: 1lh;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.rich-text-composer .tiptap p {
  margin: 0;
}

.rich-text-composer .tiptap p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: hsl(var(--muted-foreground) / 0.65);
  pointer-events: none;
  height: 0;
}

.pulse-composer
  .rich-text-composer
  .tiptap
  p.is-editor-empty:first-child::before {
  color: hsl(var(--muted-foreground) / 0.65);
}

.pulse-composer:focus-within
  .rich-text-composer
  .tiptap
  p.is-editor-empty:first-child::before {
  color: hsl(var(--foreground));
}

.rich-text-composer .tiptap strong {
  font-weight: 600;
}

.rich-text-composer .tiptap em {
  font-style: italic;
}

.rich-text-composer .tiptap s {
  text-decoration: line-through;
}

.rich-text-composer .tiptap pre {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border) / 0.7);
  background: hsl(var(--muted) / 0.6);
  padding: 0.375rem 0.75rem;
  overflow-x: auto;
  margin: 0.25rem 0;
}

.rich-text-composer .tiptap blockquote {
  border-left: 2px solid hsl(var(--border));
  padding-left: 1rem;
  font-style: italic;
  color: hsl(var(--muted-foreground));
  margin: 0.25rem 0;
}

.rich-text-composer .tiptap ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.25rem 0;
}

.rich-text-composer .tiptap ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin: 0.25rem 0;
}

.rich-text-composer .tiptap li {
  margin: 0.125rem 0;
}

.rich-text-composer .tiptap li p {
  display: inline;
}

.rich-text-composer .tiptap a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: text;
}

.rich-text-composer .tiptap a[href*="linear.app"],
.message-markdown .linear-link {
  --buzz-linear-color: #5e6ad2;
}

.dark .rich-text-composer .tiptap a[href*="linear.app"],
.dark .message-markdown .linear-link {
  --buzz-linear-color: #828fff;
}

.rich-text-composer .tiptap a[href*="linear.app"],
.message-markdown .linear-link {
  color: var(--buzz-linear-color);
}

.rich-text-composer .tiptap a[href*="linear.app"]:hover,
.message-markdown .linear-link:hover {
  color: var(--buzz-linear-color);
}

.rich-text-composer .tiptap a[href*="github.com"] {
  --buzz-composer-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
  --buzz-composer-link-icon-color: hsl(var(--foreground));
}

.rich-text-composer .tiptap a[href*="linear.app"] {
  --buzz-composer-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z'/%3E%3C/svg%3E");
  --buzz-composer-link-icon-color: var(--buzz-linear-color);
}

.rich-text-composer .tiptap a[href*="drive.google.com"] {
  --buzz-composer-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.01 1.485c-2.082 0-3.754.02-3.743.047.01.02 1.708 3.001 3.774 6.62l3.76 6.574h3.76c2.081 0 3.753-.02 3.742-.047-.005-.02-1.708-3.001-3.775-6.62l-3.76-6.574zm-4.76 1.73a789.828 789.861 0 0 0-3.63 6.319L0 15.868l1.89 3.298 1.885 3.297 3.62-6.335 3.618-6.33-1.88-3.287C8.1 4.704 7.255 3.22 7.25 3.214zm2.259 12.653-.203.348c-.114.198-.96 1.672-1.88 3.287a423.93 423.948 0 0 1-1.698 2.97c-.01.026 3.24.042 7.222.042h7.244l1.796-3.157c.992-1.734 1.85-3.23 1.906-3.323l.104-.167h-7.249z'/%3E%3C/svg%3E");
  --buzz-composer-link-icon-color: #4285f4;
}

.rich-text-composer .tiptap a[href*="docs.google.com/document"] {
  --buzz-composer-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14.727 6.727H14V0H4.91c-.905 0-1.637.732-1.637 1.636v20.728c0 .904.732 1.636 1.636 1.636h14.182c.904 0 1.636-.732 1.636-1.636V6.727h-6zm-.545 10.455H7.09v-1.364h7.09v1.364zm2.727-3.273H7.091v-1.364h9.818v1.364zm0-3.273H7.091V9.273h9.818v1.363zM14.727 6h6l-6-6v6z'/%3E%3C/svg%3E");
  --buzz-composer-link-icon-color: #4285f4;
}

.rich-text-composer .tiptap a[href*="docs.google.com/spreadsheets"] {
  --buzz-composer-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11.318 12.545H7.91v-1.909h3.41v1.91zM14.728 0v6h6l-6-6zm1.363 10.636h-3.41v1.91h3.41v-1.91zm0 3.273h-3.41v1.91h3.41v-1.91zM20.727 6.5v15.864c0 .904-.732 1.636-1.636 1.636H4.909a1.636 1.636 0 0 1-1.636-1.636V1.636C3.273.732 4.005 0 4.909 0h9.318v6.5h6.5zm-3.273 2.773H6.545v7.909h10.91v-7.91zm-6.136 4.636H7.91v1.91h3.41v-1.91z'/%3E%3C/svg%3E");
  --buzz-composer-link-icon-color: #34a853;
}

.rich-text-composer .tiptap a[href*="docs.google.com/presentation"] {
  --buzz-composer-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16.09 15.273H7.91v-4.637h8.18v4.637zm1.728-8.523h2.91v15.614c0 .904-.733 1.636-1.637 1.636H4.909a1.636 1.636 0 0 1-1.636-1.636V1.636C3.273.732 4.005 0 4.909 0h9.068v6.75h3.841zm-.363 2.523H6.545v7.363h10.91V9.273zm-2.728-5.979V6h6.001l-6-6v3.294z'/%3E%3C/svg%3E");
  --buzz-composer-link-icon-color: #fbbc04;
}

.rich-text-composer .tiptap a[href*="github.com"]::before,
.rich-text-composer .tiptap a[href*="linear.app"]::before,
.rich-text-composer .tiptap a[href*="drive.google.com"]::before,
.rich-text-composer .tiptap a[href*="docs.google.com/document"]::before,
.rich-text-composer .tiptap a[href*="docs.google.com/spreadsheets"]::before,
.rich-text-composer .tiptap a[href*="docs.google.com/presentation"]::before {
  background-color: var(--buzz-composer-link-icon-color, currentColor);
  content: "";
  display: inline-block;
  height: 0.875em;
  margin-right: 0.25em;
  mask: var(--buzz-composer-link-icon) center / contain no-repeat;
  -webkit-mask: var(--buzz-composer-link-icon) center / contain no-repeat;
  transform: translateY(0.1em);
  width: 0.875em;
}

.rich-text-composer .tiptap hr {
  border-color: hsl(var(--border) / 0.8);
  margin: 0.5rem 0;
}

/* Inline chips — timeline markdown + composer share `.message-markdown` scope.
   Body copy is text-sm; inline code labels sit one step down (text-xs).
   All chip variants share one box height so mono labels stay balanced. */
