.composer,
html[data-theme="light"] .composer {
  padding: 8px clamp(10px, 1.6vw, 20px) 9px;
}

.composer-tools {
  justify-content: flex-end;
  margin: 0 4px 3px 0;
  min-height: 0;
}

.composer-tools .text-button {
  min-height: 22px;
  padding: 2px 4px;
  font-size: 10px;
}

.composer-row {
  align-items: flex-end;
  gap: 7px;
}

.composer-btn,
.send-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  transition: background-color .16s ease, transform .16s ease;
}

.composer-btn:hover,
.send-btn:hover {
  transform: translateY(-1px);
}

.composer textarea {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: min(144px, 34dvh);
  overflow-x: hidden;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 10px 15px;
  line-height: 22px;
  scrollbar-width: thin;
  scroll-padding-block: 8px;
}

.composer-hint {
  display: none;
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.media-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--soft);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.media-action:hover {
  background: var(--panel-3);
  color: var(--text);
}

.media-action svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

@media (max-width: 820px) {
  .composer,
  html[data-theme="light"] .composer {
    padding: 5px 8px calc(6px + env(safe-area-inset-bottom));
  }

  .composer-row {
    gap: 4px;
  }

  .composer-btn,
  .send-btn {
    width: 38px;
    height: 40px;
  }

  .composer textarea {
    max-height: min(176px, 34dvh);
    padding: 9px 13px;
    font-size: 16px;
    line-height: 22px;
  }

  .media-action {
    min-height: 36px;
    padding: 7px 10px;
  }
}

@media (max-width: 370px) {
  .composer-row {
    gap: 2px;
  }

  .composer-btn {
    width: 34px;
  }

  .send-btn {
    width: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .composer-btn,
  .send-btn {
    transition: none;
  }
}
