.account-page { background: #080808; }
.account-page [hidden] { display: none !important; }
.profile-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.profile-nav { min-height: 88px; border-bottom: 1px solid #292929; margin: 0 0 54px; }
.profile-nav-links { display: flex; align-items: center; gap: 26px; font-size: .85rem; }
.profile-nav-links a { color: #aaa; text-decoration: none; }
.profile-nav-links button { padding: 10px 0; font-size: .85rem; }
.profile-panel { padding: 0; background: none; border: 0; box-shadow: none; }
.profile-panel h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -.06em; margin: 0; }
.profile-heading { display: flex; gap: 24px; align-items: center; margin-bottom: 38px; }
.profile-heading p:last-child { margin: 14px 0 0; color: #aaa; }
.profile-heading .section-kicker { margin-bottom: 10px; }
.profile-avatar { width: 88px; height: 88px; flex: 0 0 auto; display: grid; place-items: center; background: #f5f5f2; color: #080808; font-size: 2.8rem; font-weight: 750; }
.profile-tabs { display: flex; gap: 32px; border-bottom: 1px solid #333; margin-bottom: 38px; }
.profile-tabs a { padding: 14px 0; color: #ccc; font-size: .85rem; text-decoration: none; border-bottom: 2px solid transparent; }
.profile-tabs a:hover, .profile-tabs a:focus-visible { color: white; border-bottom-color: white; }
.account-page section[id], #profileLibraryTitle { scroll-margin-top: 24px; }
.profile-section-title { margin-bottom: 24px; }
.profile-section-title .section-kicker { color: #969696; font-size: .65rem; margin-bottom: 10px; }
.profile-section-title h2 { font-size: 1.65rem; line-height: 1.2; letter-spacing: -.035em; margin: 0; }
.profile-section-title > p:last-child:not(.section-kicker) { color: #aaa; font-size: .9rem; margin: 10px 0 0; }
.profile-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid #303030; background: #101010; margin: 0; }
.profile-list div { display: block; padding: 24px; min-width: 0; border: 0; }
.profile-list dt { color: #999; font-size: .75rem; margin-bottom: 10px; }
.profile-list dd { font-size: 1rem; line-height: 1.6; }
.profile-list div:nth-child(2) { grid-column: span 2; }
.profile-list div:nth-child(n+3) { border-top: 1px solid #303030; }
.profile-list dd button { display: block; padding: 8px 0; font-size: .8rem; text-underline-offset: 4px; }
.profile-library, .account-settings { border-top: 0; padding-top: 0; margin-top: 48px; }
.profile-library-status { gap: 16px; }
.profile-library-section { gap: 16px; }
.profile-library-item { padding: 26px; border-color: #333; background: #121212; gap: 14px; }
.profile-library-item strong { font-size: 1.45rem; letter-spacing: -.03em; }
.profile-library-item .library-art { width: 100%; height: 170px; object-fit: cover; margin-bottom: 8px; }
.profile-library-item:has(.library-art) { display: grid; grid-template-columns: 240px minmax(0,1fr); column-gap: 28px; align-items: center; }
.profile-library-item .library-art { grid-column: 1; grid-row: 1 / span 3; margin: 0; height: 180px; }
.profile-library-item:has(.library-art) > :not(.library-art) { grid-column: 2; }
.profile-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.profile-form { border: 1px solid #303030; background: #101010; padding: 28px; margin: 0; min-width: 0; }
.profile-form h3 { margin: 0; font-size: 1.3rem; letter-spacing: -.025em; }
.settings-description { color: #aaa; font-size: .88rem; line-height: 1.65; margin: 10px 0 24px; }
.profile-form input { width: 100%; min-height: 46px; margin-bottom: 16px; background: #080808; }
.profile-form label { color: #ccc; margin-bottom: 8px; }
.account-page .btn-primary { align-self: flex-start; min-height: 44px; padding: 12px 20px; color: #080808; font-size: .72rem; }
.account-page .btn-primary:hover { color: white; }
.account-page button:disabled { opacity: .55; cursor: wait; }
.account-page .form-hint { color: #aaa; font-size: .85rem; line-height: 1.65; }
.account-page .form-hint.error { color: white; border-left: 2px solid white; padding-left: 12px; }
.profile-form .form-hint { margin: 16px 0 0; }
.profile-footer { display: flex; gap: 24px; align-items: center; padding-block: 32px; margin-top: 54px; border-top: 1px solid #292929; color: #999; font-size: .78rem; }
.profile-footer span { margin-right: auto; }
#profileLoading, #profileLoggedOut { max-width: 700px; min-height: 320px; padding-block: 36px; }
#profileLoggedOut .profile-action-link { margin-top: 20px; }
@media (max-width: 760px) {
  .profile-shell { width: calc(100% - 32px); }
  .profile-nav { min-height: 72px; margin-bottom: 32px; }
  .profile-settings-grid { grid-template-columns: 1fr; }
  .profile-heading { gap: 16px; }
  .profile-avatar { width: 60px; height: 60px; font-size: 2rem; }
  .profile-heading p:last-child { font-size: .85rem; }
  .profile-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-list div:nth-child(2) { grid-column: auto; }
  .profile-list div { padding: 18px; }
  .profile-list div:last-child { grid-column: 1 / -1; }
  .profile-library-item:has(.library-art) { display: flex; flex-direction: column; align-items: stretch; }
  .profile-library-item .library-art { height: auto; aspect-ratio: 16 / 9; }
  .profile-form { padding: 22px; }
}
@media (max-width: 420px) {
  .profile-list { grid-template-columns: 1fr; }
  .profile-list div:nth-child(2) { border-top: 1px solid #303030; }
  .profile-heading { align-items: flex-start; }
  .profile-heading h1 { font-size: 2.15rem; }
  .profile-avatar { width: 48px; height: 48px; font-size: 1.6rem; }
  .profile-nav-links { gap: 16px; }
}
