#memory-profile-controls { display: grid; gap: 12px; }
.memory-center-header { position: sticky; top: -26px; z-index: 2; padding-block: 8px; background: var(--bp-surface); }
.memory-status { overflow-wrap: anywhere; }
#memory-profile-controls[hidden] { display: none; }
#memory-profile-controls > details, .memory-conversation-composer {
  border: var(--hairline) solid var(--bp-rule);
  border-radius: var(--radius-sm);
  padding: 14px;
}
#memory-profile-controls summary, .memory-conversation-composer > summary {
  cursor: pointer; color: var(--bp-ink); font-size: 14px; font-weight: 650;
}
.memory-profile-form { display: grid; gap: 12px; margin-top: 14px; }
.memory-profile-form > label { display: grid; gap: 6px; font-size: 13px; }
.memory-profile-form input:not([type="checkbox"]), .memory-profile-form textarea, .memory-profile-form select {
  box-sizing: border-box; width: 100%; min-width: 0; padding: 10px;
  border: var(--hairline) solid var(--bp-rule); border-radius: var(--radius-sm);
  background: var(--bp-surface); color: var(--bp-ink); font: inherit;
}
.memory-profile-form textarea { resize: vertical; }
.memory-profile-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.memory-profile-options > label { display: grid; gap: 6px; font-size: 13px; }
.memory-profile-voices { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 0; padding: 10px 0 0; border: 0; min-width: 0; }
.memory-profile-voices legend { font-size: 12px; font-weight: 650; }
.memory-profile-voices label, .memory-profile-confirm { display: flex !important; align-items: start; gap: 8px; font-size: 13px; }
.memory-profile-form input[type="checkbox"] { width: 16px; height: 16px; flex: none; margin: 2px 0 0; }
.memory-profile-form > button { justify-self: start; }
.memory-profile-form [type="submit"]:disabled { opacity: .55; }
.memory-conversation-composer .memory-summary-form { margin-top: 14px; }
.memory-item dd { overflow-wrap: anywhere; }
#memory-automatic-controls { display: grid; gap: 12px; padding: 18px; border: var(--hairline) solid var(--bp-rule); border-radius: var(--radius-sm); }
#memory-automatic-controls[hidden] { display: none; }
#memory-automatic-controls p { font-size: 14px; line-height: 1.6; margin: 0; }
#memory-automatic-controls .memory-automatic-retention { font-size: 12px; color: var(--bp-muted); }
.memory-automatic-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.memory-automatic-actions > span { font-size: 13px; font-weight: 600; }
.memory-automatic-actions button { white-space: normal; }
.memory-manual-controls > summary { cursor: pointer; font-size: 14px; }
.memory-manual-controls[open] { display: grid; gap: 14px; }
.memory-update-notice { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; color: var(--bp-muted); font-size: 12px; margin-block: 8px; }
.memory-update-notice .memory-trace { margin: 0; }
.memory-undo-status { flex-basis: 100%; }
@media (max-width: 420px) { .memory-profile-options { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .memory-center-header { top: -20px; } }
