/* 文案连续对话与原位修改确认：仅作用于 AI 文案和沉浸修改原型。 */
#copy .copy-history-panel{
  padding:0 18px 18px!important;
  background:linear-gradient(180deg,#fff 0%,#fcfbff 100%)!important;
}
#copy .dv-copy-session-history,
.dv-immersive-chat .uu-full-conversation{
  display:flex;
  flex-direction:column;
  min-height:0;
}
#copy .dv-copy-session-history{height:100%}
#copy .dv-copy-session-history .uu-full-conversation{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
  overflow:hidden;
}
#copy .dv-copy-session-history .dv-chat-empty{display:none!important}
.uu-conversation-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex:0 0 64px;
  height:64px;
  padding:0;
  border-bottom:1px solid #ece9f5;
}
.uu-conversation-head b{color:#29243a;font-size:14px}
#copy .dv-copy-session-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex:0 0 64px!important;
  height:64px!important;
  margin:0!important;
  padding:0!important;
  border-bottom:1px solid #ece9f5!important;
}
#copy .dv-copy-session-head b{color:#29243a!important;font-size:14px!important}
#copy .dv-copy-session-head small{display:none!important}
.uu-record-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  min-width:32px;
  height:32px;
  padding:0;
  border:1px solid #ddd7ea;
  border-radius:8px;
  background:#fff;
  color:var(--ui-brand-1,#6f3ff0);
  line-height:1;
  cursor:pointer;
}
.uu-record-toggle i{font-size:18px;font-style:normal;font-weight:500;line-height:1}
.uu-record-toggle:hover{background:var(--ui-surface-soft,#f7f4ff);border-color:var(--ui-brand-1,#6f3ff0)}
.uu-conversation-stream{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:14px 2px 5px;
  -ms-overflow-style:none;
  scrollbar-width:none;
}
.uu-conversation-stream::-webkit-scrollbar,
#copy .copy-history-panel .dv-chat-history::-webkit-scrollbar{display:none;width:0;height:0}
#copy .copy-history-panel .dv-chat-history{-ms-overflow-style:none;scrollbar-width:none}
.uu-conversation-day{
  margin:0 0 12px;
  color:#a19aaf;
  font-size:9px;
  text-align:center;
}
.uu-message{display:grid;gap:5px;margin-bottom:18px}
.uu-message:last-child{margin-bottom:0}
.uu-message.user{justify-items:end;padding-left:24px}
.uu-message.assistant{justify-items:start;padding-right:16px}
.uu-message-meta{display:flex;align-items:center;gap:6px;color:#958ea2;font-size:9px}
.uu-message.user .uu-message-meta{justify-content:flex-end}
.uu-message-body{
  max-width:100%;
  padding:10px 11px;
  border-radius:11px;
  color:#4b4657;
  font-size:11px;
  line-height:1.65;
  white-space:pre-wrap;
  word-break:break-word;
}
.uu-message-text{display:block;white-space:pre-wrap}
.uu-message.user .uu-message-body{
  border-bottom-right-radius:4px;
  background:linear-gradient(135deg,#6f56dc,#5e72e6);
  color:#fff;
}
.uu-message.assistant .uu-message-body{
  border:1px solid #ebe8f1;
  border-bottom-left-radius:4px;
  background:#f7f6fa;
}
.uu-message-selection{
  display:block;
  margin-bottom:6px;
  padding-left:7px;
  border-left:2px solid currentColor;
  opacity:.78;
  font-size:10px;
}
.uu-message-status{
  display:flex;
  width:max-content;
  margin-top:8px;
  padding:2px 6px;
  border-radius:999px;
  background:#ece9f5;
  color:#756d82;
  font-size:9px;
  font-weight:700;
}
.uu-message-status.pending{background:#eee9ff;color:#6548d4}
.uu-message-status.applied{background:#e4f7ed;color:#23805a}
.uu-message-status.discarded{background:#f2f0f3;color:#7b7482}
.uu-message-status.retried{background:#fff0db;color:#a36213}

#copy-editor .uu-rewrite-review,
.dv-immersive-editor .uu-rewrite-review{
  position:relative;
  display:block;
  width:85%;
  min-width:0;
  max-width:none;
  margin:14px 0 14px -14px;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#2f2a3d;
  cursor:default;
  user-select:text;
}
.uu-review-new{
  display:block;
  padding:14px 14px 13px;
  border:1px solid #dcd3ff;
  border-bottom:0;
  border-radius:13px 13px 0 0;
  background:linear-gradient(135deg,#f2efff 0%,#f7f8ff 100%);
  box-shadow:0 12px 28px rgba(76,57,147,.10);
}
.uu-review-copy{display:grid;gap:5px;min-width:0}
.uu-review-label{
  color:#684ed2;
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
}
.uu-review-new-text{color:#2b2637;font-size:15px;font-weight:400;line-height:1.85;white-space:pre-wrap}
.uu-review-actions{position:absolute;left:calc(100% + 10px);bottom:14px;display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:0}
.uu-review-actions button{
  width:64px;
  height:32px;
  padding:0 8px;
  border:1px solid #d8d1e7;
  border-radius:7px;
  background:#fff;
  color:#5e576b;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
  cursor:pointer;
}
.uu-review-actions button[data-uu-review-action="apply"]{
  border-color:transparent;
  background:var(--ui-brand-gradient,linear-gradient(135deg,#6f3ff0,#12bdd0));
  color:#fff;
  box-shadow:0 7px 16px color-mix(in srgb,var(--ui-brand-1,#6f3ff0) 20%,transparent);
}
.uu-review-actions button[data-uu-review-action="retry"]{
  display:inline-grid;
  place-items:center;
  width:64px;
  padding:0;
  color:var(--ui-brand-1,#6f3ff0);
  font-size:18px;
  line-height:1;
}
.uu-review-actions button[data-uu-review-action="retry"] span{transform:translateY(-1px)}
.uu-review-actions button:hover{transform:translateY(-1px);box-shadow:0 5px 12px rgba(59,45,109,.10)}
.uu-review-original{
  display:grid;
  gap:4px;
  padding:11px 14px 12px;
  border:1px solid #dcd3ff;
  border-top:1px solid #ece8f5;
  border-radius:0 0 13px 13px;
  background:#fbfafc;
  color:#898291;
  font-size:12px;
  line-height:1.65;
}
.uu-review-original .uu-review-label{color:#9a929f}
.uu-review-original-text{text-decoration:line-through;text-decoration-color:#c2bbc7;text-decoration-thickness:1px;white-space:pre-wrap}

.dv-immersive-chat .uu-full-conversation{height:100%}
.dv-immersive-copy-head,
.dv-immersive-chat .uu-conversation-head{
  box-sizing:border-box;
  flex:0 0 58px;
  height:58px;
  min-height:58px;
  padding:0 18px;
  border-bottom:1px solid #eceaf1;
  align-items:center;
}
.dv-immersive-copy-head b,
.dv-immersive-chat .uu-conversation-head b{font-size:15px;line-height:1.2}
.dv-immersive-chat .uu-record-toggle{display:none}
.dv-immersive-chat .uu-conversation-stream{padding:14px 15px}
.dv-immersive-chat .dv-chat-head,.dv-immersive-chat>.dv-chat-history{display:none!important}
.dv-selection-tools:not(.uu-waiting-decision){cursor:grab!important}
.dv-selection-tools.is-dragging:not(.uu-waiting-decision){cursor:grabbing!important}
#copy .rewrite-panel.uu-waiting-decision,
.dv-selection-tools.uu-waiting-decision{opacity:.58!important;pointer-events:none!important}
.dv-selection-tools.uu-waiting-decision{cursor:default!important}
#copy-editor.uu-pending-locked,
.dv-immersive-editor.uu-pending-locked{caret-color:transparent;user-select:none!important}
#copy-editor.uu-pending-locked .uu-rewrite-review,
.dv-immersive-editor.uu-pending-locked .uu-rewrite-review{user-select:none!important}
#copy-editor.uu-pending-locked [data-uu-review-action],
.dv-immersive-editor.uu-pending-locked [data-uu-review-action]{pointer-events:auto!important}
.dv-selection-tools>.dv-quick-rewrite{
  display:flex!important;
  justify-content:flex-end!important;
  justify-self:stretch!important;
  flex-wrap:wrap!important;
  gap:10px!important;
}
.dv-selection-tools>.dv-quick-rewrite button{flex:0 0 auto!important}
.dv-selection-tools>.dv-rewrite-entry{column-gap:12px!important}

#copy .copy-edit-actions [data-copy-immersive]{
  background:var(--ui-brand-gradient,linear-gradient(135deg,#6f3ff0,#12bdd0))!important;
}

#copy .copy-revised{
  overflow-anchor:none;
}
#copy .copy-revised .copy-editor,
#copy .copy-revised .copy-history-panel{overflow-anchor:none}

#copy .copy-revised.uu-record-collapsed{
  grid-template-columns:minmax(0,1fr) 44px!important;
}
#copy .copy-revised.uu-record-collapsed .copy-history-panel{
  width:44px!important;
  min-width:44px!important;
  padding:0!important;
  border-radius:12px!important;
}
#copy .copy-revised.uu-record-collapsed .dv-copy-session-history{width:44px!important}
#copy .copy-revised.uu-record-collapsed .uu-conversation-head,
#copy .copy-revised.uu-record-collapsed .dv-copy-session-head{justify-content:center!important;padding:0!important}
#copy .copy-revised.uu-record-collapsed .uu-record-toggle{
  width:32px;
  min-width:32px;
  height:32px;
  padding:0;
}
#copy .copy-revised.uu-record-collapsed .uu-conversation-head b,
#copy .copy-revised.uu-record-collapsed .dv-copy-session-head b,
#copy .copy-revised.uu-record-collapsed .uu-conversation-stream,
#copy .copy-revised.uu-record-collapsed .dv-chat-history{display:none!important}

@media (max-width:1180px){
  #copy-editor .uu-rewrite-review,
  .dv-immersive-editor .uu-rewrite-review{width:calc(100% - 82px);min-width:0}
}
