.notes-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1080px; margin-bottom: 24px; }
.notes-heading h1 { margin: 0; }
.notes-heading button { border: 1px solid var(--border); background: var(--surface); color: var(--accent); padding: 8px 14px; font-size: 14px; }
.history-dialog { width: min(1000px, calc(100vw - 32px)); max-height: 86vh; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
.history-dialog::backdrop { background: rgb(15 23 42 / 45%); }
.history-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.history-header h2 { margin: 0; font-size: 20px; }
.history-hint, .history-status { font-size: 13px; color: var(--muted); line-height: 1.7; }
.history-status { min-height: 22px; }
.history-layout { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 1.15fr); gap: 20px; }
.history-list { list-style: none; padding: 0; margin: 0; max-height: 58vh; overflow-y: auto; }
.history-row { border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.history-details { min-width: 0; overflow-wrap: anywhere; }
.history-details strong { font-size: 14px; }
.history-details time { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.history-details p { margin: 8px 0; font-size: 13px; white-space: pre-wrap; }
.history-actions { display: flex; justify-content: flex-end; gap: 8px; }
.history-actions button { padding: 5px 12px; font-size: 13px; background: var(--accent-soft); color: var(--accent); }
.history-preview { min-height: 220px; max-height: 58vh; overflow: auto; align-self: start; background: var(--background); cursor: default; }
.history-preview:empty::before { content: '选择版本“查看”，在此只读预览'; font-size: 13px; color: var(--muted); }
.history-empty { font-size: 14px; color: var(--muted); padding: 20px 0; }
.history-dialog button:disabled { opacity: .5; cursor: wait; }
@media (max-width: 760px) { .history-layout { grid-template-columns: 1fr; } .history-list { max-height: 32vh; } .history-preview { max-height: 30vh; } }
.sheet-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.sheet-heading h1 { margin:0; }
.sheet-heading button { border:1px solid var(--border); background:var(--surface); color:var(--accent); padding:8px 14px; font-size:14px; }
.sheet-history-preview { border:1px solid var(--border); border-radius:var(--r-sm); padding:0; min-width:0; }
.sheet-history-preview .sheet-grid { color:var(--tx); background:var(--card-bg); }
.sheet-history-preview .sheet-grid th { background:var(--col-bg); color:var(--tx-sub); }
.sheet-history-preview .sheet-grid td,.sheet-history-preview .sheet-grid th { border-color:var(--line); }
.sheet-history-preview .sheet-grid button:disabled { opacity:1; cursor:default; }
.sheet-history-preview:empty { padding:16px; }
