/* ==========================================================================
   绒华录 · AI创作（对话）扩展样式表
   --------------------------------------------------------------------------
   说明：
   1. 本文件只做「新增」，不覆盖、不修改 工坊2style.css 里的任何既有规则；
   2. 页面默认（空态）视觉与改造前完全一致，只有进入对话后才出现新元素；
   3. 设计令牌全部沿用既有页面：
        朱砂红  #970002      腮红粉  #EFBFB5      纸感米色 #F9EEE4
        描边灰  #CECECE      正文灰  rgba(0,0,0,.6)
      字体沿用：标题 'source-han-serif sc vf medium', serif / 正文 "Microsoft Yahei", sans-serif
   4. 尺寸严格锁定 375 × 812，不产生任何滚动或位移。
   ========================================================================== */

.rh-scope, .rh-scope * { box-sizing: border-box; }

.rh-scope {
  --rh-red: #970002;
  --rh-red-60: rgba(151, 0, 2, .6);
  --rh-pink: #EFBFB5;
  --rh-paper: #F9EEE4;
  --rh-line: #CECECE;
  --rh-ink: rgba(0, 0, 0, .72);
  --rh-ink-60: rgba(0, 0, 0, .55);
  --rh-shadow: 0 3px 6px rgba(0, 0, 0, .1);
  font-family: "Microsoft Yahei", sans-serif;
  color: var(--rh-ink);
}

/* ============================ 对话区 ============================ */
/* 位置与既有元素对齐：上不压标题、下不压模式标签（模式标签顶部 y=649） */
.rh-chat {
  position: absolute;
  top: 110px;
  left: 20px;
  width: 335px;
  height: 530px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  z-index: 6;
  padding: 2px 2px 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility 0s linear .22s;
}
.rh-chat::-webkit-scrollbar { width: 0; height: 0; }
.rh-chat.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .22s ease, visibility 0s linear 0s;
}

.rh-msgs { display: flex; flex-direction: column; gap: 12px; }

/* 单条消息 */
.rh-row { display: flex; align-items: flex-start; gap: 8px; }
.rh-row.user { flex-direction: row-reverse; }

.rh-avatar {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  margin-top: 2px;
}
.rh-row.user .rh-avatar {
  /* 用「我的」页面的头像素材，保持与 AI 头像一致的大小 */
  background: var(--rh-pink);
  object-fit: cover;
  display: block;
}

.rh-bubble {
  position: relative;
  max-width: 232px;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.62;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: var(--rh-shadow);
}
.rh-row.ai .rh-bubble {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(151, 0, 2, .08);
  color: var(--rh-ink);
  border-top-left-radius: 4px;
}
.rh-row.user .rh-bubble {
  background: var(--rh-pink);
  color: var(--rh-red);
  border: 1px solid rgba(151, 0, 2, .55);
  border-top-right-radius: 4px;
  font-weight: 500;
}

/* 气泡内富文本 */
.rh-bubble img.rh-img {
  display: block;
  width: 100%;
  max-width: 208px;
  border-radius: 10px;
  margin-top: 2px;
}
.rh-bubble .rh-cap {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(151, 0, 2, .22);
  font-size: 11px;
  color: var(--rh-ink-60);
  white-space: normal;
}
.rh-bubble code {
  background: rgba(151, 0, 2, .07);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 12px;
}

