/* 逐条冒出：隐藏态（占位不可见，布局已定，绝不顶旧消息） */
.wx-bubble-outer.seq-hidden {
  visibility: hidden;
}
/* 显形动画：从左上角往右下角极速轻快展开 */
.wx-bubble-outer.seq-reveal .wx-msg-bubble-item {
  transform-origin: top left;
  animation: seqExpandCorner 0.16s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes seqExpandCorner {
  0% { opacity: 0; transform: scale(0.6); }
  100% { opacity: 1; transform: scale(1); }
}

/* ======================================================== */
/* Chat 单聊核心对话区 (纯黑灰中性典藏版)                    */
/* ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Caveat:wght@600;700&family=Pinyon+Script&display=swap');

.wx-chat-room-stage {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background-color: #ffffff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 20 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  touch-action: pan-y;
}

/* =========================================================
   1. 纯白极简顶栏
========================================================= */
.wx-cr-header {
  position: relative;
  height: calc(56px + var(--safe-top));
  padding-top: var(--safe-top);
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 10px;
  padding-right: 12px;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 20;
}
@media (display-mode: standalone) {
  .wx-cr-header {
    padding-top: calc(var(--safe-top) + 6px);
  }
}

.wx-cr-left-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  z-index: 20;
}

.wx-cr-back-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  cursor: pointer;
  padding: 0;
}
.wx-cr-back-btn:active {
  opacity: 0.4;
}
.wx-cr-back-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.salon-avatar-badge {
  position: relative;
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0;
  cursor: pointer;
}
.salon-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  object-fit: cover;
  background: #f7f7f8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #8e8e93;
}

.wx-cr-title-col {
  position: static;
  transform: none;
  flex: 1;
  min-width: 0;
  margin: 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  z-index: 20;
}

