.sync-settings { padding: 16px 0; border-bottom: 1px solid var(--line); }
.sync-device-row, .sync-actions, .sync-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sync-device-row input { width: 180px; max-width: 100%; }
.sync-device-row { margin-bottom: 12px; }
#syncLastSaved { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.sync-actions button { min-height: 36px; width: auto; }
.sync-settings h3 { font-size: 14px; margin: 16px 0 8px; }
#syncHistoryList { list-style: none; padding: 0; margin: 0; }
#syncHistoryList li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
#syncHistoryList li span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
#syncHistoryList button { flex: 0 0 auto; width: auto; min-width: 64px; }
.sync-compact { border: 0; background: transparent; color: var(--muted); padding: 3px 0; min-height: 26px; max-width: 100%; font-size: 12px; text-align: left; }
.sync-compact span { white-space: normal; overflow-wrap: anywhere; }
.sync-dialog { width: min(520px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); max-height: calc(100dvh - 32px); overflow: auto; }
.sync-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.sync-dialog h2, .sync-stale-notice h2 { font-size: 18px; margin: 0 0 12px; }
.sync-dialog p, .sync-stale-notice p { line-height: 1.7; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; margin-bottom: 20px; }
.sync-dialog-actions { justify-content: flex-end; }
.sync-dialog-actions button { width: auto; }
.sync-stale-notice { position: fixed; inset: 0; z-index: 11000; background: rgb(0 0 0 / 55%); display: grid; place-items: center; padding: 16px; }
.sync-stale-notice section { width: min(460px, 100%); border-radius: 8px; padding: 24px; background: var(--surface); color: var(--ink); }
.sync-settings [hidden], .sync-compact[hidden], .sync-stale-notice[hidden] { display: none !important; }
@media (max-width: 600px) {
  .sync-actions { gap: 8px; }
  .sync-actions button { flex: 1 1 140px; white-space: normal; }
  .sync-dialog { padding: 18px; }
  .sync-dialog-actions button { flex: 1 1 140px; white-space: normal; }
  .sync-device-row input { flex: 1; min-width: 0; }
  #syncLastSaved { width: 100%; }
}
