/* 底部输入栏：输入框、附件条、发送按钮。 */
/* ===== 底部输入栏 ===== */
.composer {
  flex: none;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 0.5px solid rgba(31,30,29,0.12);
  background: var(--bg-primary);
}
.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.image-attach {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  margin-left: -6px;
  padding: 0;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: color var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.image-attach::after {
  content: "";
  position: absolute;
  inset: 0 -2px;
}
.image-attach svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.image-attach:disabled { opacity: .35; cursor: default; }
.composer-attachments {
  display: none;
  gap: 8px;
  max-width: 100%;
  margin: 0 0 9px;
  overflow-x: auto;
  scrollbar-width: none;
}
.composer-attachments::-webkit-scrollbar { display: none; }
.composer-attachments.has-images { display: flex; }
.composer-image {
  position: relative;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
}
.composer-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(31,30,29,.06);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.composer-image-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #fff;
  background: rgba(31,30,29,.8);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.composer-image-remove svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.composer-status {
  display: block;
  min-height: 0;
  margin: 7px 2px 0 42px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}
.composer-status:empty { display: none; }
.composer-status.is-error { color: #9a3412; }
#input {
  flex: 1;
  resize: none;
  max-height: 120px;
  padding: 11px 15px;
  font-family: var(--font-ui);
  font-size: 16px;            /* ≥16px：避免 iOS 聚焦时自动放大 */
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  outline: none;
}
#input::placeholder { color: var(--text-muted); }

#send {
  flex: none;
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  color: #fff;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}
#send:disabled { opacity: .4; cursor: default; }
