.profile-page .page-heading{display:none}.profile-page main{max-width:1000px;padding:20px 24px 36px}.profile-page .month-control,.profile-page #new-transaction,.profile-page .top-more,.profile-page .session-lock{display:none}
.profile-panel{max-width:740px;margin:0 auto}.profile-heading{display:flex;align-items:center;gap:14px;margin:0 0 24px}.profile-heading h1{font-size:22px;letter-spacing:-.4px;font-weight:600}.profile-hero{display:flex;flex-direction:column;align-items:center;text-align:center;margin:12px auto 30px;padding:0 14px;gap:16px}.profile-avatar{position:relative;display:grid;place-items:center;flex-shrink:0;width:132px;height:132px;border:3px solid #4d7cff;border-radius:50%;color:#3c74b6;background:linear-gradient(145deg,#f8faff,#e4efff);box-shadow:0 3px 14px #467be629;font-size:52px;font-weight:500;line-height:1}.profile-avatar:hover{background:#deebff}.profile-avatar-edit{position:absolute;right:-3px;bottom:-2px;background:var(--blue);border:3px solid var(--bg);color:#fff;width:40px;height:40px;border-radius:50%;display:grid;place-items:center}.profile-avatar-edit svg{width:19px;height:19px}.profile-sync{min-height:29px;padding:3px 12px;gap:7px;border:1px solid #dbe7fb;border-radius:30px;box-shadow:inset 0 0 8px #ddeaff;background:#fff;font-size:12px;color:#386292}.profile-sync svg{width:16px;height:16px}.profile-sync[data-state="offline"],.profile-sync[data-state="error"]{color:#9f4e15;background:#fff8ee;border-color:#f1d7b5}.profile-subscription{font-size:13px;color:var(--muted);line-height:1.6}.profile-subscription strong{font-weight:500;color:#697586}.profile-subscription p{margin:3px 0}.profile-subscription-link{background:transparent;border:0;color:var(--blue-dark);font-size:14px;padding:5px 8px;font-weight:600}.profile-subscription-link svg{width:17px;height:17px}
.profile-menu{border:1px solid #e2eaf5;background:#f8fafd;border-radius:26px;overflow:hidden;box-shadow:0 4px 20px #203d6a04}.profile-row{display:flex;justify-content:flex-start;gap:15px;width:100%;padding:17px 20px;min-height:76px;border:0;border-bottom:1px solid #e9edf4;background:transparent;text-align:left;border-radius:0}.profile-row:last-child{border-bottom:0}.profile-row:hover{background:#edf4ff}.profile-row:focus-visible{outline-offset:-4px}.profile-row-icon{width:42px;height:42px;display:grid;place-items:center;flex-shrink:0;background:#e9edf3;color:#798594;border-radius:50%}.profile-row-icon svg{width:22px;height:22px}.profile-row-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1;font-size:15px;font-weight:400}.profile-row-copy small{font-size:12px;line-height:1.4;color:#7d8593;overflow-wrap:anywhere}.profile-row-end{color:#7a9ec7;flex-shrink:0}.profile-row-end svg{width:18px;height:18px}.profile-row:first-child .profile-row-end{color:var(--blue)}.profile-feedback{text-align:center;color:var(--muted);font-size:13px}.profile-feedback p{color:#b14531}.profile-account dl{display:grid;grid-template-columns:1fr;gap:3px}.profile-account dt{color:var(--muted);font-size:12px}.profile-account dd{margin:0 0 14px;overflow-wrap:anywhere}.profile-account p,.profile-devices p{font-size:13px;line-height:1.7}.profile-session-total{font-size:18px!important;font-weight:600;color:var(--blue-dark)}.profile-devices ul{list-style:none;margin:12px 0 20px;padding:0}.profile-devices li{display:flex;align-items:center;gap:12px;border-top:1px solid #e8edf5;padding:12px 0}.profile-devices li>svg{width:28px;height:28px;flex-shrink:0;color:#8498af}.profile-devices li small{display:block;color:var(--muted);font-size:12px}.profile-devices strong{font-weight:500}.profile-devices .section-actions,.profile-account .section-actions{flex-wrap:wrap}.profile-devices .btn{white-space:normal}.profile-page .avatar{box-shadow:0 0 0 4px #e4efff}
@media(max-width:600px){.profile-page main{padding:16px 12px 26px}.profile-heading{gap:10px;margin-bottom:24px}.profile-heading h1{font-size:20px}.profile-hero{margin-bottom:24px;gap:13px}.profile-avatar{width:124px;height:124px;font-size:48px}.profile-menu{border-radius:22px}.profile-row{padding:15px 14px;gap:12px;min-height:73px}.profile-row-copy{font-size:14px}.profile-row-copy small{font-size:11px}.profile-row-icon{width:38px;height:38px}.profile-row-end svg{width:16px;height:16px}}
.avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover}.avatar:has(img){padding:0;overflow:hidden}.profile-avatar>[data-avatar-image]{width:100%;height:100%;display:grid;place-items:center;border-radius:50%;overflow:hidden}.profile-avatar>[data-avatar-image] img{width:100%;height:100%;object-fit:cover}.profile-avatar:has(img){padding:0}
.photo-editor{text-align:center}.photo-preview{width:180px;height:180px;border:3px solid #4d7cff;border-radius:50%;overflow:hidden;display:grid;place-items:center;margin:4px auto 18px;background:#e7f1ff;font-size:68px;line-height:1;color:#3c74b6}.photo-preview img{width:100%;height:100%;object-fit:cover}.photo-caption{font-size:15px;margin:0 0 16px}.photo-options{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.photo-camera{display:block;max-width:100%;width:320px;aspect-ratio:1;object-fit:cover;border-radius:20px;background:#102334;margin:18px auto 12px}.photo-camera[hidden],.photo-capture[hidden]{display:none!important}.photo-note{font-size:12px;line-height:1.7;color:var(--muted);max-width:410px;margin:16px auto 8px}.photo-feedback{font-size:13px;line-height:1.6;min-height:22px;margin:10px 0;color:#4d6a87}.photo-feedback.error{color:#b33d2d}.photo-editor .modal-actions{flex-wrap:wrap;justify-content:center}.photo-editor .modal-actions .danger{margin-right:auto}.photo-presets{text-align:left;border:1px solid #dce7f5;border-radius:16px;margin-top:20px;padding:12px}.photo-presets summary{cursor:pointer;color:#266bb4;font-weight:500;padding:3px 4px}.photo-preset-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding-top:14px}.photo-preset-grid button{padding:0;background:#f2f6fc;border:2px solid transparent;border-radius:50%;aspect-ratio:1;overflow:hidden}.photo-preset-grid button:hover{border-color:#3b8cf5;background:#e9f2ff}.photo-preset-grid img{width:100%;height:100%;object-fit:contain}.photo-capture{margin:0 auto}
@media(max-width:520px){.photo-preview{width:154px;height:154px;font-size:58px}.photo-preset-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.photo-options .btn{font-size:12px;padding:10px 12px}.photo-editor .modal-actions{gap:9px}.photo-editor .modal-actions .danger{margin-right:0}.photo-editor .modal-actions .btn{flex:1}}

/* Profile dialogs use the same inset and surface as the theme picker. */
#modal[open]:has(.profile-dialog) {
  --profile-dialog-inset: 24px;
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - 24px);
  max-height: 90vh;
  max-height: 90dvh;
  overflow: hidden;
}

