/* Profile presentation, shared by account owners and visitors.
   Loaded after the legacy profile and award styles, like player-cinema.css. */
.modal-overlay.jw-profile-overlay {
  padding: 0;
  background: #101012;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  align-items: stretch;
  justify-items: stretch;
}
.jw-profile-overlay .jw-profile-shell {
  --profile-gold: #ecd58e;
  --profile-gold-rgb: 236, 213, 142;
  --profile-muted: #b5b0a7;
  --profile-line: rgba(244, 240, 232, .12);
  --profile-background:
    radial-gradient(ellipse at 95% 4%, rgba(128, 136, 159, .12), transparent 48%),
    radial-gradient(ellipse at 10% 96%, rgba(160, 132, 73, .08), transparent 52%),
    #101012;
  --profile-gutter: clamp(24px, 5vw, 80px);
  --profile-width: 1160px;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
  color: #f4f0e8;
  background: var(--profile-background);
  background-attachment: fixed;
  box-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: #6c6659 transparent;
  scroll-padding-top: 90px;
}
.jw-profile-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  margin-inline: var(--profile-gutter);
  padding-block: 12px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--profile-line);
  background: var(--profile-background);
  background-attachment: fixed;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.jw-profile-topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--profile-muted);
  letter-spacing: .01em;
}
.jw-profile-topbar .jw-profile-close {
  position: relative;
  float: none;
  inset: auto;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  color: #c6c2ba;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.jw-profile-topbar .jw-profile-close:hover {
  background: rgba(255, 255, 255, .07);
  color: #f4f0e8;
  transform: none;
}
.jw-profile-view {
  min-height: 0;
  padding: 32px var(--profile-gutter) 64px;
  box-sizing: border-box;
}
.jw-profile-hero,
.jw-profile-content,
.jw-profile-view > .jw-profile-account-security {
  width: 100%;
  max-width: var(--profile-width);
  margin-inline: auto;
  box-sizing: border-box;
}
.jw-profile-hero { border-radius: 16px; }
.jw-profile-banner,
.jw-profile-hero.has-banner .jw-profile-banner {
  min-height: 0;
  height: clamp(140px, 15vw, 204px);
  border-radius: 16px;
  background-color: #222125;
  background-image: linear-gradient(115deg, #393327, #222329 60%, #30333d);
}
.jw-profile-hero.has-banner .jw-profile-banner {
  height: auto;
  min-height: 220px;
  max-height: 340px;
  aspect-ratio: 4 / 1;
}
.jw-profile-banner::before { display: none; }
.jw-profile-banner-shade,
.jw-profile-banner.has-image .jw-profile-banner-shade {
  background: linear-gradient(180deg, transparent 35%, rgba(16, 16, 18, .36));
}
.jw-profile-identity-bar {
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 28px;
  min-height: 0;
  margin: -36px 0 0;
  padding: 0 28px 32px;
  align-items: start;
  border-bottom: 0;
  background: none;
}
.jw-profile-avatar-wrap {
  width: 124px;
  height: 124px;
  border-radius: 50%;
}
.jw-profile-avatar-media {
  width: 116px;
  height: 116px;
  border: 5px solid #151517;
  border-radius: inherit;
  box-sizing: border-box;
  background: #29282a;
}
.jw-profile-identity-copy { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 16px; padding-top: 52px; }
.jw-profile-identity-copy > :is(.jw-profile-metadata, .jw-profile-achievement-badges) { margin-top: 0; }
/* Compensate for the large heading's font leading when centering the small text. */
.jw-profile-identity-copy > .jw-profile-metadata { transform: translateY(-8px); }
.jw-profile-name-line > .vault-origins-badge { transform: translateY(3px); }
.jw-profile-name-line { gap: 12px; align-items: center; flex-wrap: wrap; }
.jw-profile-shell .jw-profile-name {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 750;
  line-height: 1.25;
  padding-block: .06em;
  max-width: 100%;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.jw-profile-online {
  min-height: 24px;
  padding: 0;
  color: #a0c5ae;
  background: none;
  border: 0;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.jw-profile-online::before { width: 5px; height: 5px; box-shadow: none; }
.jw-profile-metadata {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin-top: 12px;
}
.jw-profile-metadata .jw-profile-username,
.jw-profile-metadata .jw-profile-member-since {
  margin: 0;
  color: var(--profile-muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.jw-profile-metadata .jw-profile-member-since { color: #928e87; }
.jw-profile-achievement-badges {
  gap: 6px;
  margin-top: 16px;
  max-height: none;
  flex-wrap: wrap;
  overflow: visible;
}
.jw-profile-achievement-badge {
  gap: 7px;
  min-height: 36px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(236, 213, 142, .14);
  border-radius: 8px;
  color: #cbc1a5;
  background: rgba(236, 213, 142, .035);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}
.jw-profile-achievement-badge-label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
}
.jw-profile-owner-actions {
  align-self: start;
  gap: 8px;
  margin: 56px 0 0;
  padding: 0;
}
.jw-profile-edit-button,
.jw-profile-logout-button {
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 9px;
  border: 1px solid var(--profile-line);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: none;
}
.jw-profile-edit-button { background: var(--profile-gold); color: #201c12; border-color: transparent; }
.jw-profile-logout-button { background: transparent; color: var(--profile-muted); }
.jw-profile-edit-button:hover,
.jw-profile-edit-button:focus-visible { background: #f4dfa4; color: #201c12; transform: none; }
.jw-profile-logout-button:hover { background: #ffffff08; color: #f4f0e8; transform: none; }
.jw-profile-content {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  grid-template-areas: none;
  align-items: start;
  gap: 64px;
  padding: 8px 0 0;
}
.jw-profile-main-column,
.jw-profile-side-column {
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  gap: 0;
}
.jw-profile-content .jw-profile-card {
  grid-area: auto;
  width: 100%;
  height: auto;
  padding: 28px 0;
  border: 0;
  border-top: 1px solid var(--profile-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.jw-profile-card-heading { gap: 12px; margin-bottom: 18px; }
.jw-profile-card-heading h3,
.jw-profile-shell .jw-account-awards h3 { font-size: 17px; font-weight: 650; letter-spacing: -.025em; }
.jw-profile-card-kicker { color: #8d877a; font-size: 9px; font-weight: 500; letter-spacing: .12em; }
.jw-profile-shell .jw-profile-bio { min-height: 0; color: #c1bdb5; font-size: 14px; line-height: 1.8; }
.jw-profile-bio.is-empty { color: #928e87; font-style: normal; }
.jw-profile-pinned-list { gap: 6px; }
.jw-profile-song {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 10px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}
.jw-profile-song:hover { background: rgba(255, 255, 255, .035); transform: none; }
.jw-profile-song-cover { width: 48px; height: 48px; border-radius: 7px; }
.jw-profile-song-copy strong,
.jw-profile-song-copy span { white-space: normal; overflow-wrap: anywhere; }
.jw-profile-song-copy strong { font-size: 14px; font-weight: 600; line-height: 1.45; }
.jw-profile-song-copy span { font-size: 12px; color: var(--profile-muted); }
.jw-profile-song-action {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--profile-line);
  background: transparent;
  color: var(--profile-gold);
}
.jw-profile-empty { min-height: 0; padding: 12px 0; border: 0; background: none; color: #928e87; font-size: 13px; }
.jw-profile-stats-grid { gap: 0; }
.jw-profile-stat { align-items: start; padding: 4px 12px 4px 0; border: 0; border-radius: 0; background: none; text-align: start; }
.jw-profile-stat + .jw-profile-stat { padding-left: 18px; border-left: 1px solid var(--profile-line); }
.jw-profile-stat strong { color: #eee8d8; font-size: clamp(23px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.jw-profile-shell .jw-profile-stat span { margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--profile-muted); }
.jw-achievements-help { margin-top: 20px; color: #c9b888; font-size: 12px; font-weight: 500; text-decoration: none; }
.jw-achievements-help:hover { text-decoration: underline; text-underline-offset: 4px; }
.jw-profile-quiz-card { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 12px 20px; }
.jw-profile-quiz-card::after { display: block; width: 240px; right: -32px; bottom: -64px; opacity: .16; }
.jw-profile-quiz-label { position: relative; z-index: 1; }
.jw-profile-quiz-label { grid-column: 1 / -1; font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--profile-muted); }
.jw-profile-quiz-rating { margin: 0; font-size: 40px; line-height: 1.2; font-weight: 550; color: var(--profile-gold); }
.jw-profile-quiz-record { position: static; margin: 0; font-size: 12px; line-height: 1.6; color: var(--profile-muted); }
.jw-profile-shell .vault-award-line { gap: 18px; padding-bottom: 20px; }
.jw-profile-shell .vault-award-copy strong { font-size: 15px; font-weight: 600; }
.jw-profile-shell .vault-award-copy p { font-size: 12px; }
.jw-profile-shell .vault-award-frame-choice { padding-top: 20px; border-color: var(--profile-line); }
.jw-profile-shell .vault-award-switch strong { font-size: 13px; }
.jw-profile-shell .vault-award-button { font-size: 12px; min-height: 44px; background: #ffffff06; border-color: var(--profile-line); }
.jw-profile-shell .vault-award-button.is-primary { background: var(--profile-gold); color: #201c12; }
.jw-profile-content .jw-profile-telegram-card { margin: 0; }
.jw-profile-telegram-heading { flex-wrap: wrap; gap: 12px; }
.jw-profile-telegram-icon { color: var(--profile-muted); background: #ffffff07; }
.jw-profile-telegram-description,
.jw-recognition-description { color: var(--profile-muted); }
.jw-profile-telegram-action { font-family: inherit; font-size: 12px; box-shadow: none; }
.jw-profile-telegram-action.is-primary { color: #201c12; background: var(--profile-gold); border-color: transparent; }
.jw-profile-telegram-action.is-muted { color: var(--profile-muted); background: transparent; border-color: var(--profile-line); }
.jw-recognition-eyebrow { color: #928e87; font-size: 9px; font-weight: 500; }
.jw-recognition-song { padding: 10px 0; }
.jw-recognition-empty { padding: 20px; border-style: solid; border-color: var(--profile-line); background: #ffffff02; }
.jw-profile-view > .jw-profile-account-security {
  margin-top: 28px;
  margin-bottom: 0;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid var(--profile-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.jw-profile-shell .settings-section-copy h3 { font-size: 17px; }
.jw-profile-shell .settings-security-form { padding: 20px; border-color: var(--profile-line); border-radius: 12px; background: #ffffff03; }
.jw-profile-shell input:not([type=radio]):not([type=checkbox]),
.jw-profile-shell textarea { border-color: var(--profile-line); color: #f4f0e8; background-color: #ffffff05; }
.jw-profile-shell input:focus-visible,
.jw-profile-shell textarea:focus-visible { outline: 2px solid var(--profile-gold); outline-offset: 3px; }
.jw-profile-editor { width: 100%; max-width: 960px; margin-inline: auto; padding: 48px var(--profile-gutter) 64px; box-sizing: border-box; }
.jw-profile-editor-heading { margin: 0 0 32px; }
.jw-profile-editor-heading h2 { margin-top: 8px; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.04em; }
.jw-profile-editor-kicker { color: var(--profile-muted); font-size: 10px; font-weight: 500; }
.jw-profile-editor-form { gap: 28px; }
.jw-profile-editor-section { padding: 24px 0; border: 0; border-top: 1px solid var(--profile-line); border-radius: 0; background: none; box-shadow: none; }
.jw-profile-file-field { grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px dashed #ffffff25; background: #ffffff03; border-radius: 12px; }
.jw-profile-file-field > strong { grid-column: 1 / -1; }
.jw-profile-file-name { grid-column: 1 / -1; grid-row: 2; white-space: normal; overflow-wrap: anywhere; color: var(--profile-muted); line-height: 1.6; }
.jw-profile-file-choose { display: grid; place-items: center; grid-column: 1; grid-row: 3; box-sizing: border-box; text-align: center; }
.jw-profile-file-remove { grid-column: 2; grid-row: 3; }
.jw-profile-file-field:focus-within { border-color: var(--profile-gold); }
.jw-profile-file-choose,
.jw-profile-file-remove,
.jw-profile-editor-back { min-height: 44px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--profile-line); color: #d7d1c4; background: #ffffff05; font-family: inherit; }
.jw-profile-aura-option { border-color: var(--profile-line); border-radius: 10px; background: #ffffff03; }
.jw-profile-editor-footer { padding-block: 16px; background: var(--profile-background); background-attachment: fixed; backdrop-filter: none; -webkit-backdrop-filter: none; }
.jw-profile-save { background: var(--profile-gold); box-shadow: none; border-radius: 9px; font-family: inherit; }
.jw-profile-shell :is(.jw-achievements-dialog, .jw-profile-telegram-dialog) { background: #1c1b1d; border-color: #ffffff25; color: #f4f0e8; }
.jw-profile-shell .jw-achievements-action.is-primary { background: var(--profile-gold); border-color: transparent; }
.jw-profile-shell .jw-achievements-level.is-current { background: #ecd58e0b; border-color: #ecd58e55; }
.jw-profile-shell button:focus-visible { outline: 2px solid var(--profile-gold); outline-offset: 4px; }

/* Center the content box explicitly; icon placement must not depend on font metrics. */
#profileModal button,
#accountAwardDialog button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.4;
}
#profileModal .jw-profile-song-action { flex-shrink: 0; padding: 0; }
.jw-profile-action-icon { display: block; flex: 0 0 18px; width: 18px; height: 18px; }
#profileModal .jw-profile-file-choose { display: flex; align-items: center; justify-content: center; text-align: center; }
#profileModal .jw-achievements-help { width: fit-content; }
#profileModal .vault-origins-badge { padding: 0; }
#profileModal .jw-profile-achievement-badge-label { text-align: center; }

@media (min-width: 761px) {
  /* Align the avatar with the text itself, excluding the text column's top inset. */
  .jw-profile-identity-bar .jw-profile-avatar-wrap { align-self: center; margin-top: 52px; }
  /* Extend the image behind the identity controls without moving the content down. */
  .jw-profile-hero.has-banner .jw-profile-banner {
    height: clamp(220px, calc((100vw - 2 * var(--profile-gutter)) / 4), 290px);
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    padding-bottom: 96px;
    box-sizing: content-box;
    mask-image: linear-gradient(#000 55%, transparent 100%);
    -webkit-mask-image: linear-gradient(#000 55%, transparent 100%);
  }
  .jw-profile-hero.has-banner .jw-profile-identity-bar { margin-top: -132px; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .jw-profile-identity-bar { grid-template-columns: 108px minmax(0, 1fr); gap: 20px; padding-inline: 20px; }
  .jw-profile-avatar-wrap { width: 104px; height: 104px; }
  .jw-profile-avatar-media { width: 98px; height: 98px; }
  .jw-profile-owner-actions { grid-column: 2; justify-self: start; margin-top: 0; }
  .jw-profile-content { gap: 36px; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); }
}
@media (max-width: 760px) {
  .jw-profile-overlay .jw-profile-shell { --profile-gutter: 24px; }
  .jw-profile-topbar { min-height: 68px; padding-top: max(8px, env(safe-area-inset-top)); }
  .jw-profile-view { padding-top: 24px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .jw-profile-banner,
  .jw-profile-hero.has-banner .jw-profile-banner { height: 144px; border-radius: 12px; }
  .jw-profile-hero.has-banner .jw-profile-banner { height: 180px; min-height: 180px; max-height: none; }
  .jw-profile-identity-bar { grid-template-columns: 1fr; margin-top: -32px; padding: 0 0 28px; gap: 20px; }
  .jw-profile-avatar-wrap { width: 94px; height: 94px; margin-left: 20px; }
  .jw-profile-avatar-media { width: 88px; height: 88px; }
  .jw-profile-identity-copy { padding-top: 0; }
  .jw-profile-identity-copy > .jw-profile-metadata { transform: translateY(-4px); }
  .jw-profile-shell .jw-profile-name { font-size: clamp(30px, 6vw, 40px); }
  .jw-profile-metadata { gap: 4px 14px; margin-top: 10px; }
  .jw-profile-owner-actions { grid-column: auto; justify-self: stretch; display: flex; flex-wrap: wrap; width: 100%; margin-top: 0; }
  .jw-profile-edit-button { flex: 1; }
  .jw-profile-achievement-badges { margin-top: 14px; }
  .jw-profile-achievement-badge { min-height: 44px; padding: 8px 10px; font-size: 11px; }
  .jw-profile-content { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  .jw-profile-main-column,
  .jw-profile-side-column { display: contents; }
  .jw-profile-about { order: 0; }
  .jw-profile-stats-card { order: 1; }
  .jw-profile-pinned { order: 2; }
  .jw-account-awards { order: 3; }
  .jw-profile-quiz-card { order: 4; }
  .jw-profile-recognitions { order: 5; }
  .jw-profile-telegram-card { order: 6; }
  .jw-profile-content .jw-profile-card { padding: 24px 0; }
  .jw-profile-card-heading { margin-bottom: 16px; }
  .jw-profile-stat strong { font-size: 28px; }
  .jw-profile-shell .jw-profile-stat span { font-size: 11px; }
  .jw-profile-view > .jw-profile-account-security { grid-template-columns: minmax(0, 1fr); margin-top: 0; padding-top: 24px; }
  .jw-profile-shell .vault-award-frame-choice { gap: 16px; }
  .jw-profile-shell .vault-award-line { align-items: start; gap: 16px; }
  .jw-profile-shell .vault-award-record { flex-shrink: 0; }
  .jw-profile-shell .vault-award-copy strong { font-size: 14px; }
  .jw-profile-editor { padding: 28px 24px 40px; }
  .jw-profile-editor-heading { margin: 0 0 24px; }
  .jw-profile-editor-heading h2 { font-size: 30px; }
  .jw-profile-editor-back { margin-top: 16px; }
  .jw-profile-media-grid,
  .jw-profile-info-grid { grid-template-columns: minmax(0, 1fr); }
  .jw-profile-aura-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jw-profile-editor-footer { bottom: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .jw-profile-overlay .jw-profile-shell { --profile-gutter: 18px; }
  .jw-profile-name-line { gap: 8px; }
  .jw-profile-shell .jw-profile-name { font-size: 28px; }
  .jw-profile-stat strong { font-size: 25px; }
  .jw-profile-stat + .jw-profile-stat { padding-left: 12px; }
  .jw-recognition-song-actions { flex-wrap: wrap; }
}
