

.ms-sheet.pa-conversation {
  inset:auto 0 0;
  height:85%; min-height:0; max-height:85%;
  background:var(--bg-surface);
  border-radius:var(--radius-card) var(--radius-card) 0 0;
  box-shadow:var(--elev-3);
  animation:msRise var(--dur-slow) var(--ease-out);
}
.pa-conversation .pa-chat-header {
  padding:var(--space-2) var(--space-4) var(--space-3);
  gap:var(--space-2); border-bottom:var(--line-card); background:var(--bg-surface);
}
.pa-chat-header .ms-avatar { width:32px; height:32px; }
.pa-chat-header .ms-name { display:flex; align-items:baseline; gap:var(--space-1); }
.pa-chat-header .ms-name span { font-size:var(--font-aux); font-weight:400; color:var(--text-weak); }
.pa-plan-toggle {
  display:inline-flex; align-items:center; gap:var(--space-1); min-height:32px;
  padding:0 var(--space-2); color:var(--text-weak); font-size:var(--font-aux);
  border:0; background:none; border-radius:var(--radius-md); white-space:nowrap;
}
.pa-plan-toggle svg,.pa-plan-editor summary svg,.pa-more-actions summary svg,.pa-history-card summary svg {
  flex:none; width:16px; height:16px;
}
.pa-chat-header .ms-close { width:32px; height:32px; }
.pa-conversation .pa-conversation-body { min-height:0; flex:1 1 auto; }
.pa-conversation .pa-message-list {
  min-width:0; flex:1 1 auto; width:100%;
  padding:var(--space-4) var(--space-page) var(--space-page);
  scroll-padding-block:var(--space-page);
}
.pa-conversation .ms-chat { align-items:stretch; gap:var(--space-4); }
.pa-conversation .pa-message { margin:0; width:100%; flex:none; }
.pa-conversation .pa-message--event:empty { display:none; }
.pa-conversation .pa-message--mia .ms-bot { color:var(--text-body); font-size:var(--font-emphasis); line-height:var(--line-height-chat); }
.pa-conversation .pa-message--user .ms-user {
  max-width:82%; background:var(--bg-fill); color:var(--text-body);
  border-radius:var(--radius-lg); padding:var(--space-2) var(--space-3); font-size:var(--font-emphasis);
}
.pa-conversation .ms-chat-meta { align-self:center; color:var(--text-weak); margin:0; font-variant-numeric:tabular-nums; }
.pa-end-space { width:1px; height:1px; flex:none; }
.pa-conversation .pa-plan-view { background:var(--bg-page); }
.pa-conversation .pa-card { min-width:0; align-self:stretch; overflow:visible; }
.pa-conversation .pa-card-actions {
  display:flex; flex-wrap:wrap; gap:var(--space-2); margin-top:var(--space-3);
}
.pa-conversation .pa-card-actions .pa-main-action {
  width:100%; flex:1 0 100%; min-height:40px; height:auto;
  padding:var(--space-2) var(--space-3); font-size:var(--font-body);
  background:var(--grad-btn-primary); box-shadow:var(--shadow-btn-primary); color:var(--text-primary);
}
.pa-conversation .pa-card-actions .pa-alt-action {
  width:auto; flex:1 1 42%; min-height:36px; height:auto; line-height:1.4;
  padding:var(--space-2) var(--space-3); border:var(--line-card); border-radius:var(--radius-md);
  color:var(--text-body); background:var(--bg-surface); font-size:var(--font-aux);
}
.pa-plan-editor,.pa-more-actions {
  width:100%; margin-top:var(--space-3); color:var(--text-weak); border-top:var(--line-card);
}
.pa-plan-editor > summary,.pa-more-actions > summary,.pa-history-card > summary {
  list-style:none; display:flex; align-items:center; gap:var(--space-2);
  padding:var(--space-2) 0; cursor:pointer; line-height:1.5; font-size:var(--font-aux);
}
.pa-plan-editor > summary::-webkit-details-marker,.pa-more-actions > summary::-webkit-details-marker,.pa-history-card > summary::-webkit-details-marker { display:none; }
.pa-plan-editor > summary svg:last-child,.pa-more-actions > summary svg { margin-left:auto; }
.pa-conversation .pa-history-card {
  width:100%; margin-top:var(--space-2); border:var(--line-card); border-radius:var(--radius-lg);
  background:var(--bg-page); overflow:hidden;
}
.pa-conversation .pa-history-card > summary { justify-content:space-between; color:var(--text-weak); padding:var(--space-2) var(--space-3); }
.pa-history-card[open] > summary svg { transform:rotate(90deg); }
.pa-history-card .pa-card { margin:0; border:0; border-radius:0; box-shadow:none; }
.pa-history-card .pa-card-actions { display:none; }
.pa-conversation .pa-fields { margin-top:var(--space-3); }
.pa-conversation .pa-fields select { width:100%; min-width:0; max-width:none; }
.pa-conversation .pa-composer {
  flex:none; padding:0; background:var(--bg-surface); border-top:var(--line-card);
}
.pa-conversation .pa-choices {
  display:flex; flex-wrap:nowrap; gap:var(--space-2);
  padding:var(--space-2) var(--space-page) 0; margin:0; overflow:auto; scrollbar-width:none;
}
.pa-conversation .pa-choices:empty,.pa-composer[hidden],#pa-incoming[hidden] { display:none; }
.pa-conversation .pa-suggestion { min-height:32px; max-width:76%; height:auto; padding:var(--space-1) var(--space-3); line-height:1.45; font-size:var(--font-aux); }
.pa-conversation .pa-input-row.ms-inputrow {
  align-items:flex-end; padding:var(--space-2) var(--space-page) var(--space-4);
  gap:var(--space-2); background:none; border:0; border-radius:0;
}
.pa-conversation .pa-input.ms-input {
  box-sizing:border-box; height:auto; min-height:40px; max-height:96px; display:block;
  padding:9px var(--space-4); background:var(--bg-fill); border:var(--line-card); border-radius:var(--radius-lg);
  font:inherit; font-size:var(--font-body); line-height:1.55; resize:none; overflow-y:auto;
}
.pa-conversation .pa-input:focus-visible { border-color:var(--color-accent-deep); }
.pa-conversation .pa-send.ms-send {
  align-self:flex-end; flex:none; width:40px; height:40px; margin:0; padding:0;
  background:var(--color-primary); border-radius:50%; color:var(--text-primary);
}
.pa-send svg { width:20px; height:20px; }
.pa-conversation .pa-send:disabled { background:var(--bg-fill); color:var(--text-secondary); }
.pa-thinking-dots { display:inline-flex; align-items:center; gap:var(--space-1); height:28px; }
.pa-thinking-dots i { width:6px; height:6px; border-radius:50%; background:var(--text-secondary); animation:pa-think 1s ease-in-out infinite; }
.pa-thinking-dots i:nth-child(2) { animation-delay:.14s; }.pa-thinking-dots i:nth-child(3) { animation-delay:.28s; }
@keyframes pa-think { 0%,70%,100% { opacity:.45; transform:translateY(0); } 35% { opacity:1; background:var(--color-primary); transform:translateY(-3px); } }

 
#pa-incoming { position:absolute; z-index:55; top:calc(var(--safe-top) + var(--space-1)); left:var(--space-3); right:var(--space-3); }
.pa-notice {
  display:block; width:100%; text-align:left; cursor:pointer; font:inherit;
  padding:var(--space-4); border:var(--line-card); border-radius:var(--radius-card);
  color:var(--text-body); background:var(--bg-surface); box-shadow:var(--elev-3);
  animation:notice-arrives var(--dur-slow) var(--ease-out);
}
@keyframes notice-arrives { from { transform:translateY(-12px); opacity:0; } to { transform:translateY(0); opacity:1; } }
.pa-notice-brand { display:flex; align-items:center; gap:var(--space-2); color:var(--text-weak); font-size:var(--font-aux); font-weight:500; }
.pa-notice-brand .ms-avatar { width:25px; height:25px; }
.pa-notice-brand small { margin-left:auto; font-weight:400; font-size:var(--font-caption); color:var(--text-secondary); }
.pa-notice > strong { display:block; margin:var(--space-2) 0 var(--space-1); font-size:var(--font-title); line-height:1.45; font-weight:600; color:var(--text-primary); }
.pa-notice-text { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; font-size:var(--font-body); line-height:1.55; }
.pa-notice-open { display:flex; justify-content:flex-end; align-items:center; gap:2px; margin-top:var(--space-2); font-size:var(--font-aux); font-weight:500; line-height:1.5; color:var(--text-weak); }
.pa-notice-open svg { width:14px; height:14px; }
.pa-notice-plot { display:block; margin-top:var(--space-2); pointer-events:none; }
.pa-notice-plot .pui-weight-chart { padding:var(--space-2); margin:0; }
.pa-notice-plot .pui-measure-head,.pa-notice-plot .pui-chart-caption { display:none; }
.pa-notice-plot svg { display:block; width:100%; max-height:82px; }
@media (prefers-reduced-motion:reduce) {
  .pa-notice,.ms-sheet.pa-conversation,.pa-conversation .pa-message,.pa-thinking-dots i { animation:none; }
}
.pa-extra-replies { width:100%; margin:var(--space-2) 0 0; }
.pa-extra-replies > summary { list-style:none; display:inline-flex; align-items:center; gap:var(--space-1); cursor:pointer; color:var(--text-weak); font-size:var(--font-aux); padding:var(--space-1) 0; }
.pa-extra-replies > summary::-webkit-details-marker { display:none; }
.pa-extra-replies > summary svg { width:14px; height:14px; }
.pa-extra-replies .pa-suggestion { max-width:100%; }
