html.sm-save-open { overflow: hidden; }
.sm-save-dialog, .sm-save-dialog * { box-sizing: border-box; letter-spacing: 0; }
.sm-save-dialog {
  width: min(680px, calc(100% - 24px)); max-width: none; max-height: 94vh;
  max-height: 94dvh; margin: auto; padding: 0; border: 1px solid #c9ccd0;
  border-radius: 8px; background: #fff; color: #242628;
  font: 16px/1.45 Arial, sans-serif; text-align: left;
  box-shadow: 0 18px 64px #0004; overflow: auto;
}
.sm-save-dialog::backdrop { background: #11161c80; }
.sm-save-dialog .sm-save-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: #fff; border-bottom: 1px solid #d9dcdf; }
.sm-save-dialog .sm-save-header h2 { margin: 0; font: 700 24px/1.25 Arial, sans-serif; text-align: left; }
.sm-save-dialog .sm-save-close { width: 40px; height: 40px; padding: 0; flex: 0 0 40px; border: 0; background: transparent; color: #444; font: 30px/1 Arial, sans-serif; cursor: pointer; }
.sm-save-dialog .sm-save-content { padding: 16px 24px 20px; }
.sm-save-dialog h3 { margin: 0 0 4px; font: 600 17px/1.4 Arial, sans-serif; }
.sm-save-dialog p { margin: 8px 0; line-height: 1.45; }
.sm-save-dialog a { color: #235773; }
.sm-save-dialog .compact-type { display: inline; font-size: 25px; font-weight: 700; margin: 0 0 0 8px; }
.sm-save-dialog .self-test-compact h3 { display: inline; }
.sm-save-dialog .self-test-compact { margin-bottom: 12px; }
.sm-save-dialog .self-test-scores { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.sm-save-dialog .self-test-score { min-width: 0; padding: 6px 0; border-top: 1px solid #e2e4e6; font-size: 14px; }
.sm-save-dialog .self-test-score p { margin: 2px 0; }
.sm-save-dialog .score { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 10px; align-items: center; margin-top: 4px; }
.sm-save-dialog .score strong { text-align: right; }
.sm-save-dialog meter { width: 100%; height: 14px; accent-color: #348477; }
.sm-save-dialog meter::-webkit-meter-bar { background: #e6e8eb; border: none; border-radius: 2px; }
.sm-save-dialog meter::-webkit-meter-optimum-value { background: #348477; }
.sm-save-dialog .muted, .sm-save-dialog .result-notes { font-size: 13px; color: #58636b; }
.sm-save-dialog .result-notes { margin: 12px 0; }
.sm-save-dialog .import-form { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid #d9dcdf; text-align: center; }
.sm-save-dialog .import-destination { font-size: 14px; }
.sm-save-dialog .import-change { margin-left: 6px; padding: 6px; border: none; background: none; color: #235773; text-decoration: underline; font: inherit; cursor: pointer; }
.sm-save-dialog .import-replace { font-size: 14px; color: #78501b; }
.sm-save-dialog .import-private-note { font-size: 15px; }
.sm-save-dialog .import-providers { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 16px 0 12px; }
.sm-save-dialog .import-provider { width: 216px; height: 48px; padding: 0; border: 0; border-radius: 3px; background: transparent; cursor: pointer; }
.sm-save-dialog .import-provider img { display: block; width: 216px; height: 48px; max-width: 100%; }
.sm-save-dialog .import-or { color: #667078; font-size: 13px; margin: 8px 0; }
.sm-save-dialog .primary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; max-width: 100%; padding: 12px 20px; border: 1px solid #bbc4c9; border-radius: 4px; background: #f4f6f7; color: #202b32; font: 600 16px/1.4 Arial, sans-serif; cursor: pointer; }
.sm-save-dialog .import-privacy { max-width: 460px; margin: 16px auto 0; font-size: 12px; color: #626b73; }
.sm-save-dialog .import-field { margin: 12px 0; text-align: left; }
.sm-save-dialog label { display: block; margin-bottom: 6px; font-weight: 600; }
.sm-save-dialog select, .sm-save-dialog input { width: 100%; min-height: 44px; padding: 10px; border: 1px solid #b8c0c5; border-radius: 4px; background: white; color: #202b32; font: inherit; }
.sm-save-dialog .submit-area { margin-top: 16px; }
.sm-save-dialog [hidden] { display: none !important; }
.sm-save-dialog button:disabled { opacity: .55; cursor: wait; }
.sm-save-dialog button:focus-visible, .sm-save-dialog a:focus-visible { outline: 3px solid #397d9c; outline-offset: 3px; }
.sm-save-dialog .sm-save-message { text-align: center; margin: 16px 0 0; }
.sm-save-dialog .error, .sm-save-dialog .sm-save-error { color: #a72e2b; }
.profile-save .sm-save-success { font: 700 28px/1.3 Arial, sans-serif; color: #217764; margin: 8px 0 14px; animation: sm-save-confirm 700ms ease-out both; outline: none; }
.profile-save .sm-save-success-note { font-size: 14px; color: #58636b; margin-top: 12px; }
@keyframes sm-save-confirm { 0% { opacity: 0; transform: scale(.8); } 55% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@media (max-width: 480px) {
  .sm-save-dialog .sm-save-header { padding: 12px 16px; }
  .sm-save-dialog .sm-save-header h2 { font-size: 21px; }
  .sm-save-dialog .sm-save-content { padding: 16px; }
  .sm-save-dialog .self-test-scores { column-gap: 16px; }
  .sm-save-dialog .self-test-score { font-size: 13px; overflow-wrap: anywhere; }
  .sm-save-dialog .score { grid-template-columns: minmax(0, 1fr) 42px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { .profile-save .sm-save-success { animation: none; } }