/* Dify 开场推荐问题 */
.rh-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 232px;
  margin: -2px 0 0 34px;
}
.rh-suggest {
  width: 232px;
  max-width: 100%;
  border: 1px solid rgba(151, 0, 2, .18);
  border-radius: 11px;
  background: rgba(255, 255, 255, .88);
  color: var(--rh-red);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(151, 0, 2, .06);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.rh-suggest::after {
  content: "›";
  float: right;
  margin-left: 8px;
  font-size: 16px;
  line-height: 1;
  color: rgba(151, 0, 2, .55);
}
.rh-suggest:hover,
.rh-suggest:active {
  background: rgba(239, 191, 181, .28);
  border-color: rgba(151, 0, 2, .42);
}
.rh-suggest:active { transform: translateY(1px); }

/* 气泡下操作行 */
.rh-acts { display: flex; gap: 8px; margin-top: 8px; }
.rh-act {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--rh-red-60);
  border: 1px solid var(--rh-line);
  border-radius: 8px;
  padding: 3px 9px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.rh-act:hover, .rh-act:active { background: var(--rh-pink); color: var(--rh-red); border-color: var(--rh-red); }

/* 时间分隔 */
.rh-time {
  align-self: center;
  font-size: 10px;
  color: rgba(0, 0, 0, .35);
  padding: 2px 0;
}

/* 打字指示（三点） */
.rh-typing { display: flex; align-items: center; gap: 4px; height: 16px; }
.rh-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rh-red-60);
  animation: rh-blink 1.25s infinite ease-in-out;
}
.rh-typing i:nth-child(2) { animation-delay: .18s; }
.rh-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes rh-blink {
  0%, 60%, 100% { opacity: .28; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* 错误气泡 */
.rh-row.ai.error .rh-bubble {
  background: #FFF6F5;
  border-color: rgba(151, 0, 2, .35);
  color: #8a1a18;
}

/* 真实输入框（覆盖在既有 placeholder 文字位置，视觉与 p 一致） */
.rh-input {
  position: absolute;
  left: 50px;
  top: 0;
  width: 214px;
  height: 26px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: "Microsoft Yahei", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, .72);
  padding: 0;
  z-index: 3;
}
.rh-input::placeholder { color: transparent; }
/* 有内容/聚焦时隐藏既有 <p> 占位文案，避免重影 */
.content .search.rh-has-text > p { visibility: hidden; }

/* ---------------- 发送按钮：图标随输入状态自然对调 ----------------
   空输入  → 原「链接」图标
   有输入  → 淡出链接、纸飞机「发送」键旋转放大浮现
   两个图标共用同一圆心与尺寸，用 opacity + rotate + scale 过渡，
   阅读上像"图标翻面"，不会有生硬的跳变。                                */
.content .search img.rh-send {
  cursor: pointer;
  z-index: 4;
  transition: transform .34s cubic-bezier(.2, .9, .3, 1.3), opacity .2s ease;
}
.content .search img.rh-send:active { transform: scale(.92); }
.content .search img.rh-send.rh-disabled { opacity: .45; cursor: not-allowed; }

.rh-send-icon {
  position: absolute;
  right: -36px;
  top: -4px;
  width: 33px;
  height: 33px;
  background-color: rgb(255 255 255 / 70%);
  background-image: url("../images/工坊/AI创作/icon-send.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  border-radius: 50%;
  box-shadow: 0 3px 6px rgb(0 0 0 / 16%);
  opacity: 0;
  transform: scale(.55) rotate(-30deg);
  transition: opacity .2s ease, transform .34s cubic-bezier(.2, .9, .3, 1.3);
  pointer-events: none;
  z-index: 5;
}
.content .search.rh-has-text .rh-send-icon { opacity: 1; transform: scale(1) rotate(0deg); }
.content .search.rh-has-text img.rh-send { opacity: 0; transform: scale(.55) rotate(30deg); }

/* 模式标签可点 */
.content .options.rh-modes > p { cursor: pointer; user-select: none; transition: background .18s ease, color .18s ease; }
.content .options.rh-modes > p:active { transform: translateY(1px); }

/* 新对话图标可点 */
.content > img.rh-newchat { cursor: pointer; z-index: 5; transition: transform .16s ease; }
.content > img.rh-newchat:active { transform: scale(.9); }

/* ==================== 文生图 / 图生图：开发中占位状态 ==================== */
/* 位置与原来的欢迎语（.tip）对齐，切过去像是同一块区域换了内容 */
.rh-soon {
  position: absolute;
  top: 225px;
  left: 20px;
  width: 335px;
  text-align: center;
  z-index: 6;
  font-family: "Microsoft Yahei", sans-serif;
}
.rh-soon-ring {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(151, 0, 2);
  background: rgba(239, 191, 181, .34);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rh-red);
}
.rh-soon-ring svg { width: 40px; height: 40px; display: block; }
.rh-soon-title {
  margin-top: 16px;
  font-family: 'source-han-serif sc vf medium', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--rh-red);
  letter-spacing: .5px;
}
.rh-soon-sub {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(0, 0, 0, .5);
}
/* 开发中的模式：输入区整体置灰不可用 */
.content .search.rh-disabled > p { color: rgba(0, 0, 0, .3); }
.content .search.rh-disabled .rh-input { color: rgba(0, 0, 0, .3); cursor: not-allowed; }
.content .search.rh-disabled img.rh-send { opacity: .4; cursor: not-allowed; }

/* ============================ 遮罩 / 弹窗 / 浮层 ============================ */
.rh-mask {
  position: absolute;
  inset: -1px;
  background: rgb(0 0 0 / 30%);   /* 统一黑色半透明遮罩 */
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility 0s linear .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rh-mask.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .2s ease, visibility 0s linear 0s;
}

/* 对话框（沿用朱砂红标题 + 圆角纸感卡片） */
.rh-dialog {
  width: 268px;
  background: #FFFCF9;
  border-radius: 16px;
  padding: 20px 18px 14px;
  box-shadow: 0 10px 26px rgba(80, 30, 20, .22);
  text-align: center;
  transform: translateY(8px) scale(.97);
  transition: transform .22s cubic-bezier(.2, .9, .3, 1.2);
}
.rh-mask.is-on .rh-dialog { transform: translateY(0) scale(1); }

.rh-dialog .rh-d-title {
  font-family: 'source-han-serif sc vf medium', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--rh-red);
  letter-spacing: .5px;
}
.rh-dialog .rh-d-icon {
  width: 46px; height: 46px; margin: 0 auto 10px;
  border-radius: 50%;
  border: 2px solid var(--rh-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--rh-red);
  background: rgba(239, 191, 181, .35);
}
.rh-dialog .rh-d-icon svg { width: 22px; height: 22px; display: block; }
.rh-sheet .rh-s-item .rh-s-ico svg { width: 17px; height: 17px; display: block; }

.rh-dialog .rh-d-body {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--rh-ink-60);
  white-space: pre-wrap;
  text-align: left;
}
.rh-dialog .rh-d-body.center { text-align: center; }

.rh-d-btns { display: flex; gap: 10px; margin-top: 18px; }
.rh-btn {
  flex: 1 1 0;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--rh-line);
  background: #fff;
  color: var(--rh-ink-60);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.rh-btn:active { transform: translateY(1px); }
.rh-btn.primary {
  background: var(--rh-red);
  border-color: var(--rh-red);
  color: #fff;
  font-weight: 600;
}
.rh-btn.pink {
  background: var(--rh-pink);
  border-color: var(--rh-red);
  color: var(--rh-red);
  font-weight: 600;
}
.rh-btn.ghost { background: transparent; }
.rh-btn.full { flex: 1 1 100%; }