#modal:has(.profile-dialog) .modal-head {
  flex: none;
  padding-inline: var(--profile-dialog-inset);
}

#modal:has(.profile-dialog) #modal-body,
.profile-dialog,
.profile-dialog #locale-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.profile-dialog-scroll {
  padding: 20px var(--profile-dialog-inset);
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}

.profile-dialog-actions {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px var(--profile-dialog-inset);
  border-top: 1px solid var(--line);
}

.profile-dialog-actions .btn {
  min-height: 44px;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.profile-dialog .form-note,
.profile-dialog .hint {
  font-size: 13px;
  line-height: 1.6;
}

.profile-account dl {
  margin: 0;
  gap: 0;
}

.profile-account dl > div {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.profile-account dl > div:first-child { padding-top: 0; }
.profile-account dd { margin: 0; font-size: 15px; }
.profile-account .form-note { margin-bottom: 0; }
.profile-dialog #locale-feedback:empty { margin: 0; }
.profile-dialog #locale-feedback:not(:empty) { margin-bottom: 0; }
.profile-dialog #locale-form .field { min-width: 0; }
.profile-dialog #locale-form select { width: 100%; min-height: 44px; }

.profile-devices .profile-session-total { margin: 0 0 8px; }
.profile-devices h3 { margin: 20px 0 4px; }
.profile-devices .hint { margin: 0; color: var(--muted); }
.profile-devices ul { margin-bottom: 0; }
.profile-devices li { border-color: var(--line); }
.profile-devices li span { min-width: 0; }

@media (max-width: 620px) {
  #modal[open]:has(.profile-dialog) { --profile-dialog-inset: 14px; }
  .profile-dialog-scroll { padding-block: 16px; }
  .profile-dialog-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    gap: 8px;
    padding-block: 12px;
  }
  .profile-account [data-profile="rename"],
  .profile-devices [data-profile="security"] { grid-column: 1 / -1; }
  .profile-devices .profile-dialog-actions { grid-template-columns: 1fr; }
  .profile-dialog #locale-form .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-height: 450px) {
  #modal:has(.profile-dialog) #modal-body { display: block; overflow-y: auto; }
  .profile-dialog-scroll { overflow: visible; }
}
