.history-dialog { width: min(94vw, 760px); max-height: 88dvh; overflow: auto; padding: 1.4rem; border: 1px solid var(--line, #d9e0d7); border-radius: 20px; background: var(--paper, #faf9f3); color: var(--ink, #20352a); }
.history-dialog::backdrop { background: rgb(15 35 25 / 45%); }
.history-header, .history-item-heading, .history-confirm-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.history-header { flex-wrap: wrap; }
.history-header-actions { display: flex; gap: .5rem; }
.history-header h2 { margin: 0; font-size: 1.3rem; }
.history-dialog button { min-height: 44px; }
.history-intro, .history-status, .history-reason { color: var(--ink-soft, #526058); line-height: 1.6; }
.history-error { color: var(--danger, #993a30); line-height: 1.6; }
.history-list { display: grid; gap: .8rem; margin: 1rem 0; }
.history-item { min-width: 0; padding: 1rem; border: 1px solid var(--line, #d9e0d7); border-radius: 14px; background: rgb(255 255 255 / 60%); }
.history-item time, .history-state { font-size: .8rem; color: var(--ink-soft, #526058); }
.history-state { display: inline-block; margin-top: .5rem; }
.history-details { margin: .7rem 0; }
.history-details summary { cursor: pointer; min-height: 32px; padding: .25rem 0; }
.history-changes { display: grid; gap: .7rem; margin: .6rem 0; padding: 0; list-style: none; }
.history-changes li { display: grid; gap: .25rem; padding-left: .75rem; border-left: 2px solid var(--line, #d9e0d7); overflow-wrap: anywhere; }
.history-changes span { font-size: .85rem; }
.history-confirmation, .history-pending { padding: 1rem; margin-top: .9rem; border: 1px solid #c7d8c5; border-radius: 14px; background: #edf3e7; line-height: 1.6; }
.history-confirm-actions { justify-content: flex-end; flex-wrap: wrap; }
.history-reason { margin-bottom: 0; font-size: .85rem; }
@media (max-width: 480px) {
  .history-dialog { padding: 1rem; width: calc(100vw - 1rem); max-height: 90dvh; }
  .history-item-heading { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .history-confirm-actions > button { flex: 1; }
}
