.profile-settings-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 20px; margin-top: 16px;
  border: 1px solid var(--border, #e6e5e9); border-radius: 999px;
  background: #fff; color: var(--text); font-size: 16px; font-weight: 750;
  text-decoration: none;
}
.profile-settings-link[hidden], .settings-page [hidden] { display: none !important; }
.profile-settings-link:focus-visible, .settings-page :is(a,button,input,textarea,summary):focus-visible {
  outline: 3px solid #bd2579; outline-offset: 3px;
}
.settings-page { background: #fff; color: var(--text); }
.settings-page > .page-shell { width: 100%; max-width: 680px; margin: auto; padding: 0; }
.settings-header {
  display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center;
  position: sticky; top: 0; z-index: 20; background: #fff;
  padding: calc(16px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 16px max(16px,env(safe-area-inset-left,0px));
}
.settings-header h1 { width: 100%; max-width: none; min-width: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; text-align: center; margin: 0; }
.settings-header a { display: grid; place-items: center; width: 44px; height: 44px; color: inherit; }
.settings-page svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 24px; }
.settings-main { padding: 8px max(16px,env(safe-area-inset-right,0px)) 24px max(16px,env(safe-area-inset-left,0px)); display: grid; gap: 28px; }
#settingsLoading { padding: 16px; color: var(--text-soft); }
.settings-page .privacy-settings { margin: 0; }
.settings-section > h2, .settings-page .privacy-settings > h3 { margin: 0 0 12px 2px; font-size: 16px; font-weight: 650; color: #666373; }
.settings-list { border: 1px solid #ecebf0; border-radius: 16px; overflow: hidden; }
.settings-row {
  display: flex; gap: 16px; align-items: center; width: 100%; min-width: 0;
  min-height: 56px; padding: 12px 16px; border: 0; background: #fff;
  text-decoration: none; text-align: left; color: inherit; font: inherit; font-size: 15px; cursor: pointer;
  position: relative;
}
.settings-row + .settings-row::before { content: ""; position: absolute; top: 0; left: 56px; right: 16px; height: 1px; background: #eeedf1; }
.settings-row > span:not(.settings-chevron):not(.settings-row-value) { min-width: 0; overflow-wrap: anywhere; }
.settings-chevron, .settings-row-value { margin-left: auto; color: #8c8895; }
.settings-chevron { font-size: 24px; line-height: 1; }
.settings-row-static { cursor: default; }
.settings-row-value { font-size: 14px; }
.settings-account { margin-top: 8px; }
.settings-account summary { min-height: 44px; padding: 14px 2px; cursor: pointer; font-size: 14px; }
.settings-account > .text-button { min-height: 44px; margin-top: 8px; }
.settings-editor-dialog {
  width: min(480px,calc(100% - 32px)); max-height: calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  padding: 20px; border: 1px solid #ecebf0; border-radius: 24px; color: var(--text); background: #fff; overflow-y: auto;
}
.settings-editor-dialog::backdrop { background: #160b244f; }
.settings-editor-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.settings-editor-head h2 { font-size: 20px; margin: 0; }
.settings-editor-head button { width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 50%; background: #f5f4f7; font-size: 26px; }
.settings-editor-dialog :is(form,.profile-avatar-editor) { display: grid; gap: 12px; min-width: 0; }
.settings-editor-dialog :is(input,textarea) { width: 100%; min-width: 0; max-width: 100%; font: inherit; font-size: 16px; }
.settings-editor-dialog :is(input:not([type=file]),textarea) { min-height: 48px; padding: 12px 14px; border: 1px solid #e6e3e9; border-radius: 14px; background: #faf9fb; }
.settings-editor-dialog .button-row { flex-wrap: wrap; }
.settings-editor-dialog .button { min-height: 44px; }
.settings-editor-dialog .profile-avatar { width: 80px; height: 80px; margin-bottom: 16px; border-radius: 50%; }
.settings-editor-dialog .profile-avatar-editor { padding-top: 20px; margin-top: 20px; border-top: 1px solid #ecebf0; }
.settings-editor-dialog .profile-bio-editor { margin: 0; }
.settings-editor-dialog .profile-bio-edit-toggle { min-height: 44px; }
.settings-form-status:empty { display: none; }
.settings-form-status, .settings-form-hint, .settings-identity-warning { font-size: 14px; line-height: 1.5; color: var(--text-soft); overflow-wrap: anywhere; }
.settings-page .privacy-help-dialog { font-size: 15px; }

@media (max-width: 768px) {
  .brandbook-body.profile-page .mobile-app-header:has(.has-notification-bell) > strong { font-size: 32px; }
  .profile-page .profile-mobile-cover { height: 108px; }
  .profile-page .profile-avatar { width: 84px; height: 84px; margin-top: -42px; }
  .profile-page .profile-settings-link { position: absolute; top: 122px; right: 16px; margin: 0; min-height: 44px; }
  .profile-page .profile-meta { margin-top: 20px; gap: 6px; }
  .profile-page .profile-meta h3 { font-size: 28px; line-height: 1.15; overflow-wrap: anywhere; }
  .profile-page .profile-meta .meta { font-size: 16px; }
  .profile-page .profile-meta .card-description { margin-top: 14px; font-size: 16px; line-height: 1.5; }
  .profile-page .profile-social-stats { margin-top: 32px; padding-bottom: 16px; }
  .profile-page :is(.profile-follow-button,.profile-stats article) strong { font-size: 22px; }
  .profile-page :is(.profile-follow-button,.profile-stats article) .meta { font-size: 13px; }
  .profile-page .profile-mobile-tabs { padding-top: 12px; }
  .profile-page .profile-mobile-tabs a.is-active::after { background: #d82f86; }
  .profile-page #profileFollowNotice:empty { display: none; }
  .settings-page .privacy-setting-row { background: #fff; }
}
@media (min-width: 769px) {
  .settings-page > .page-shell { padding-bottom: 40px; }
  .settings-main { padding-top: 24px; }
}
html[data-theme="dark"] .settings-page { background: #15131a; color: #f7f3f8; }
html[data-theme="dark"] .settings-page :is(.settings-header,.settings-row,.privacy-setting-row,.settings-editor-dialog) { background: #201c27; color: #f7f3f8; border-color: #3a3344; }
html[data-theme="dark"] .profile-settings-link { background: var(--surface,#201c27); color: var(--text,#f7f3f8); }