/* 底部动作面板 */
.rh-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: #FFFCF9;
  border-radius: 18px 18px 0 0;
  padding: 8px 18px 22px;
  transform: translateY(102%);
  transition: transform .26s cubic-bezier(.2, .8, .25, 1);
  box-shadow: 0 -6px 22px rgba(80, 30, 20, .16);
}
.rh-mask.sheet.is-on { align-items: flex-end; }
.rh-mask.sheet.is-on .rh-sheet { transform: translateY(0); }
.rh-mask.sheet .rh-dialog { transform: none; }

.rh-sheet .rh-grab {
  width: 40px; height: 4px; border-radius: 2px;
  background: rgba(0, 0, 0, .14);
  margin: 0 auto 12px;
}
.rh-sheet .rh-s-title {
  font-family: 'source-han-serif sc vf medium', serif;
  font-size: 15px; font-weight: 700; color: var(--rh-red);
  text-align: center; margin-bottom: 4px;
}
.rh-sheet .rh-s-sub {
  font-size: 12px; color: var(--rh-ink-60);
  text-align: center; margin-bottom: 14px;
}
.rh-sheet .rh-s-item {
  display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 4px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  font-size: 14px; color: var(--rh-ink);
  cursor: pointer;
}
.rh-sheet .rh-s-item:last-of-type { border-bottom: 0; }
.rh-sheet .rh-s-item .rh-s-ico {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--rh-red);
}
.rh-sheet .rh-s-item .rh-s-txt { flex: 1 1 auto; }
.rh-sheet .rh-s-item .rh-s-txt small {
  display: block; font-size: 11px; color: var(--rh-ink-60); margin-top: 2px;
}
.rh-sheet .rh-s-item.danger .rh-s-txt { color: #a01a18; }
.rh-sheet .rh-s-item.wide { justify-content: center; }
.rh-sheet .rh-s-item.wide .rh-s-txt { flex: 0 0 auto; text-align: center; }

/* 图片上传格（图生图） */
.rh-upload {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.rh-upload .rh-up-box {
  flex: 1 1 0;
  height: 84px;
  border: 1px dashed var(--rh-line);
  border-radius: 12px;
  background: rgba(239, 191, 181, .18);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 11px; color: var(--rh-red-60);
  cursor: pointer; overflow: hidden;
}
.rh-upload .rh-up-box img { width: 100%; height: 100%; object-fit: cover; }
.rh-upload .rh-up-box .rh-up-ico { font-size: 20px; }

/* 参数行（图生图 / 文生图） */
.rh-fields { display: flex; flex-direction: column; gap: 10px; }
.rh-field { display: flex; align-items: center; gap: 10px; }
.rh-field > span {
  flex: 0 0 66px; font-size: 12px; color: var(--rh-ink-60); text-align: right;
}
.rh-field .rh-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.rh-field .rh-chip {
  font-size: 12px; color: var(--rh-ink-60);
  border: 1px solid var(--rh-line); background: #fff;
  border-radius: 8px; padding: 4px 10px; cursor: pointer;
}
.rh-field .rh-chip.on {
  background: var(--rh-pink); color: var(--rh-red);
  border-color: var(--rh-red); font-weight: 600;
}

/* Toast */
.rh-toast {
  position: absolute;
  left: 50%;
  bottom: 172px;
  transform: translate(-50%, 10px);
  background: rgba(122, 22, 18, .92);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 9px 16px;
  border-radius: 18px;
  max-width: 260px;
  text-align: center;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
}
.rh-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
/* 有弹窗 / 底部面板时改到顶部显示，避免遮住面板内容 */
.rh-toast.rh-toast-top { bottom: auto; top: 116px; transform: translate(-50%, -8px); }
.rh-toast.rh-toast-top.is-on { transform: translate(-50%, 0); }

/* 顶部连接状态小条（未配置 Dify 时提示） */
.rh-badge {
  position: absolute;
  top: 106px;
  left: 20px;
  z-index: 7;
  display: none;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--rh-red);
  background: rgba(239, 191, 181, .55);
  border: 1px solid rgba(151, 0, 2, .22);
}
.rh-badge.is-on { display: inline-flex; }
.rh-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rh-badge.mock { color: rgba(0, 0, 0, .55); background: rgba(0, 0, 0, .06); border-color: rgba(0, 0, 0, .12); }

/* ==========================================================================
   2026-09 设计稿对齐：02 / 03 / 07 / 09 / 10 / 11 / 12 / 13
   仅通过 .rh-chat.is-on 与浮层修饰类生效，保留原交互逻辑、空态与错误流程。
   ========================================================================== */
.rh-chat.is-on {
  top: 94px;
  height: 542px;
  padding: 7px 2px 8px;
}
.rh-chat.is-on .rh-msgs { gap: 14px; }
.rh-chat.is-on .rh-time { display: none; }
.rh-chat.is-on .rh-row.ai:first-child { margin-top: 3px; }
.rh-chat.is-on .rh-row.user:first-child { margin-top: 2px; }
.rh-chat.is-on .rh-row { gap: 7px; }
.rh-chat.is-on .rh-avatar { width: 28px; height: 28px; margin-top: 0; }
.rh-chat.is-on .rh-row.user .rh-avatar { border: 1px solid rgba(255,255,255,.92); }
.rh-chat.is-on .rh-row.ai .rh-bubble {
  max-width: 236px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: #F8F7F4;
  box-shadow: 0 2px 8px rgba(140,100,80,.06);
  color: #3D3D3D;
  font-size: 13px;
  line-height: 21px;
  letter-spacing: -.05px;
}
.rh-chat.is-on .rh-row.user .rh-bubble {
  max-width: 230px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: #F5DAD4;
  box-shadow: 0 2px 8px rgba(196,154,132,.18);
  color: #4A4A4A;
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
}
.rh-chat.is-on .rh-suggestions {
  width: 236px;
  margin: 0 0 0 38px;
  gap: 10px;
}
.rh-chat.is-on .rh-suggest {
  width: 236px;
  min-height: 36px;
  padding: 8px 30px 8px 14px;
  border: 1px solid #EBD3CA;
  border-radius: 8px;
  background: #FCF5F2;
  color: #B03A48;
  font-size: 13px;
  line-height: 18px;
  box-shadow: none;
}
.rh-chat.is-on .rh-suggest::after { color: #CE9A96; font-size: 15px; }

.content .search .rh-send-icon {
  right: -37px;
  top: -5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: transparent;
  background-image: none;
  box-shadow: 0 2px 6px rgba(192,57,46,.25);
}
.content .search .rh-send-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #C0392E;
}
.content .search .rh-send-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 14px;
  height: 14px;
  background: #fff;
  -webkit-mask: url("../images/工坊/AI创作/icon-send.svg") center / contain no-repeat;
  mask: url("../images/工坊/AI创作/icon-send.svg") center / contain no-repeat;
}

