/* AI 调度助手：会话内容的分类型显示（文本 / 图片 / 视频 / 音频 / 文件 / 链接卡片）。 */
.rich-paragraph { white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.rich-paragraph + .rich-paragraph { margin-top: 0.45rem; }
.rich-code {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow-x: auto;
  font-size: 0.82rem;
}
.rich-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.rich-media-grid { display: grid; gap: 6px; margin-top: 0.5rem; grid-template-columns: 1fr; }
.rich-media-grid.is-multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rich-media-item {
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.05);
  cursor: zoom-in;
  line-height: 0;
}
.rich-media-item img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
/* 素材/工具产出的图片视频同样限高，避免顶出屏幕；图片点击走同一套灯箱 */
.bubble-attachment img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
}
.bubble-attachment video {
  display: block;
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
}
/* 生成中骨架 + 加载失败占位：与 Online 端一致 */
.rich-pending {
  background: linear-gradient(90deg, rgba(15,23,42,0.06) 25%, rgba(15,23,42,0.12) 37%, rgba(15,23,42,0.06) 63%);
  background-size: 400% 100%;
  animation: rich-skeleton 1.4s ease infinite;
  min-height: 120px;
}
.rich-media-failed {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: rgba(225, 29, 72, 0.08);
  border: 1px dashed rgba(225, 29, 72, 0.35);
  color: #be123c;
  font-size: 13px;
  cursor: pointer;
}
@keyframes rich-skeleton {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.rich-media-block { display: grid; gap: 8px; margin-top: 0.5rem; }
.rich-media-block video,
.rich-media-block audio { width: 100%; border-radius: 12px; background: #000; }
.rich-media-block audio { background: transparent; }
.rich-file-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  text-decoration: none;
  font-size: 0.85rem;
}
.rich-link-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  color: inherit;
  max-width: 100%;
}
.rich-link-host { font-weight: 600; font-size: 0.85rem; }
.rich-link-path { color: rgba(15, 23, 42, 0.6); font-size: 0.76rem; word-break: break-all; }
.rich-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  cursor: zoom-out;
}
.rich-lightbox.hidden { display: none; }
.rich-lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 8px; }
.rich-lightbox button {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
}
.rich-lightbox-back {
  top: 16px;
  left: 18px;
  height: 34px;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 14px;
}
.rich-lightbox-prev,
.rich-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.rich-lightbox-prev { left: 12px; }
.rich-lightbox-next { right: 12px; }
.rich-lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.05em;
}