.char-glitch-name-dark {
  font-size: 19px;
  font-weight: 900;
  color: #111111;
  letter-spacing: 1.2px;
  display: inline-block;
  user-select: none;
  animation: darkGlitchGlow 4.5s ease-in-out infinite;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.char-signature-sub {
  font-size: 12px;
  color: #777777;
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.2;
}

.typing-status-bar {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  color: #777777;
  font-family: monospace;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.typing-status-bar.show {
  display: flex;
  animation: typingFadeIn 0.25s ease;
}

@keyframes typingFadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

.typing-dots {
  display: flex;
  align-items: center;
  gap: 2px;
}
.typing-dots span {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: #777777;
  animation: dotPulse 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

.wx-cr-right-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  z-index: 20;
  height: 34px;
}

.cr-header-icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  cursor: pointer;
  padding: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.cr-header-icon-btn:active {
  transform: scale(0.88);
  opacity: 0.5;
}
.cr-header-icon-btn svg {
  width: 24px;
  height: 24px;
}

.wx-cr-right-group .cr-header-icon-btn:first-child {
  width: 30px; height: 30px;
}
.wx-cr-right-group .cr-header-icon-btn:first-child svg {
  width: 20px; height: 20px;
}

/* =========================================================
   2. 聊天消息区
========================================================= */
.wx-cr-body {
  flex: 1 !important;
  width: 100% !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px 24px !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  box-sizing: border-box;
  background: transparent !important;
  background-color: transparent !important;
}

.wx-cr-body::-webkit-scrollbar {
  display: none;
}

.wx-msg-time-pill,
.wx-msg-system-pill {
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  color: #777777;
  background: rgba(245, 245, 247, 0.9);
  padding: 3px 10px;
  border-radius: 10px;
  line-height: 1.2;
  user-select: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.wx-msg-error-detail {
  align-self: center;
  max-width: 88%;
  font-size: 11.5px;
  color: #c94a4a;
  background: #fdf2f2;
  border: 1px dashed rgba(201, 74, 74, 0.35);
  border-radius: 8px;
  padding: 6px 12px;
  line-height: 1.45;
  box-sizing: border-box;
  text-align: center;
  margin: 4px 0;
  user-select: none;
}

.wx-msg-group {
  display: flex;
  gap: 8px;
  width: 100%;
}
.wx-msg-group.user-side {
  flex-direction: row-reverse;
}

.wx-msg-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  color: #111111;
  cursor: pointer;
}
.wx-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wx-msg-bubbles-col {
  max-width: calc(100% - 104px) !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wx-msg-group.user-side .wx-msg-bubbles-col {
  align-items: flex-end;
}

.wx-bubble-outer {
  position: relative !important;
  width: fit-content !important;
  max-width: 100% !important;
}

.wx-msg-bubble-item {
  position: relative !important;
  padding: 11px 16px !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-width: 2em !important;
  word-break: break-word !important;
  border-radius: 18px !important;
  border: none !important;
  box-sizing: border-box !important;
  color: #1e242c !important;
  background-color: #ffffff !important;
  background-image: radial-gradient(ellipse 75% 65% at 50% 50%, rgba(195, 204, 216, 0.85) 0%, rgba(222, 228, 236, 0.45) 45%, #ffffff 85%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.wx-msg-group.user-side .wx-msg-bubble-item {
  color: #1a2b3c !important;
  background-color: #ffffff !important;
  background-image: radial-gradient(ellipse 75% 65% at 50% 50%, rgba(175, 210, 242, 0.72) 0%, rgba(212, 232, 252, 0.35) 45%, #ffffff 85%) !important;
  box-shadow: 0 2px 8px rgba(70, 120, 180, 0.08) !important;
}

/* 像素星云装饰 */
.rz8-dc {
  position: absolute !important;
  pointer-events: none !important;
  z-index: 20 !important;
  image-rendering: pixelated !important;
}

.rz8-dc.rz8-bl-cloud {
  bottom: -9px !important; 
  left: -11px !important;
  width: 22px !important; 
  height: 18px !important;
}
.rz8-cloud-silver {
  position: absolute !important;
  top: 4px !important; 
  left: 2px !important;
  width: 2px !important; 
  height: 2px !important;
  background: transparent !important;
  box-shadow:
    4px 0px 0 #9ca8b8, 6px 0px 0 #9ca8b8, 8px 0px 0 #9ca8b8,
    2px 2px 0 #9ca8b8, 4px 2px 0 #ffffff, 6px 2px 0 #ffffff, 8px 2px 0 #ffffff, 10px 2px 0 #9ca8b8,
    0px 4px 0 #7e8b9d, 2px 4px 0 #ffffff, 4px 4px 0 #ffffff, 6px 4px 0 #ffffff,
    8px 4px 0 #ffffff, 10px 4px 0 #ffffff, 12px 4px 0 #9ca8b8,
    0px 6px 0 #7e8b9d, 2px 6px 0 #ffffff, 4px 6px 0 #ffffff, 6px 4px 0 #ffffff,
    8px 6px 0 #ffffff, 10px 6px 0 #ffffff, 12px 6px 0 #9ca8b8,
    2px 8px 0 #7e8b9d, 4px 8px 0 #7e8b9d, 6px 8px 0 #7e8b9d,
    8px 8px 0 #7e8b9d, 10px 8px 0 #7e8b9d !important;
}
.rz8-star-silver-tr {
  position: absolute !important;
  top: 0px !important; 
  right: 0px !important;
  width: 2px !important; 
  height: 2px !important;
  background: #ffffff !important;
  box-shadow:
    0px -2px 0 #9ca8b8, 0px 2px 0 #9ca8b8,
    -2px 0px 0 #9ca8b8, 2px 0px 0 #9ca8b8 !important;
}
.rz8-dot-silver-bl {
  position: absolute !important;
  bottom: 2px !important; 
  left: 1px !important;
  width: 2px !important; 
  height: 2px !important;
  background: #7e8b9d !important;
}

.rz8-dc.rz8-br-cloud {
  bottom: -11px !important; 
  right: -13px !important;
  width: 22px !important; 
  height: 18px !important;
}
.rz8-cloud-blue-gray {
  position: absolute !important;
  top: 4px !important; 
  left: 2px !important;
  width: 2px !important; 
  height: 2px !important;
  background: transparent !important;
  box-shadow:
    4px 0px 0 #96a9bc, 6px 0px 0 #96a9bc, 8px 0px 0 #96a9bc,
    2px 2px 0 #96a9bc, 4px 2px 0 #ffffff, 6px 2px 0 #ffffff, 8px 2px 0 #ffffff, 10px 2px 0 #96a9bc,
    0px 4px 0 #778b9e, 2px 4px 0 #ffffff, 4px 4px 0 #ffffff, 6px 4px 0 #ffffff,
    8px 4px 0 #ffffff, 10px 4px 0 #ffffff, 12px 4px 0 #96a9bc,
    0px 6px 0 #778b9e, 2px 6px 0 #ffffff, 4px 6px 0 #ffffff, 6px 4px 0 #ffffff,
    8px 6px 0 #ffffff, 10px 6px 0 #ffffff, 12px 6px 0 #96a9bc,
    2px 8px 0 #778b9e, 4px 8px 0 #778b9e, 6px 8px 0 #778b9e,
    8px 8px 0 #778b9e, 10px 8px 0 #778b9e !important;
}
.rz8-star-blue-gray-tl {
  position: absolute !important;
  top: 0px !important; 
  left: 0px !important;
  width: 2px !important; 
  height: 2px !important;
  background: #ffffff !important;
  box-shadow:
    0px -2px 0 #96a9bc, 0px 2px 0 #96a9bc,
    -2px 0px 0 #96a9bc, 2px 0px 0 #96a9bc !important;
}
.rz8-dot-blue-gray-br {
  position: absolute !important;
  bottom: 2px !important; 
  right: 1px !important;
  width: 2px !important; 
  height: 2px !important;
  background: #778b9e !important;
}

.bilingual-newline-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}
.bilingual-main-text {
  width: 100%;
  line-height: 1.45;
  color: inherit !important;
}
.bilingual-divider-dash {
  width: 100%;
  height: 0;
  border-bottom: 1px dashed rgba(100, 116, 139, 0.25) !important;
  margin: 3px 0;
}
.wx-msg-group.user-side .bilingual-divider-dash {
  border-bottom-color: rgba(70, 120, 180, 0.3) !important;
}

.bilingual-trans-text {
  font-size: 13.5px;
  line-height: 1.4;
  color: #334155 !important;
  opacity: 1 !important;
}
.wx-msg-group.user-side .bilingual-trans-text {
  color: #1e293b !important;
  opacity: 1 !important;
}

.font-caveat {
  font-family: 'Caveat', cursive, sans-serif !important;
  font-style: normal !important;
  font-size: 16.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
}
.font-pinyon {
  font-family: 'Pinyon Script', cursive, serif !important;
  font-style: normal !important;
  font-size: 17.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0.5px !important;
  line-height: 1.3 !important;
}
.font-alex {
  font-family: 'Alex Brush', cursive, serif !important;
  font-style: normal !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  letter-spacing: 0.4px !important;
  line-height: 1.3 !important;
}

.bubble-tail-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  padding: 0 4px;
  width: 100%;
  box-sizing: border-box;
}

.bubble-tail-timestamp {
  font-size: 10px;
  font-family: monospace;
  color: #000000 !important;
  user-select: none;
}
.bubble-tail-floor-num,
.bubble-tail-real-time {
  color: #000000 !important;
}
.wx-msg-group.user-side .bubble-tail-timestamp {
  text-align: right;
  margin-left: auto;
}

.msg-swipe-nav-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1px 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.msg-swipe-btn {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: bold;
  color: #111111;
  cursor: pointer;
  padding: 1px 3px;
  line-height: 1;
}
.msg-swipe-btn:active {
  opacity: 0.4;
}
.msg-swipe-num {
  font-family: monospace;
  font-size: 10px;
  font-weight: 800;
  color: #555555;
}

.wx-msg-quote-bar {
  font-size: 12px;
  color: #555555;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px 8px;
  border-left: 2px solid #111111;
  border-radius: 2px;
  margin-bottom: 3px;
}
.wx-msg-group.user-side .wx-msg-quote-bar {
  border-left-color: #7a9ab8;
  color: #555555;
  background: rgba(70, 120, 180, 0.08);
}

/* 💡 小爱心专属绝对防穿透层级 */
.voice-heart-trigger {
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px !important;
  height: 32px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111111;
  z-index: 35 !important;
  pointer-events: auto !important;
}
.voice-heart-trigger:active {
  transform: translateY(-50%) scale(1.3);
}
.voice-heart-trigger svg {
  width: 14px;
  height: 14px;
  fill: #111111;
  pointer-events: none;
}

/* =========================================================
   💡 真实生活照片卡片（彻底还原 1:1 正方形高清原画比例）
========================================================= */
.wx-msg-bubble-item.is-photo-bubble {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.wx-real-photo-card {
  position: relative;
  width: 200px !important;
  height: 200px !important;          /* 💡 彻底还原 1:1 正方形，绝无裁切与压扁！ */
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  background: #f8fafc;
  flex-shrink: 0;
}
.wx-real-photo-card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}
.photo-expand-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}
.photo-expand-badge svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.wx-photo-loading-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  width: 200px;
  height: 70px;
  box-sizing: border-box;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  font-size: 12px;
  color: #475569;
}
.photo-loading-spinner { font-size: 18px; }
.photo-loading-info { display: flex; flex-direction: column; gap: 2px; }
.photo-loading-info b { font-family: monospace; color: #111111; font-size: 13px; }

.wx-photo-fallback-card {
  cursor: pointer;
  padding: 12px 14px;
  background: #fdf2f2;
  border: 1px dashed #f87171;
  border-radius: 12px;
  font-size: 12px;
  color: #b91c1c;
}

/* =========================================================
   3. 长按消息悬浮菜单
========================================================= */
.cr-ctx-menu-mask {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 99 !important;
  display: none;
  pointer-events: none;
}
.cr-ctx-menu-mask.show {
  display: block;
  pointer-events: auto;
}

.cr-ctx-menu {
  position: fixed;
  width: 250px !important;
  background: #1c1c1e;
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 100 !important;
  transform: translate(-50%, -100%);
  margin-top: -12px;
  box-sizing: border-box;
  animation: ctxMenuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.cr-ctx-menu-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 4px !important;
  width: 100% !important;
}

@keyframes ctxMenuPop {
  from { opacity: 0; transform: translate(-50%, -90%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}

.cr-ctx-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 5px 0 !important;
  width: 100% !important;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  user-select: none;
}
.cr-ctx-item:active {
  background: rgba(255, 255, 255, 0.15);
}
.cr-ctx-item svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* =========================================================
   4. 向上弹出的多功能菜单
========================================================= */
.upward-tray-overlay {
  position: absolute;
  bottom: calc(58px + var(--safe-bottom));
  left: 10px;
  right: 10px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 20px;
  padding: 10px 4px 6px;
  z-index: 70 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.96);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.upward-tray-overlay.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.tray-slider-container {
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  scrollbar-width: none;
}
.tray-slider-container::-webkit-scrollbar {
  display: none;
}

.tray-page-grid {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 14px 6px;
  scroll-snap-align: start;
}

.tray-btn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.tray-btn-item:active {
  opacity: 0.5;
}

.tray-icon-pure {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(245, 245, 247, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s;
}
.tray-icon-pure svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.tray-label-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #444444;
  letter-spacing: 0.2px;
}

.tray-pagination {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.tray-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d1d1d6;
  transition: all 0.2s;
}
.tray-dot.active {
  width: 12px;
  border-radius: 2px;
  background: #111111;
}

/* =========================================================
   5. 底部输入栏
========================================================= */
.input-voice-btn {
  position: absolute;
  right: 6px;
  bottom: 5px;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
  color: #8a8a8e;
  cursor: pointer;
  padding: 0;
}
.input-voice-btn.show {
  display: flex;
}
.input-voice-btn:active {
  opacity: 0.5;
}
.input-voice-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* 聚焦时给输入框右侧留出语音按钮的空间 */
.input-capsule-glass:focus-within {
  padding-right: 36px !important;
}

/* 加号按钮彻底恢复饱满原生大尺寸 */
.pure-plus-outer {
  width: 32px !important;
  height: 38px !important;
  margin-left: 2px !important;
  margin-right: -6px !important; /* 与发送键紧贴 */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}
.pure-plus-outer svg {
  width: 30px !important;
  height: 30px !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
}
.pure-plus-outer.open svg {
  transform: rotate(45deg) !important;
  transition: transform 0.25s ease !important;
}

/* 左侧软萌表情包图标尺寸微调 */
.pure-emoji-outer {
  width: 34px !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: -2px !important;
}
.pure-emoji-outer svg {
  width: 30px !important;
  height: 30px !important;
}

.pure-send-balloon-btn svg {
  width: 34px !important;
  height: 34px !important;
}

.chat-footer-clean {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 4px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
  flex-shrink: 0;
  position: relative;
  z-index: 40;
  box-sizing: border-box;
}

@media (display-mode: standalone) {
  .chat-footer-clean {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px)) !important;
  }
}

.input-bar-wrap,
.input-bar-wrap::before,
.input-bar-wrap::after {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.input-bar-wrap {
  display: flex;
  align-items: flex-end;
  gap: 4px !important;
  min-height: 44px;
  background: transparent !important;
  padding-bottom: 2px;
}

.pure-icon-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.pure-icon-btn:active {
  opacity: 0.4;
}
.pure-icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.input-capsule-glass {
  flex: 1 1 auto !important;
  min-height: 38px;
  max-height: 120px;
  background: #f8f8fa;
  border: 1px solid #e5e5ea;
  border-radius: 19px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.input-field-inner {
  width: 100%;
  min-height: 22px;
  height: auto;
  max-height: 100px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14.5px;
  color: #111111;
  font-family: inherit;
  resize: none;
  line-height: 1.4;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-user-select: text;
  user-select: text;
  overflow-y: auto;
}
.input-field-inner::-webkit-scrollbar {
  display: none;
}
.input-field-inner::placeholder {
  color: #8e8e93;
}

.pure-plus-trigger {
  width: 32px;
  height: 38px;
  margin-left: 2px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.pure-plus-trigger.open {
  transform: rotate(45deg);
}
.pure-plus-trigger svg {
  width: 26px !important;
  height: 26px !important;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.pure-send-balloon-btn {
  width: 38px !important;
  height: 38px !important;
  background: transparent !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  opacity: 1 !important;
  transition: transform 0.15s ease;
}
.pure-send-balloon-btn:active {
  transform: scale(0.88);
}
.pure-send-balloon-btn svg {
  width: 28px;
  height: 28px;
}
.pure-send-balloon-btn svg path {
  stroke: #2a2a2a !important;
}
/* 🌟 打字停止态也锁定纯黑 */
.pure-send-balloon-btn.is-stop-mode svg circle {
  stroke: #000000 !important;
}
.pure-send-balloon-btn.is-stop-mode svg rect {
  fill: #000000 !important;
}

/* =========================================================
   6. 双栏心声手账卡片
========================================================= */
.voice-transparent-wrap {
  position: absolute;
  inset: 0;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.voice-transparent-wrap.show {
  opacity: 1;
  pointer-events: auto;
}

.voice-dossier-card {
  width: 100%;
  max-width: 326px;
  background: #ffffff !important;
  border-radius: 20px;
  padding: 22px 18px 18px;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12) !important;
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.voice-transparent-wrap.show .voice-dossier-card { transform: scale(1); pointer-events: auto; }

.card-tape-deco {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 12px;
  background: rgba(240, 240, 242, 0.7);
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.card-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
}

.card-page-arrow {
  background: none;
  border: none;
  font-size: 14px;
  color: #111111;
  cursor: pointer;
  padding: 2px 6px;
  font-weight: bold;
}
.card-page-arrow:active {
  opacity: 0.5;
}

.card-serial-code { font-size: 11px; font-weight: 800; color: #111111; letter-spacing: 1px; font-family: monospace; }
.card-close-btn { background: none; border: none; font-size: 15px; color: #8e8e93; cursor: pointer; padding: 2px; }

.voice-monologue-sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.voice-quote-text {
  font-size: 14.5px;
  font-weight: 600;
  color: #111111;
  line-height: 1.6;
  letter-spacing: 0.5px;
  font-style: italic;
  padding: 2px 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.voice-heart-pulse-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  color: #8e8e93;
  margin-top: 2px;
}
.voice-heart-pulse-bar .line { flex: 1; height: 1px; background: rgba(0, 0, 0, 0.1); }
.voice-heart-pulse-bar svg { width: 12px; height: 12px; fill: #111111; flex-shrink: 0; }

.voice-lower-columns {
  display: flex;
  gap: 12px;
  width: 100%;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 6px 0 !important;
  box-sizing: border-box;
}

.col-action, .col-wish {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.col-action {
  border-right: 1px dashed rgba(0, 0, 0, 0.15) !important;
  padding-right: 10px;
}
.col-wish {
  padding-left: 2px;
}

.col-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #555555;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 4px;
}
.col-title::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #111111;
}

.action-detail-text {
  font-size: 12.5px;
  color: #222222;
  line-height: 1.55;
  font-weight: 500;
}

.card-footer-sec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
}
.card-timestamp-sub {
  font-size: 10px;
  color: #8e8e93;
  font-family: monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.card-motto-sub {
  font-size: 12px;
  font-weight: 800;
  color: #111111;
  letter-spacing: 2.5px;
  text-indent: 2.5px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Songti SC", serif;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-motto-sub::before,
.card-motto-sub::after {
  content: '✦';
  font-size: 8px;
  color: #777777;
}

/* =========================================================
   7. 全屏手札编辑弹窗
========================================================= */
.cr-expand-modal-mask {
  position: fixed !important;
  inset: 0 !important;
  background: transparent !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px 16px !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
.cr-expand-modal-mask.show {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.cr-expand-modal-panel {
  width: 100% !important;
  max-width: 330px !important;
  height: 42vh !important;
  max-height: 290px !important;
  min-height: 240px !important;
  background: #ffffff !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
.cr-expand-modal-mask.show .cr-expand-modal-panel {
  transform: scale(1) !important;
}

.cr-expand-header {
  padding: 14px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.12);
  background: #fbfbfc;
  flex-shrink: 0;
}
.cr-expand-title {
  font-size: 15px;
  font-weight: 800;
  color: #111418;
  letter-spacing: 0.5px;
}
.cr-expand-back-btn,
.cr-expand-done-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
}
.cr-expand-back-btn {
  color: #8e8e93;
  display: flex;
  align-items: center;
}
.cr-expand-back-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}
.cr-expand-done-btn {
  font-size: 13.5px;
  font-weight: 800;
  color: #111111;
  letter-spacing: 0.5px;
}
.cr-expand-done-btn:active {
  opacity: 0.4;
}

.cr-expand-body {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cr-expand-textarea {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  color: #111111;
  line-height: 1.6;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-user-select: text;
  user-select: text;
}
.cr-expand-textarea::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.cr-expand-footer {
  padding: 10px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  background: #fbfbfc;
  flex-shrink: 0;
}
.cr-expand-count {
  font-size: 11px;
  font-family: monospace;
  color: #8e8e93;
}
.cr-expand-clear-btn {
  border: none;
  background: transparent;
  font-size: 11.5px;
  color: #c94a4a;
  cursor: pointer;
  padding: 2px 4px;
  font-weight: 600;
}

/* =========================================================
   图片查看器（零内联CSS版）
========================================================= */
.img-viewer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  touch-action: none;
}

.img-viewer-photo {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.img-viewer-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.img-viewer-pill-btn {
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.img-viewer-pill-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.95);
}

.img-viewer-info-panel {
  display: none;
  margin-top: 8px;
  max-width: 100%;
  max-height: 25vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  box-sizing: border-box;
}

.img-viewer-info-panel.show {
  display: block;
}

.img-viewer-info-model {
  font-size: 11px;
  color: #8e8e93;
  font-family: monospace;
  margin-bottom: 6px;
}

.img-viewer-info-prompt {
  font-size: 11px;
  color: #e0e0e0;
  font-family: monospace;
  line-height: 1.5;
  word-break: break-all;
  -webkit-user-select: text;
  user-select: text;
}

.img-viewer-hidden-link {
  display: none;
}

.img-viewer-hidden-textarea {
  position: fixed;
  left: -9999px;
  opacity: 0;
}