/* 07 创作结果卡片 */
.rh-chat.is-on .rh-row--result { align-items: flex-start; }
.rh-chat.is-on .rh-result-card {
  width: 231px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(60,40,20,.05);
}
.rh-chat.is-on .rh-result-img {
  display: block;
  width: 203px;
  height: 230px;
  object-fit: cover;
  border-radius: 8px;
}
.rh-chat.is-on .rh-result-copy {
  margin-top: 16px;
  color: #4B4B4B;
  font-size: 13px;
  line-height: 20px;
  white-space: normal;
}
.rh-chat.is-on .rh-result-actions { display: flex; gap: 8px; margin-top: 8px; }
.rh-chat.is-on .rh-result-btn {
  height: 22px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: #ECECEC;
  color: #3A3A3A;
  font-family: inherit;
  font-size: 11px;
  line-height: 22px;
  cursor: pointer;
}
.rh-chat.is-on .rh-result-btn.primary { background: #EFBDB4; color: #9E1A1A; font-weight: 500; }
.rh-chat.is-on .rh-result-btn:active { transform: translateY(1px); }

/* 09 图生图参考图消息 */
.rh-chat.is-on .rh-row--media { align-items: flex-start; }
.rh-chat.is-on .rh-user-stack { width: 226px; display: flex; flex-direction: column; align-items: stretch; }
.rh-chat.is-on .rh-ref-card {
  width: 226px;
  height: 240px;
  padding: 10px;
  border-radius: 12px;
  background: #F3D8D2;
  box-shadow: 0 6px 14px rgba(196,154,132,.28), 0 2px 4px rgba(196,154,132,.16);
}
.rh-chat.is-on .rh-ref-card img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.rh-chat.is-on .rh-row--media .rh-bubble { width: 226px; max-width: 226px; margin-top: 19px; }

/* 10 底部菜单 Sheet */
.rh-sheet.rh-sheet--menu {
  padding: 8px 24px 34px;
  border-radius: 20px 20px 0 0;
  background: #FBF9F6;
  box-shadow: 0 -4px 24px rgba(0,0,0,.08);
}
.rh-sheet--menu .rh-grab { width: 36px; height: 4px; margin-bottom: 10px; background: #D9D4CE; }
.rh-sheet--menu .rh-s-title {
  margin-bottom: 6px;
  color: #8C1F28;
  font-family: "Microsoft Yahei", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
}
.rh-sheet--menu .rh-s-sub { margin-bottom: 14px; color: #A09A93; font-size: 12px; }
.rh-sheet--menu .rh-s-item {
  height: 52px;
  gap: 8px;
  padding: 0;
  border-bottom: 1px solid #ECE7E1;
  color: #1F1D1A;
  font-size: 16px;
  font-weight: 500;
}
.rh-sheet--menu .rh-s-item .rh-s-ico {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #F0EDE8;
  color: #6E6862;
}
.rh-sheet--menu .rh-s-item .rh-s-ico svg { width: 18px; height: 18px; }
.rh-sheet--menu .rh-s-item .rh-s-txt small { margin-top: 4px; color: #9C968F; font-size: 12px; font-weight: 400; }
.rh-sheet--menu .rh-s-item.wide { height: 48px; border-bottom: 0; font-size: 16px; font-weight: 400; }

/* 11 / 13 确认弹窗 */
.rh-dialog.rh-dialog--confirm {
  width: 267px;
  padding: 22px 20px 18px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
}
.rh-dialog--confirm .rh-d-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border: 2px solid #9E1F1F;
  background: transparent;
  color: #9E1F1F;
}
.rh-dialog--confirm .rh-d-icon svg { width: 20px; height: 20px; }
.rh-dialog--confirm .rh-d-title {
  color: #9E1F1F;
  font-family: "Microsoft Yahei", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}
.rh-dialog--confirm .rh-d-body {
  margin-top: 12px;
  padding: 0 2px;
  color: #8C8C8C;
  font-size: 12px;
  line-height: 20px;
  text-align: left;
}
.rh-dialog--confirm .rh-d-btns { gap: 10px; margin-top: 20px; }
.rh-dialog--confirm .rh-btn { height: 40px; border-radius: 8px; font-size: 14px; }
.rh-dialog--confirm .rh-btn.ghost { border-color: #D9D9D9; color: #666; }
.rh-dialog--confirm .rh-btn.primary { background: #9E1F1F; border-color: #9E1F1F; }

/* 12 参数设置 Sheet */
.rh-sheet.rh-sheet--params {
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px 16px 0 0;
  background: #fff;
}
.rh-sheet--params .rh-grab { width: 40px; height: 4px; margin-bottom: 12px; background: #D8D8D8; }
.rh-sheet--params .rh-s-title {
  color: #A01B1B;
  font-family: "Microsoft Yahei", sans-serif;
  font-size: 18px;
  font-weight: 600;
}
.rh-sheet--params .rh-s-sub { margin-top: 6px; margin-bottom: 16px; color: #9B9B9B; font-size: 12px; }
.rh-sheet--params .rh-fields { gap: 16px; }
.rh-sheet--params .rh-field { align-items: flex-start; gap: 12px; }
.rh-sheet--params .rh-field > span { flex: 0 0 64px; padding-top: 5px; color: #666; font-size: 13px; text-align: left; }
.rh-sheet--params .rh-chips { gap: 8px; }
.rh-sheet--params .rh-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #E2E2E2;
  border-radius: 8px;
  background: #fff;
  color: #4A4A4A;
  font-size: 13px;
}
.rh-sheet--params .rh-chip.on { border-color: #A01B1B; background: #FBECEA; color: #A01B1B; font-weight: 600; }
.rh-sheet--params .rh-d-btns { gap: 16px; margin-top: 20px; }
.rh-sheet--params .rh-btn { height: 44px; border-radius: 8px; font-size: 15px; }
.rh-sheet--params .rh-btn.ghost { border-color: #E2E2E2; color: #8A8A8A; }
.rh-sheet--params .rh-btn.primary { background: #A01B1B; border-color: #A01B1B; }

/* 07 操作 Toast（仅 action 类型使用，不影响保存/错误提示） */
.rh-toast {
  bottom: 178px;
  padding: 7px 14px;
  border-radius: 10px;
  background: #A01414;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(160,20,20,.35);
}
.rh-toast.rh-toast-top { bottom: auto; top: 116px; }








.content > img.rh-newchat { position: relative; z-index: 10; }




/* ==========================================================================
   2026-09 更新：04 / 07 / 09–14 视觉与功能状态
   ========================================================================== */
.rh-chat.is-on {
  top: 94px;
  height: 542px;
  padding: 7px 2px 8px;
}
.rh-chat.is-on .rh-msgs { gap: 14px; }
.rh-chat.is-on .rh-time { display: none; }
.rh-chat.is-on .rh-row.ai:first-child { margin-top: 3px; }
.rh-chat.is-on .rh-row.user:first-child { margin-top: 2px; }
.rh-chat.is-on .rh-row { gap: 7px; }
.rh-chat.is-on .rh-avatar { width: 26px; height: 26px; margin-top: 0; }
.rh-chat.is-on .rh-row.ai .rh-bubble {
  max-width: 236px;
  padding: 12px 12px;
  border: 1px solid rgba(151,0,2,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 3px 6px rgba(0,0,0,.1);
  color: rgba(0,0,0,.72);
  font-size: 13px;
  line-height: 21px;
}
.rh-chat.is-on .rh-row.user .rh-bubble {
  max-width: 230px;
  padding: 10px 14px;
  border: 1px solid rgba(151,0,2,.55);
  border-radius: 12px;
  background: #F5DBD1;
  box-shadow: 0 3px 6px rgba(0,0,0,.1);
  color: rgba(0,0,0,.72);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
}
.rh-chat.is-on .rh-suggestions { margin: 0 0 0 36px; gap: 8px; width: 236px; }
.rh-chat.is-on .rh-suggest {
  width: 236px; min-height: 37px; padding: 8px 30px 8px 14px;
  border: 1px solid #F0D6D0; border-radius: 8px; background: #FCF5F2;
  color: #970002; font-size: 12px; line-height: 20px; box-shadow: none;
}
.rh-chat.is-on .rh-suggest::after { color: rgba(151,0,2,.55); font-size: 16px; }

/* 发送/链接按钮 */
.content .search .rh-send-icon {
  right: -37px; top: -5px; width: 33px; height: 33px;
  border-radius: 50%; background-color: transparent; background-image: none;
  box-shadow: 0 3px 6px rgba(0,0,0,.16);
  pointer-events: none;
}
.content .search .rh-send-icon::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #FDFAF7;
}
.content .search .rh-send-icon::after {
  content: ""; position: absolute; left: 9.5px; top: 9.5px; width: 14px; height: 14px;
  background: #970002; -webkit-mask: url("../images/工坊/AI创作/icon-send.svg") center / contain no-repeat;
  mask: url("../images/工坊/AI创作/icon-send.svg") center / contain no-repeat;
}
.content .search.rh-has-text .rh-send-icon { pointer-events: auto; cursor: pointer; }
.content .search img.rh-link { cursor: not-allowed; }
.content .search img.rh-link.rh-link-disabled { opacity: .35; filter: grayscale(1); }

/* 新建对话按钮：按 Figma 的 Nav Bar 位置 x=329,y=46 */
.content > img.rh-newchat {
  position: absolute; left: 329px; top: 46px; width: 24px; height: 24px;
  margin: 0; float: none; z-index: 10;
}

/* AI 消息小功能按钮 */
.rh-ai-stack { display: flex; flex-direction: column; align-items: flex-start; max-width: 236px; }
.rh-ai-tools { display: flex; gap: 8px; margin-top: 8px; }
.rh-tool {
  width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  background: #EFEDEC; color: #7A7673; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.rh-tool svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rh-tool.on { background: #EFBFB5; color: #970002; }

/* 长按/右键菜单 */
.rh-context-menu {
  position: absolute; z-index: 30; width: 88px; height: 32px; padding: 0 8px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 4px; background: #FEFCFA; box-shadow: 0 3px 6px rgba(0,0,0,.1);
}
.rh-context-menu button { width: 16px; height: 16px; padding: 0; border: 0; background: transparent; color: #970002; cursor: pointer; }
.rh-context-menu svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rh-context-line { width: 1px; height: 12px; background: #CECECE; }

/* 异常气泡 */
.rh-chat.is-on .rh-row.ai.error .rh-bubble {
  width: 230px; max-width: 230px; padding: 12px;
  border: 0; border-radius: 12px; background: rgba(255,255,255,.92);
  box-shadow: 0 3px 6px rgba(0,0,0,.1); color: #970002;
}

/* 07 上传参考图 */
.rh-sheet--upload { background: #FFFCF9; border-radius: 18px 18px 0 0; padding: 8px 18px 22px; box-shadow: 0 -6px 22px rgba(80,30,20,.16); }
.rh-sheet--upload .rh-s-title { font-family: "Noto Serif SC", serif; font-size: 15px; font-weight: 700; color: #970002; margin-bottom: 4px; }
.rh-sheet--upload .rh-s-sub { color: rgba(0,0,0,.4); font-size: 12px; margin-bottom: 14px; }
.rh-sheet--upload .rh-upload { margin-bottom: 14px; }
.rh-sheet--upload .rh-up-box { height: 84px; border: 1px dashed #CECECE; border-radius: 12px; background: rgba(239,191,181,.18); color: rgba(151,0,2,.6); }
.rh-sheet--upload .rh-d-btns { gap: 10px; margin-top: 0; }
.rh-sheet--upload .rh-btn { height: 38px; border-radius: 10px; font-size: 14px; }
.rh-sheet--upload .rh-btn.primary { background: #970002; border-color: #970002; }

/* 09 菜单 */
.rh-sheet--menu { background: #FFFCF9; border-radius: 18px 18px 0 0; padding: 8px 18px 8px; box-shadow: 0 -6px 22px rgba(80,30,20,.16); }
.rh-sheet--menu .rh-s-title { font-family: "Noto Serif SC", serif; font-size: 15px; font-weight: 700; color: #970002; margin-bottom: 4px; }
.rh-sheet--menu .rh-s-sub { margin-bottom: 12px; color: rgba(0,0,0,.4); font-size: 12px; }
.rh-sheet--menu .rh-s-item { height: 52px; gap: 10px; padding: 0; border-bottom: 1px solid rgba(0,0,0,.06); color: rgba(0,0,0,.72); font-size: 14px; font-weight: 400; }
.rh-sheet--menu .rh-s-item:last-of-type { border-bottom: 0; }
.rh-sheet--menu .rh-s-ico { width: 26px; height: 26px; border: 0; border-radius: 0; background: transparent; color: #970002; }
.rh-sheet--menu .rh-s-ico svg { width: 18px; height: 18px; }
.rh-sheet--menu .rh-s-txt small { margin-top: 2px; color: rgba(0,0,0,.4); font-size: 12px; }
.rh-sheet--menu .rh-s-item.wide { justify-content: center; height: 48px; color: rgba(0,0,0,.75); font-size: 14px; }

/* 文生图 / 图生图：开始新对话禁用态 */
.rh-sheet--menu .rh-s-item.is-disabled {
  color: rgba(0,0,0,.28);
  cursor: not-allowed;
}
.rh-sheet--menu .rh-s-item.is-disabled .rh-s-ico {
  opacity: .35;
  filter: grayscale(1);
}
.rh-sheet--menu .rh-s-item.is-disabled .rh-s-txt {
  color: rgba(0,0,0,.28);
}
.rh-sheet--menu .rh-s-item.is-disabled .rh-s-txt small {
  color: rgba(0,0,0,.22);
}
.rh-sheet--menu .rh-s-item.is-disabled:active {
  background: transparent;
}

/* 10 / 11 / 12 弹窗 */
.rh-dialog--confirm {
  width: 268px; padding: 20px 18px 14px; border-radius: 16px; background: #FFFCF9;
  box-shadow: 0 10px 26px rgba(80,30,20,.22);
}
.rh-dialog--confirm .rh-d-icon { width: 46px; height: 46px; margin-bottom: 10px; border: 2px solid #970002; background: rgba(239,191,181,.35); color: #970002; }
.rh-dialog--confirm .rh-d-icon svg { width: 24px; height: 24px; }
.rh-dialog--confirm .rh-d-title { font-family: "Noto Serif SC", serif; font-size: 17px; font-weight: 700; color: #970002; letter-spacing: .2px; }
.rh-dialog--confirm .rh-d-body { margin-top: 10px; font-size: 13px; line-height: 1.7; color: rgba(0,0,0,.55); }
.rh-dialog--confirm .rh-d-btns { gap: 10px; margin-top: 18px; }
.rh-dialog--confirm .rh-btn { height: 38px; border-radius: 8px; font-size: 14px; }
.rh-dialog--confirm .rh-btn.ghost { border-color: #CECECE; color: rgba(0,0,0,.55); background: transparent; }
.rh-dialog--confirm .rh-btn.primary { background: #970002; border-color: #970002; font-weight: 400; }
.rh-dialog--confirm.rh-dialog--newchat { padding-bottom: 14px; }
.rh-dialog--confirm.rh-dialog--danger { padding-bottom: 18px; }

/* 11 参数设置 */
.rh-sheet--params { background: #FFFCF9; border-radius: 18px 18px 0 0; padding: 8px 18px 22px; box-shadow: 0 -6px 22px rgba(80,30,20,.16); }
.rh-sheet--params .rh-s-title { font-family: "Noto Serif SC", serif; font-size: 15px; font-weight: 700; color: #970002; }
.rh-sheet--params .rh-s-sub { color: rgba(0,0,0,.4); font-size: 12px; margin-bottom: 14px; }
.rh-sheet--params .rh-fields { gap: 10px; }
.rh-sheet--params .rh-field { align-items: flex-start; gap: 10px; }
.rh-sheet--params .rh-field > span { flex: 0 0 66px; width: 66px; padding-top: 5px; color: rgba(0,0,0,.6); font-size: 12px; text-align: right; }
.rh-sheet--params .rh-chips { gap: 8px; }
.rh-sheet--params .rh-chip { height: 26px; padding: 0 8px; border: 1px solid #CECECE; border-radius: 8px; background: rgba(255,255,255,.7); color: rgba(0,0,0,.72); font-size: 12px; display: inline-flex; align-items: center; }
.rh-sheet--params .rh-chip.on { background: #EFBFB5; border-color: #970002; color: #970002; font-weight: 500; }
.rh-sheet--params .rh-d-btns { gap: 10px; margin-top: 18px; }
.rh-sheet--params .rh-btn { height: 38px; border-radius: 10px; font-size: 14px; }
.rh-sheet--params .rh-btn.ghost { border-color: #CECECE; color: rgba(0,0,0,.55); }
.rh-sheet--params .rh-btn.primary { background: #970002; border-color: #970002; font-weight: 700; }


.rh-ai-tools .rh-tool:last-child { margin-left: auto; }


/* 2026-09-21 设计稿进一步对齐 */
.rh-chat.is-on .rh-row.user .rh-bubble {
  border: 0;
  background: #F5DBD1;
}
.rh-bubble-text { white-space: pre-wrap; }
.rh-msg-footer { display: flex; align-items: center; gap: 10px; margin-top: 10px; min-height: 22px; }
.rh-pager { display: flex; align-items: center; gap: 2px; color: rgba(0,0,0,.72); font-size: 10px; }
.rh-pager-btn {
  width: 16px; height: 22px; padding: 0; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.rh-pager-btn img {
  width: 14px; height: 14px; display: block;
  filter: brightness(0);
}
.rh-pager-btn:disabled { cursor: default; }
.rh-ai-tools { display: flex; gap: 10px; width: auto; margin-left: auto; margin-top: 0; }
.rh-msg-footer .rh-tool:last-child { margin-left: auto; }
.rh-bubble--image { width: 230px; max-width: 230px; padding: 12px 11px 12px; }
.rh-image-wrap { width: 206px; height: 235px; overflow: hidden; border: 1px solid rgba(0,0,0,.15); border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.rh-image-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rh-image-caption { margin-top: 16px; width: 206px; color: rgba(0,0,0,.72); font-size: 12px; line-height: 18px; }

/* 删除多选 */
.rh-row--selectable { position: relative; padding-left: 32px; }
.rh-select-circle {
  position: absolute; left: -3px; top: 4px; width: 20px; height: 20px; padding: 0;
  border: 1px solid #970002; border-radius: 50%; background: transparent; color: transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 4;
}
.rh-select-circle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.rh-select-circle.on { background: #970002; color: #fff; }
.rh-select-circle:not(.on) svg path { display: none; }
/* 选中删除态：这一屏不要「选项 / 搜索框 / 指示器」，只留对话 + 底部浮层（设计稿：04 对话页 · 长按） */
.phone-box.rh-selecting .options,
.phone-box.rh-selecting .search,
.phone-box.rh-selecting .home-container { display: none; }

/* 选中删除态：对话内容高度固定为 710px（设计稿：04 对话页 · 长按） */
.phone-box.rh-selecting .rh-chat.is-on {
  height: 710px;
}

/* 底部浮层背景框：373×82 / 上方圆角 18 / 向上投影；「删除」按钮浮在它上面 */
.rh-selection-panel {
  position: absolute; left: 0; right: 0; bottom: 0; height: 82px; z-index: 70;
  border-radius: 18px 18px 0 0;
  background: #FFFCF9;
  box-shadow: 0 -6px 22px 0 rgba(80, 30, 20, .16);
}

.rh-selection-bar { position: absolute; left: 20px; right: 20px; bottom: 22px; z-index: 80; }
.rh-selection-delete {
  width: 100%; height: 38px; border: 1px solid #970002; border-radius: 10px; background: #970002;
  color: #fff; font-size: 14px; font-weight: 400; font-family: inherit; cursor: pointer;
}
.rh-selection-delete:disabled { opacity: .45; cursor: not-allowed; }

/* Toast：组件图与设计稿一致 */
.rh-toast {
  min-height: 37px; padding: 9px 16px; border-radius: 18px; background: rgba(255,255,255,.9);
  color: #970002; font-size: 12.5px; box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.rh-toast.rh-toast--red { background: rgba(151,0,2,.9); color: #fff; }
.rh-context-menu button { color: #474646; }
.rh-context-menu svg { fill: currentColor; stroke: none; }

.phone-box.rh-selecting .footer { opacity: 0; pointer-events: none; }


.rh-context-menu svg { fill: none; stroke: #474646; stroke-width: 1.5; }


.rh-tool img { width: 22px; height: 22px; display: block; }
.rh-context-menu img { width: 16px; height: 16px; display: block; }
.rh-sheet--menu .rh-s-ico img { width: 18px; height: 18px; display: block; }
.rh-dialog .rh-d-icon img { width: 24px; height: 24px; display: block; }


.rh-chat.is-on .rh-row.ai:not(.rh-row--opening) .rh-bubble { max-width: 232px; }
.rh-msg-footer { gap: 4px; }
.rh-ai-tools { width: 203px; margin-left: 0; gap: 10px; }
.rh-ai-tools--image { width: 203px; }
.rh-msg-footer .rh-tool:last-child { margin-left: auto; }


.rh-chat.is-on .rh-row.user { margin-right: -4px; }
.rh-chat.is-on .rh-row.user .rh-bubble { width: auto; max-width: 229px; padding: 8px 12px; line-height: 21px; }



.rh-chat.is-on .rh-suggest { padding: 8px 12px; }
.rh-chat.is-on .rh-row.user { margin-right: 0; }
.rh-chat.is-on .rh-user-stack { width: 229px; }
.rh-chat.is-on .rh-ref-card { width: 222px; height: 153px; padding: 12px 12px; }
.rh-chat.is-on .rh-row--media .rh-bubble { margin-top: 16px; }
.rh-chat.is-on .rh-row--i2i-ai { margin-left: 0px; gap: 8px; }
.rh-pager { height: 22px; }
.rh-pager span { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 12px; line-height: 12px; white-space: nowrap; }
.rh-gen-btn { position: absolute; right: -37px; top: -10; width: 36px; height: 51px; border: 0px; padding: 0; background: transparent url('../images/工坊/AI创作/icon-generating.svg') center / 45px 45px no-repeat; z-index: 8; cursor: pointer; }
.rh-gen-btn.is-paused { background-image: url('../images/工坊/AI创作/icon-pausing.svg'); }


.rh-wait-tip { margin-top: 8px; color: rgba(0,0,0,.5); font-size: 12px; line-height: 18px; }
.content .search.rh-generating img.rh-link, .content .search.rh-generating .rh-send-icon { opacity: 0 !important; pointer-events: none !important; }

.rh-chat.is-on .rh-row--i2i-user { margin-top: 0px; margin-right: 0; }

/* ==========================================================================
   2026-09 第二轮：使用设计稿图标文件补齐状态
   ========================================================================== */
.content .search img.rh-link { cursor: pointer; }
.content .search img.rh-link.rh-link-disabled { cursor: not-allowed; }

.rh-tool .rh-tool-ico { width: 22px; height: 22px; display: block; }
.rh-tool .rh-tool-ico--active { display: none; }
.rh-tool.on .rh-tool-ico--default,
.rh-tool:active .rh-tool-ico--default { display: none; }
.rh-tool.on .rh-tool-ico--active,
.rh-tool:active .rh-tool-ico--active { display: block; }

.rh-select-ico { width: 20px; height: 20px; display: block; }
.rh-select-ico--active { display: none; }
.rh-select-circle.on .rh-select-ico--default { display: none; }
.rh-select-circle.on .rh-select-ico--active { display: block; }

/* 删除消息：使用设计稿的选消息状态图标，避免红色图标叠在红色圆底上 */
.rh-select-circle { border: 0; background: transparent; }
.rh-select-circle.on { border: 0; background: transparent; color: inherit; }

/* 16 分享作品浮层（覆盖通用 sheet 规则，保证标题顶对齐设计稿） */
#rhSheet.rh-sheet--share .rh-grab { margin-bottom: 3px; }
#rhSheet.rh-sheet--share .rh-s-sub { margin-bottom: 21px; }

/* ---------------------------------------------------------------- 17 选中删除态：右上角「取消」
   设计稿：高保真设计稿 / 04 对话页 · 长按 / 右键气泡-点击删除icon.png
   · 原来右上角的新建对话图标隐藏，同一位置换成 12px 的「取消」，颜色 rgba(0,0,0,.6)
   · 热区左右各留 12px（视觉位置不变，点起来更大） */
.content > img.rh-newchat.rh-hidden { visibility: hidden; }
.rh-select-cancel {
  position: absolute; top: 46px; right: 9px; z-index: 11;
  height: 24px; padding: 0 12px; border: 0; background: transparent;
  color: rgba(0, 0, 0, .6);
  font-family: "Microsoft Yahei", sans-serif;
  font-size: 12px; line-height: 24px; white-space: nowrap;
  text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rh-select-cancel:active { color: rgba(151, 0, 2, .8); }

/* 对话页底部栏固定到手机底部，不随 AI 输出内容高度移动 */
.phone-box.ai-chat-page .footer {
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  bottom: 27px;
  width: 100%;
}
.phone-box.ai-chat-page .home-container {
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  bottom: 0;
  width: 100%;
  margin: 0;
}

/* AI 消息操作栏与正文保持设计稿间距 */
.rh-chat.is-on .rh-msg-footer {
  margin-top: 6px;
}

/* 模式切换与输入区固定锚点：
   基础样式使用 relative top 参与文档流，欢迎语高度变化会把两者一起推到底部。
   直接相对 .phone-box 定位，避免改变 .content 的定位上下文、影响右上角新建对话按钮。 */
.phone-box.ai-chat-page .content .options {
  position: absolute;
  top: 638px;
  left: 20px;
}
.phone-box.ai-chat-page .content .search {
  position: absolute;
  top: 673px;
  left: -15px;
  width: 333px;
}
