.explication-dialogues { min-width: 0; display: grid; gap: 16px; }
.explication-dialogues > .chat-panel { position: static; }
.pd-panel { border: 1px solid var(--paper-3, #d9ddd5); border-radius: 12px; background: var(--white, #fff); color: var(--ink, #23392e); overflow: hidden; }
.pd-panel > summary { padding: 16px; cursor: pointer; font-weight: 700; background: var(--accent-soft, #eef4ef); }
.pd-panel > summary span { display: block; margin: 4px 0 0 19px; font-size: .82rem; font-weight: 400; }
.pd-body { padding: 16px; }
.pd-label { display: block; font-weight: 600; margin-bottom: 6px; }
.pd-body select, .pd-input { width: 100%; max-width: 100%; box-sizing: border-box; font: inherit; color: inherit; padding: 10px; border: 1px solid var(--paper-3, #c5cfc5); border-radius: 8px; background: var(--white, #fff); }
.pd-input { resize: vertical; min-height: 85px; }
.pd-context, .pd-note, .pd-context-saved { font-size: .8rem; line-height: 1.5; color: var(--ink-2, #4c5b53); overflow-wrap: anywhere; }
.pd-context { margin: 8px 0 12px; }
.pd-note { margin: 12px 0 0; }
.pd-context-saved { margin: 5px 0; }
.pd-messages { max-height: 420px; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.pd-empty { padding: 14px; margin: 0; font-size: .9rem; color: var(--ink-2, #4c5b53); background: var(--paper, #fafaf6); border-radius: 8px; }
.pd-message { padding: 12px; margin: 10px 0; border-radius: 10px; background: var(--paper, #f7f7f1); }
.pd-message--user { background: var(--accent-soft, #eef4ef); }
.pd-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: .78rem; }
.pd-meta span { color: var(--ink-2, #4c5b53); }
.pd-content { white-space: pre-wrap; line-height: 1.65; font-size: .94rem; }
.pd-sources { margin: 12px 0 0; padding-left: 18px; font-size: .82rem; }
.pd-sources li { margin-bottom: 10px; }
.pd-sources a { color: var(--accent, #276346); text-decoration: underline; }
.pd-source-work { display: block; margin-top: 3px; }
.pd-sources blockquote { margin: 6px 0; padding-left: 10px; border-left: 2px solid var(--accent, #276346); }
.pd-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.pd-suggestion { font: inherit; font-size: .78rem; padding: 7px 9px; border: 1px solid var(--paper-3, #c5cfc5); border-radius: 8px; color: var(--ink, #23392e); background: var(--white, #fff); cursor: pointer; }
.pd-form { display: grid; gap: 8px; }
.pd-attach-label { display: flex; align-items: center; gap: 8px; font-size: .82rem; margin-bottom: 6px; }
.pd-attach-label[hidden] { display: none; }
.pd-attach { width: auto; }
.pd-submit { justify-self: start; white-space: normal; }
.pd-status { margin: 8px 0 0; font-size: .86rem; }
.pd-error { color: #983224; }
.pd-search { width: 100%; height: 150px; border: 0; margin-top: 12px; background: white; }
.pd-panel :focus-visible { outline: 3px solid #547956; outline-offset: 3px; }
.pd-panel :disabled { opacity: .65; cursor: wait; }
@media (max-width: 600px) {
  .pd-body { padding: 12px; }
  .pd-messages { max-height: 340px; }
  .pd-submit { width: 100%; }
  .explication-app .ctx-dates { white-space: normal; overflow-wrap: anywhere; }
  .explication-app .ctx-cols { grid-template-columns: minmax(0, 1fr); }
}
