/* Account studio: identity and points stay visible; settings are grouped by task. */
#profileView {
  --profile-ink: #2d2040;
  --profile-muted: #71637d;
  --profile-border: #e7deee;
  --profile-soft: #f5f0fb;
  --profile-purple: #653baf;
  animation: none;
}
.profile-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
#profileView .profile-page-heading .eyebrow { margin: 0 0 7px; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
#profileView .page-title { margin: 0; font-size: clamp(30px, 3vw, 39px); letter-spacing: -.04em; font-weight: 700; }
.profile-page-heading p:not(.eyebrow) { margin: 9px 0 0; color: var(--profile-muted); font-size: 14px; line-height: 1.7; }
.profile-home-link { flex-shrink: 0; display: inline-flex; align-items: center; gap: 16px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--profile-border); border-radius: 12px; background: #ffffffbb; color: var(--profile-purple); text-decoration: none; font-size: 12px; font-weight: 600; }
.profile-home-link:hover { background: #fff; border-color: #cbb5e5; }
.profile-identity { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); align-items: center; gap: 32px; padding: 30px; border: 1px solid #dfd1ef; border-radius: 26px; background: radial-gradient(ellipse at 5% 0, #eadcf8, transparent 65%), #fff; box-shadow: 0 9px 35px #49267706; }
.profile-identity::before { content: ''; position: absolute; z-index: -1; width: 250px; height: 250px; left: -120px; top: -150px; border: 1px solid #d5bce9; border-radius: 50%; box-shadow: 0 0 0 28px #dbc3ef22, 0 0 0 58px #dbc3ef18; }
.profile-identity-main { display: flex; align-items: center; min-width: 0; gap: 22px; }
.profile-avatar-art { flex: 0 0 86px; height: 86px; display: grid; place-items: center; border: 5px solid #fff; border-radius: 26px; background: linear-gradient(145deg, #8052bb, #4d297e); color: #fff; box-shadow: 0 9px 22px #56358525; }
.profile-avatar-art svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.profile-identity-copy { min-width: 0; }
.profile-identity-kicker { color: #76519b; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
#profileView .profile-identity-copy h2 { margin: 7px 0 6px; font: 600 clamp(23px, 2.4vw, 30px)/1.2 var(--font-display); color: var(--profile-ink); letter-spacing: -.035em; overflow-wrap: anywhere; }
.profile-identity-copy p { margin: 0; color: var(--profile-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.profile-role-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 4px 9px; border: 1px solid #d9c5ed; border-radius: 7px; background: #fff9; color: #64428a; font-size: 10px; font-weight: 600; }
.profile-role-badge::before { content: ''; width: 5px; height: 5px; background: #8151ba; border-radius: 50%; }
.profile-score-card { display: flex; align-items: center; gap: 18px; padding: 22px; border: 1px solid #ebd8b4; border-radius: 20px; background: linear-gradient(125deg, #fff5db, #fffcf6); color: #65471d; }
.profile-score-icon { flex: 0 0 50px; height: 50px; display: grid; place-items: center; border: 1px solid #edcf8e; border-radius: 16px; background: linear-gradient(145deg, #fff4cb, #f5d98e); color: #946210; box-shadow: 0 5px 12px #b68c3212; }
.profile-score-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.profile-score-card small { font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.profile-score-number { display: flex; align-items: baseline; gap: 7px; margin: 4px 0; }
#profileView .profile-score-number strong { color: #68431b; font: 600 42px/1.05 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.profile-score-number span { font-size: 12px; }
.profile-score-card p { margin: 6px 0 0; font-size: 10px; line-height: 1.6; color: #85643c; }
.profile-tabs { display: inline-flex; max-width: 100%; gap: 4px; margin: 28px 0 24px; padding: 5px; border: 1px solid #e4d9ef; border-radius: 15px; background: #eee7f6; }
#profileView .profile-tabs button { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #756185; box-shadow: none; font-size: 12px; font-weight: 600; }
#profileView .profile-tabs button:hover { color: var(--profile-purple); background: #ffffff66; }
#profileView .profile-tabs button[aria-selected="true"] { border-color: #e5d9ee; color: #533083; background: #fff; box-shadow: 0 3px 9px #3e245b0c; }
.profile-tabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.profile-tab-panel[hidden] { display: none !important; }
.profile-settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.profile-setting-card { min-width: 0; padding: 26px; border: 1px solid var(--profile-border); border-radius: 22px; background: #fff; box-shadow: 0 6px 20px #44206204; }
.profile-card-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 24px; }
.profile-section-icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border: 1px solid #e7dcf2; border-radius: 13px; background: #f6f1fb; color: var(--profile-purple); }
.profile-section-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#profileView .profile-card-heading h2 { margin: 1px 0 6px; color: var(--profile-ink); font-size: 20px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
.profile-card-heading p { margin: 0; color: var(--profile-muted); font-size: 12px; line-height: 1.7; }
#profileForm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
#profileForm>.field:nth-child(-n+2) { grid-column: 1/-1; }
#profileView .field { margin: 0; min-width: 0; display: grid; align-content: start; gap: 7px; }
#profileView .field label { margin: 0; color: #51415e; font-size: 12px; font-weight: 600; }
#profileView .field input, #profileView .field select { min-width: 0; min-height: 48px; width: 100%; border: 1px solid #dfd4e8; border-radius: 11px; padding: 11px 13px; background: #fdfbff; color: var(--profile-ink); font-size: 14px; box-shadow: 0 1px 2px #37234803; }
#profileView .field input:focus, #profileView .field select:focus { border-color: #a281c5; background: #fff; }
#profileView .field input[readonly] { color: #786787; background: #f4f0f8; cursor: text; }
#profileView .field small { color: var(--profile-muted); font-size: 10px; line-height: 1.6; }
.profile-form-footer { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 18px; border-top: 1px solid #efe7f4; }
.profile-form-footer small { max-width: 180px; color: var(--profile-muted); font-size: 10px; line-height: 1.7; }
#profileView button[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 46px; padding: 11px 17px; border: 1px solid #643c9e; border-radius: 11px; background: linear-gradient(135deg, #7648b6, #5a3497); color: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 5px 14px #57318b16; }
#profileView button[type="submit"]:hover { background: #58318f; box-shadow: 0 7px 17px #57318b22; }
.profile-email-note { display: flex; gap: 12px; margin-bottom: 22px; padding: 14px; border: 1px solid #e4dced; border-radius: 13px; background: #f8f5fc; color: #79618f; }
.profile-email-note svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.profile-email-note p { margin: 0; color: #74617f; font-size: 12px; line-height: 1.8; }
#profileView .profile-email-card form, #profileView .profile-security-grid form { display: grid; gap: 20px; }
#profileView .profile-email-card button[type="submit"], #profileView .profile-security-grid button[type="submit"] { justify-self: start; }
#profileView .email-step-box { margin-top: 20px; padding-top: 20px; }
#profileView .email-step-box>.summary { margin: 0; font-size: 13px; line-height: 1.7; }
.profile-security-intro { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding: 19px 22px; border: 1px solid #dfd2ed; border-radius: 17px; background: #efe7f955; }
#profileView .profile-security-intro h2 { margin: 0 0 5px; color: #49355c; font-size: 18px; font-weight: 600; }
.profile-security-intro p { margin: 0; color: var(--profile-muted); font-size: 12px; line-height: 1.7; }
.profile-security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#profileView .twofa-status-pill { margin: 0 0 20px; padding: 6px 10px; font-size: 11px; font-weight: 600; border: 1px solid #ded4e8; }
#profileView .twofa-status-pill.enabled { border-color: #baddcc; color: #246046; background: #edf8f2; }
.profile-achievements-card .profile-card-heading>div { flex: 1; min-width: 0; }
.profile-count-chip { padding: 6px 10px; border: 1px solid #e5d8ef; border-radius: 9px; background: #f7f2fc; color: #795694; font-size: 11px; white-space: nowrap; }
.profile-achievement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.profile-achievement { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 23px; border: 1px solid #e4d5f0; border-radius: 18px; background: radial-gradient(ellipse at top right, #f7e9c8, transparent 65%), #fcf9ff; }
.profile-achievement>span { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #e1c082; border-radius: 15px; background: #fff4d9; color: #947028; }
.profile-achievement svg { width: 25px; height: 25px; }
#profileView .profile-achievement h3 { margin: 0; color: #5d4182; font-size: 17px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.profile-achievement p { margin: 7px 0 0; color: var(--profile-muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.profile-achievement-empty { grid-column: 1/-1; display: flex; align-items: center; gap: 24px; padding: 26px; border: 1px dashed #d8c6e9; border-radius: 18px; background: #faf7fd; }
.profile-achievement-empty img { width: 110px; height: 110px; object-fit: contain; }
#profileView .profile-achievement-empty h3 { margin: 0 0 8px; color: #573a73; font-size: 21px; font-weight: 600; }
.profile-achievement-empty p { margin: 0 0 15px; color: var(--profile-muted); font-size: 13px; line-height: 1.8; }
.profile-achievement-empty a { display: inline-flex; min-height: 44px; align-items: center; color: var(--profile-purple); font-size: 12px; font-weight: 700; text-decoration: none; }
.profile-achievement-empty a:hover { text-decoration: underline; }
#profileView :focus-visible { outline: 3px solid #b69bd3; outline-offset: 3px; }
@media (max-width: 1180px) {
  .profile-identity { grid-template-columns: minmax(0, 1.2fr) minmax(250px, 1fr); padding: 24px; gap: 20px; }
  .profile-identity-main { gap: 16px; }
  .profile-avatar-art { flex-basis: 66px; height: 66px; border-radius: 21px; }
  .profile-avatar-art svg { width: 32px; height: 32px; }
  .profile-score-card { padding: 18px; gap: 14px; }
  .profile-score-icon { flex-basis: 42px; height: 42px; border-radius: 13px; }
  .profile-score-icon svg { width: 27px; height: 27px; }
  .profile-setting-card { padding: 22px; }
  .profile-settings-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .profile-security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-achievement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .profile-page-heading { align-items: flex-start; gap: 16px; }
  .profile-page-heading p:not(.eyebrow) { font-size: 13px; }
  .profile-home-link { display: none; }
  .profile-identity { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 22px; border-radius: 22px; }
  .profile-identity-kicker { font-size: 8px; }
  .profile-identity-copy p { font-size: 11px; }
  .profile-score-card { gap: 16px; }
  .profile-score-number { margin: 6px 0; }
  #profileView .profile-score-number strong { font-size: 37px; }
  .profile-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 3px; margin-top: 22px; padding: 4px; }
  #profileView .profile-tabs button { flex-direction: column; min-width: 0; gap: 5px; min-height: 64px; padding: 8px 5px; font-size: 10px; }
  .profile-tabs svg { width: 19px; height: 19px; }
  .profile-security-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-card-heading { gap: 11px; }
  #profileView .profile-card-heading h2 { font-size: 19px; }
  .profile-card-heading p { font-size: 12px; }
  #profileForm { grid-template-columns: minmax(0, 1fr); }
  #profileForm>.field { grid-column: 1; }
  #profileView .field input, #profileView .field select { font-size: 16px; }
  .profile-form-footer { align-items: flex-start; flex-direction: column; gap: 14px; }
  .profile-form-footer small { max-width: none; }
  #profileView button[type="submit"] { width: 100%; font-size: 12px; }
  .profile-security-intro { padding: 16px; align-items: flex-start; }
  .profile-achievement-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-achievements-card .profile-card-heading { flex-wrap: wrap; }
  .profile-count-chip { margin-left: 55px; }
  .profile-achievement-empty { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; }
  .profile-achievement-empty img { width: 90px; height: 90px; }
}
