#backups {
  margin: 30px 0;
}
.storage-panel {
  background: #f0f3eb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-block: 20px;
}
.storage-panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.migration-choice {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 14px;
  margin-block: 14px;
}
.migration-choice input {
  width: 18px;
  min-width: 18px;
  margin-top: 4px;
}
#storage-status {
  font-size: 14px;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}
.saving-status:empty {
  display: none;
}
.saving-status {
  position: fixed;
  z-index: 100;
  bottom: 20px;
  inset-inline-start: 20px;
  background: var(--ink);
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  margin: 0;
}
#storage-mode:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
#restore-dialog {
  max-height: 90vh;
}
.backup-intro {
  color: var(--muted);
  font-size: 14px;
  max-width: 720px;
}
.backup-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.backup-actions label {
  flex: 1;
  max-width: 430px;
  min-width: 240px;
  margin: 0;
}
.backup-actions input {
  width: 100%;
  font-size: 13px;
}
.backup-actions input::file-selector-button {
  font: inherit;
  background: #e8eddf;
  color: var(--ink);
  border: 0;
  padding: 7px 10px;
  border-radius: 6px;
  margin-inline-end: 8px;
  cursor: pointer;
}
.backup-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
#backup-status,
#restore-status {
  font-size: 14px;
  min-height: 24px;
}
.restore-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}
.restore-file {
  border-radius: 12px;
  background: #f0f3eb;
  padding: 12px;
  margin: 14px 0;
  font-size: 14px;
}
#restore-file-name {
  display: block;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}
#restore-exported-at {
  display: block;
  font-size: 13px;
}
.backup-comparison {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 16px 0;
}
.backup-comparison caption {
  text-align: start;
  font-size: 16px;
  font-weight: 700;
  padding-bottom: 8px;
}
.backup-comparison th,
.backup-comparison td {
  border-bottom: 1px solid var(--line);
  padding: 6px 10px;
  font-size: 14px;
}
.backup-comparison th {
  font-weight: 500;
}
.backup-comparison th:first-child {
  width: 52%;
  text-align: start;
}
.backup-comparison thead th {
  color: var(--muted);
  font-size: 12px;
}
.backup-comparison td {
  text-align: center;
  font-weight: 700;
}
.backup-comparison [data-backup-value] {
  background: #f0f3eb;
}
.backup-comparison [data-current-value] {
  color: var(--muted);
}
#restore-status {
  margin: 10px 0 0;
}
.restore-confirmation {
  display: flex;
  flex-direction: row;
  align-items: start;
  gap: 10px;
  padding: 12px;
  background: #fae9ce;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}
.restore-confirmation input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 3px 0 0;
  accent-color: var(--ink);
}
@media (max-width: 520px) {
  .backup-actions {
    gap: 16px;
    align-items: stretch;
  }
  .backup-actions label {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 100%;
  }
  .backup-comparison th,
  .backup-comparison td {
    padding: 5px 7px;
    font-size: 13px;
  }
  #restore-dialog h2 {
    font-size: 22px;
  }
  .restore-heading {
    gap: 8px;
  }
}
