.historyCard { width: min(850px, 94vw); max-height: 90vh; overflow: auto; }
.historyHelp { color: var(--muted); font-size: 13px; line-height: 1.5; }
.historyCard label { display: block; margin: 8px 0 4px; }
.historyCard .gitInput { width: 100%; box-sizing: border-box; }
.historyLayout { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 1.7fr); gap: 12px; min-height: 220px; }
.historyList { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.historyVersion { display: block; text-align: left; width: 100%; padding: 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.historyVersion[aria-pressed="true"] { background: var(--panel2); box-shadow: inset 3px 0 var(--accent); }
.historyVersion:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.historyVersion small { display: block; margin-top: 4px; color: var(--muted); }
.historyPreview { min-width: 0; max-height: 340px; overflow: auto; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; }
#noteHistoryText { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14px; line-height: 1.5; user-select: text; }
#noteHistoryImages img { display: block; max-width: 100%; max-height: 180px; margin: 8px 0; object-fit: contain; }
.historyWarning { position: fixed; bottom: 55px; left: 12px; right: 12px; z-index: 1800; padding: 10px; border: 1px solid var(--warning); border-radius: 8px; background: var(--panel); color: var(--text); box-shadow: var(--shadow); font-size: 13px; }
.historyWarning[hidden] { display: none; }
.syncRecoveryCard { width: min(720px, 94vw); max-height: 90vh; overflow: auto; }
.syncRecoveryPreview { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.syncRecoveryTable { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.syncRecoveryTable th, .syncRecoveryTable td { padding: 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.syncRecoveryTable th:first-child { width: 65%; }
.syncRecoveryTable pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; user-select: text; }
.syncRecoveryTable img { display: block; max-width: 100%; max-height: 160px; margin-top: 8px; object-fit: contain; }
@media (max-width: 550px) { .historyLayout { grid-template-columns: 1fr; } .historyList { max-height: 150px; } .historyPreview { max-height: 220px; min-height: 100px; } }
