.profile-cover.has-photo {
  height: auto;
  aspect-ratio: 3 / 1;
}
.profile-cover.has-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-card .profile-actions > .primary, .profile-settings-trigger { margin: 0; }
.profile-actions .profile-settings-trigger {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: #eef0f8;
  color: #404fb1;
  font-size: .8125rem;
  font-weight: 750;
}
.profile-actions .profile-settings-trigger:hover { background: #e1e6fb; }
.profile-actions a.profile-settings-trigger { display: inline-flex; align-items: center; }
dialog:has(.settings-stage) .modal-head { justify-content: start; gap: 10px; touch-action: pan-y; }
dialog:has(.settings-stage) .modal-head > [data-action=close-modal] { margin-inline-start: auto; }
dialog:has(.settings-stage) .modal-head h2 { min-width: 0; }
.settings-back[hidden], .settings-stage [hidden] { display: none; }
.settings-stage {
  position: relative;
  overflow: clip;
  min-width: 0;
  padding: 3px;
  margin: -3px;
}
.settings-panel { min-width: 0; }
.settings-panel.settings-leaving { position: absolute; inset: 3px 3px auto; pointer-events: none; }
.settings-rows { display: grid; gap: 4px; }
.settings-row {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 20px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 7px 10px;
  border-radius: 12px;
  text-align: start;
  font-size: .9375rem;
  font-weight: 750;
}
.settings-row:hover { background: var(--canvas); }
.settings-row-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #ebeeff;
  color: #4353bd;
}
.settings-chevron { color: #6f7b92; }
.settings-row-icon svg, .settings-chevron svg { width: 17px; height: 17px; }
.profile-file-form, .settings-credentials { display: grid; gap: 14px; }
.settings-field { min-width: 0; }
.settings-field label {
  display: block;
  margin-bottom: 5px;
  color: #515d70;
  font-size: .8125rem;
  font-weight: 700;
}
.settings-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #eef0f6;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.settings-field input:focus-visible { outline: 2px solid #616df0; outline-offset: -2px; }
.settings-field input[aria-invalid=true] { border-color: #b94961; background: #fff0f1; }
.settings-error, .settings-note {
  margin: 0;
  line-height: 1.5;
  font-size: .8125rem;
  overflow-wrap: anywhere;
}
.settings-field .settings-error { margin-top: 5px; }
.settings-error { color: #a23148; }
.settings-note { color: #526078; }
.settings-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.settings-buttons .primary { flex: 1; }
.settings-remove { min-height: 44px; padding: 0 10px; color: #983349; }
.settings-preview { display: block; border-radius: 12px; object-fit: cover; }
.preview-avatar { width: 76px; height: 76px; border-radius: 50%; }
.preview-cover { width: 100%; height: auto; aspect-ratio: 3 / 1; }
.profile-drop {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 88px;
  padding: 12px;
  border: 1px dashed #9ba9d6;
  border-radius: 14px;
  background: #f0f3fc;
  text-align: start;
  transition: background .2s, border-color .2s, transform .25s;
}
.profile-drop:hover, .profile-drop.is-dragover { background: #e8edff; border-color: #5365e6; }
.profile-drop.is-dragover { transform: scale(.987); }
.drop-copy { min-width: 0; }
.drop-title, .drop-help { display: block; overflow-wrap: anywhere; }
.drop-title { color: #303b6c; font-size: .875rem; line-height: 1.45; }
.drop-help { margin-top: 3px; color: #536181; font-size: .75rem; }
.drop-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e1e8ff;
  color: #4054cb;
  transition: background .24s ease, color .24s ease;
}
.drop-core > svg { position: absolute; }
.drop-arrow { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.drop-ring { inset: 0; width: 48px; height: 48px; rotate: -90deg; }
.drop-ring circle { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: var(--upload-progress,0) 100; transition: stroke-dasharray .18s ease; }
.drop-core > .icon, .drop-percent, .drop-ring { opacity: 0; }
.drop-core > .icon { width: 21px; height: 21px; }
.drop-percent { font-size: .6875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.is-dragover .drop-arrow { animation: profile-drop-lift .7s ease-in-out infinite alternate; }
.is-uploading .drop-arrow, .is-saved .drop-arrow { opacity: 0; }
.is-uploading .drop-percent, .is-uploading .drop-ring, .is-saved .drop-core > .icon { opacity: 1; }
.is-saved .drop-core { background: #198353; color: white; animation: profile-drop-pop .32s ease-out; }
@keyframes profile-drop-lift { to { transform: translateY(-3px); } }
@keyframes profile-drop-pop { 55% { transform: scale(1.11); } }
@media (max-width: 520px) {
  .profile-actions .profile-settings-trigger { min-height: 44px; }
  .profile-drop { gap: 10px; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-drop, .drop-core, .drop-ring circle { transition: none; }
  .is-dragover .drop-arrow, .is-saved .drop-core { animation: none; }
}
