.history-dialog { width: min(560px, calc(100% - 32px)); }
.history-dialog .icon-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
.history-intro { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.history-new { min-height: 48px; margin: 0 0 18px; }
.history-status { margin: 14px 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.history-status:empty { display: none; }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-item { display: flex; align-items: center; gap: 5px; border-bottom: 1px solid var(--line); padding: 5px 0; }
.history-item:first-child { border-top: 1px solid var(--line); }
.history-resume { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; min-height: 78px; padding: 13px 8px 13px 0; border-radius: 12px; background: transparent; text-align: left; }
.history-resume:hover { background: var(--soft); }
.history-item-copy { min-width: 0; flex: 1; }
.history-item-title { display: block; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.history-item-meta { display: block; color: var(--muted); font-size: 11px; line-height: 1.65; margin-top: 5px; }
.history-resume-label { color: var(--accent); font-size: 11px; font-weight: 600; flex-shrink: 0; }
.history-delete-button, .history-text-button { min-width: 44px; min-height: 44px; padding: 10px 9px; background: transparent; color: var(--accent); border-radius: 10px; font-size: 12px; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; }
.history-delete-button { flex-shrink: 0; color: #84523e; }
.history-delete-button:hover, .history-text-button:hover { background: var(--soft); }
.history-older { width: 100%; min-height: 48px; margin-top: 20px; font-size: 13px; }
.history-empty { padding: 23px 20px; background: var(--soft); border: 1px solid var(--line); border-radius: 17px; margin: 6px 0; }
.history-empty h3 { margin: 0 0 10px; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 400; line-height: 1.3; letter-spacing: -.4px; }
.history-empty p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.history-footer { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 17px; }
.history-privacy { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0 0 7px; }
.history-clear { padding-left: 0; color: #84523e; }
.history-error { display: flex; align-items: center; gap: 12px; margin: 14px 0; padding: 12px 14px; border: 1px solid #e7d6c8; border-radius: 13px; background: #f9f0e7; color: #78452f; }
.history-error p { flex: 1; margin: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.history-error button { color: inherit; flex-shrink: 0; }
.history-confirm-dialog { width: min(470px, calc(100% - 32px)); }
.history-confirm-name { color: var(--ink); background: var(--soft); border-radius: 12px; padding: 13px 15px; font-size: 14px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; margin: 15px 0; }
.history-confirm-actions { display: flex; gap: 10px; }
.history-confirm-actions button { flex: 1; min-height: 48px; padding: 12px 13px; font-size: 13px; }
.history-confirm-actions .history-destructive { background: #83523e; }
.history-confirm-actions .history-destructive:hover { background: #6e402e; }
.history-confirm-error { color: #78452f; font-size: 13px; line-height: 1.6; }
@media (max-width: 600px) {
  .history-dialog, .history-confirm-dialog { width: 100%; max-width: 100%; max-height: calc(100dvh - max(20px,env(safe-area-inset-top))); }
  .history-resume { gap: 7px; }
  .history-resume-label { display: none; }
  .history-error { align-items: flex-start; flex-wrap: wrap; gap: 3px 10px; }
  .history-error p { flex-basis: 100%; }
  .history-confirm-actions { flex-direction: column-reverse; }
  .history-confirm-actions button { flex: auto; width: 100%; }
}
