.profile-page, .player-page { width: min(1160px, calc(100% - 48px)); max-width: 1160px; grid-template-columns: minmax(0, 1fr); padding: 32px 0 64px; margin: 0 auto; }
.profile-card, .player-card { width: 100%; min-width: 0; border: 1px solid var(--tone-ffffff-a7-0588); border-radius: 12px; background: var(--panel-flat); box-shadow: 0 20px 70px var(--tone-000000-a26-6667); }
.profile-page-wrapper::before { background-image: linear-gradient(var(--tone-0a0c0e-a94-902), var(--tone-0a0c0e-a97-2549)), var(--bunker-background-current); }
.player-page-wrapper { background: radial-gradient(ellipse at 50% 0, var(--tone-352719-a20-7843), var(--transparent) 60%), var(--tone-0a0c0e); }
.profile-cover { position: relative; isolation: isolate; width: 100%; height: auto; min-height: 180px; aspect-ratio: 4 / 1; overflow: hidden; border-bottom: 1px solid var(--tone-ffffff-a4-7059); background: radial-gradient(ellipse at 10% 110%, var(--tone-e99a28-a18-8235), var(--transparent) 55%), linear-gradient(115deg, var(--tone-292827), var(--tone-181b1e) 55%, var(--tone-25211d)); }
.profile-cover::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, var(--tone-141719-a67-0588), var(--transparent) 55%), repeating-linear-gradient(125deg, var(--transparent) 0 100px, var(--tone-ffffff-a1-1765) 100px 101px); pointer-events: none; }
.profile-cover > .profile-cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; transform: none; }
.profile-cover-image[hidden] { display: none !important; }
.profile-cover-art { position: absolute; inset: 0; overflow: hidden; pointer-events: none; transition: opacity .2s; }
.profile-cover-art > span { position: absolute; left: 34px; bottom: 20px; color: var(--transparent); -webkit-text-stroke: 1px var(--tone-bba783-a18-8235); font: 900 clamp(50px, 11vw, 150px)/1 var(--font-display); letter-spacing: -.055em; }
.profile-cover-art svg { position: absolute; right: 8%; top: -40%; width: 38%; height: 180%; fill: none; stroke: var(--tone-e5a94d-a8-6275); stroke-width: 1.2; transform: rotate(14deg); }
.profile-cover.has-banner .profile-cover-art { opacity: 0; }
.profile-cover-toolbar { position: absolute; inset: 22px 28px auto; z-index: 2; display: flex; align-items: center; gap: 16px; }
.profile-cover-label, .profile-cover-public-label { font: 700 9px/1.5 var(--font-display); letter-spacing: .16em; color: var(--tone-e7d9bd); text-shadow: 0 1px 8px var(--black); }
.profile-cover-public-label { position: absolute; top: 24px; left: 32px; z-index: 2; }
.profile-cover-edit { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 9px 13px; border: 1px solid var(--tone-ffffff-a18-8235); border-radius: 6px; background: var(--tone-0c0e11-a72-1569); color: var(--tone-f2f2f2); font: 600 11px/1.5 var(--font-body); cursor: pointer; backdrop-filter: blur(8px); }
.profile-cover-edit svg { width: 15px; height: 15px; }
.profile-cover-edit:hover:not(:disabled) { border-color: var(--tone-f2b657); background: var(--tone-191b1f); }
.profile-cover-edit:disabled { opacity: .5; cursor: wait; }
#profileBannerStatus { color: var(--tone-d6e7c3); font-size: 11px; margin-left: auto; text-shadow: 0 1px 5px var(--black); }
.profile-hero, .player-heading { position: relative; z-index: 2; margin-top: -52px; padding: 0 32px 26px; display: flex; align-items: flex-start; gap: 24px; border-bottom: 0; }
.profile-avatar-shell, .player-avatar { flex: 0 0 132px; width: 132px; height: 132px; padding: 0; border: 6px solid var(--panel-flat); border-radius: 50%; background: var(--tone-252a30); box-shadow: none; }
.profile-hero-copy, .player-heading-copy { min-width: 0; flex: 1; padding-top: 66px; }
.profile-eyebrow, .player-eyebrow { display: block; margin: 0 0 5px; color: var(--tone-999a9e); font: 600 9px/1.5 var(--font-display); letter-spacing: .13em; }
.profile-hero .profile-player-name, .player-heading h1 { margin: 0 0 8px; font: 800 clamp(24px, 3vw, 34px)/1.2 var(--font-display); letter-spacing: -.035em; color: var(--tone-f4f5f6); overflow-wrap: anywhere; }
.profile-equipped-title { display: inline-flex; margin: 0; }
.profile-hero-copy .cos-title, .player-heading-copy .cos-title { padding: 3px 6px; font-size: 9px; line-height: 1.4; box-shadow: none; }
.profile-account-id { margin: 9px 0 0; gap: 6px 10px; font-size: 10px; color: var(--tone-8f9298); justify-content: flex-start; }
.profile-account-id strong { color: var(--tone-acafb6); letter-spacing: .035em; font-weight: 500; }
.profile-account-id button { min-height: 28px; padding: 3px 7px; border: 1px solid var(--border-card); border-radius: 5px; color: var(--tone-b9a78a); font-size: 10px; }
.profile-hero-actions { padding-top: 70px; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex: 0 0 auto; }
.profile-hero-actions .profile-status { margin: 0; padding: 0; border: 0; background: none; font-size: 10px; color: var(--tone-9fc4ac); }
.profile-hero-actions .profile-status > span:empty { width: 5px; height: 5px; box-shadow: none; }
.profile-hero-actions .profile-avatar-tools { margin: 0; justify-content: flex-end; max-width: 190px; }
.profile-hero-actions .profile-avatar-hint { display: none; }
.profile-hero-actions .profile-avatar-button { min-height: 32px; font-size: 10px; padding: 6px 10px; border-color: var(--tone-ffffff-a10-9804); background: var(--tone-ffffff-a1-5686); color: var(--tone-c6c8ce); }
.profile-tabs { flex-wrap: nowrap; padding: 0 24px; gap: 20px; border-top: 1px solid var(--tone-ffffff-a4-3137); background: var(--tone-111416); overflow-x: auto; scrollbar-width: none; }
.profile-tab { flex: 0 0 auto; min-height: 54px; padding: 16px 8px; border-radius: 0; font-size: 12px; font-weight: 600; white-space: nowrap; }
.profile-tab.is-active, .profile-tab:hover { background: none; color: var(--tone-f5f5f5); }
.profile-tab.is-active { border-bottom-color: var(--tone-efa33a); }
.profile-content { padding: 26px 32px 0; gap: 20px; }
.profile-section, .profile-providers { border-radius: 9px; border-color: var(--tone-ffffff-a4-7059); background: var(--tone-101315); box-shadow: none; }
.profile-section-heading h2 { font-size: 13px; }
.profile-section-heading p { font-size: 11px; }
.profile-security-pane .profile-sessions { padding: 0; }
.profile-security-pane[hidden] { display: none !important; }
.profile-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.profile-shortcut { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 16px; border: 1px solid var(--tone-ffffff-a6-2745); border-radius: 8px; background: var(--tone-ffffff-a0-7843); color: var(--tone-dfe1e5); text-align: left; cursor: pointer; }
.profile-shortcut:hover { border-color: var(--tone-c79244-a30-1961); background: var(--tone-e9a443-a2-3529); }
.profile-shortcut > span:nth-child(2) { min-width: 0; }
.profile-shortcut-icon { color: var(--tone-cda66b); font-size: 25px; line-height: 1; }
.profile-shortcut strong { display: block; font: 600 12px/1.5 var(--font-body); }
.profile-shortcut small { display: block; color: var(--tone-898e98); font: 11px/1.6 var(--font-body); margin-top: 3px; }
.profile-shortcut b { font-size: 16px; margin-left: auto; color: var(--tone-8b9099); font-weight: 400; }
.profile-actions { padding: 22px 32px; border-top: 0; }
.profile-actions .btn { min-height: 36px; padding: 9px 13px; font-size: 10px; }
.profile-actions .btn-primary { border: 1px solid var(--tone-ffffff-a12-549); color: var(--tone-c9cbd0); background: none; box-shadow: none; }
.player-back { margin-bottom: 18px; font-size: 11px; }
.player-facts { display: flex; flex-wrap: wrap; gap: 28px 52px; margin: 0 32px; padding: 20px 0; }
.player-facts dt { font-size: 10px; color: var(--tone-848a94); }
.player-facts dd { font-size: 12px; }
.player-showcase { padding: 24px 32px 30px; }
.player-section-heading h2 { font-size: 12px; }
.player-cosmetic { display: grid; grid-template-columns: 100px minmax(0, 1fr); column-gap: 16px; align-content: center; min-height: 112px; padding: 15px; background: var(--tone-101315); border-radius: 8px; }
.player-cosmetic .cos-preview { grid-column: 1; grid-row: 1 / 3; width: 100%; height: 80px; min-height: 80px; padding: 0; }
.player-cosmetic .cos-preview__avatar { width: 54px; height: 54px; }
.player-cosmetic .cos-preview--title .cos-preview__name { display: none; }
.player-cosmetic .cos-title { white-space: normal; font-size: 8px; padding: 4px; }
.player-cosmetic .cos-title__text { white-space: normal; line-height: 1.4; }
.player-cosmetic h3 { grid-column: 2; align-self: end; margin: 0 0 7px; line-height: 1.5; }
.player-cosmetic p { grid-column: 2; align-self: start; }
.player-card-footer { padding: 16px 32px; background: var(--tone-111416); }
.profile-banner-dialog { position: fixed; inset: 0; margin: auto; width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow-y: auto; border: 1px solid var(--tone-ffffff-a12-549); border-radius: 12px; background: var(--tone-16191c); color: var(--tone-e8e9ed); box-shadow: 0 30px 100px var(--tone-000000-a60); }
html.profile-banner-open { overflow: hidden; scrollbar-gutter: stable; }
.profile-banner-dialog::backdrop { background: var(--tone-030507-a78-8235); backdrop-filter: blur(5px); }
.profile-banner-dialog form { padding: 26px; }
.profile-banner-dialog-heading { display: flex; align-items: flex-start; gap: 20px; justify-content: space-between; }
.profile-banner-dialog-heading span { color: var(--tone-bca784); font: 600 9px/1.5 var(--font-display); letter-spacing: .12em; }
.profile-banner-dialog h2 { margin: 6px 0 0; font: 700 23px/1.3 var(--font-display); }
.profile-banner-close { width: 28px; height: 28px; border: 0; background: none; color: var(--tone-b6b9c0); font-size: 25px; cursor: pointer; }
#profileBannerHint { font-size: 11px; color: var(--tone-9da2ac); line-height: 1.8; margin: 16px 0; }
.profile-banner-preview { position: relative; width: 100%; min-width: 0; aspect-ratio: 4 / 1; display: grid; place-items: center; overflow: hidden; border: 0; outline: 1px dashed var(--tone-ffffff-a14-5098); outline-offset: -1px; border-radius: 8px; background: radial-gradient(ellipse at 0 100%, var(--tone-b67c2a-a18-8235), var(--transparent) 70%), var(--tone-1c2025); }
.profile-banner-preview.is-dragging { outline-color: var(--tone-f2b657); background-color: var(--tone-29261f); }
.profile-banner-preview.can-reposition { cursor: grab; touch-action: none; user-select: none; }
.profile-banner-preview.is-repositioning { cursor: grabbing; }
.profile-banner-preview:focus-visible { outline: 2px solid var(--tone-f0ac45); outline-offset: 3px; }
.profile-banner-position-hint { margin-top: 10px; color: var(--tone-b6a386); font-size: 11px; line-height: 1.6; }
.profile-banner-position-hint[hidden] { display: none; }
.profile-banner-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-banner-preview [hidden] { display: none !important; }
#profileBannerPlaceholder { display: grid; place-items: center; gap: 5px; text-align: center; padding: 12px; }
#profileBannerPlaceholder > span { font-size: 25px; color: var(--tone-b69a70); }
#profileBannerPlaceholder strong { font-size: 12px; font-weight: 600; }
#profileBannerPlaceholder small { font-size: 10px; color: var(--tone-89909c); }
.profile-banner-file-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.profile-banner-file-actions .btn, .profile-banner-dialog-footer .btn { min-height: 36px; padding: 9px 13px; font-size: 11px; }
.profile-banner-remove { border: 0; padding: 8px 0; background: none; color: var(--tone-b7a79b); font: 11px/1.5 var(--font-body); cursor: pointer; }
.profile-banner-remove[hidden] { display: none; }
.profile-banner-remove:hover { color: var(--tone-efb0a0); }
.profile-banner-error { min-height: 16px; font-size: 11px; color: var(--tone-efb0a0); margin-top: 12px; }
.profile-banner-dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; margin-top: 6px; border-top: 1px solid var(--tone-ffffff-a6-2745); }
.profile-banner-dialog button:disabled { opacity: .5; cursor: wait; }
.profile-cover-edit:focus-visible, .profile-shortcut:focus-visible, .profile-banner-dialog button:focus-visible { outline: 2px solid var(--tone-f0ac45); outline-offset: 3px; }
@media (max-width: 700px) {
  .profile-page, .player-page { width: calc(100% - 24px); padding: 18px 0 36px; }
  .profile-cover { min-height: 160px; }
  .profile-cover-toolbar { inset: 14px 14px auto; gap: 8px; flex-wrap: wrap; }
  .profile-cover-label { font-size: 8px; }
  .profile-cover-edit { padding: 7px 9px; font-size: 10px; }
  #profileBannerStatus { order: 3; width: 100%; text-align: right; font-size: 10px; }
  .profile-cover-public-label { top: 16px; left: 20px; font-size: 8px; }
  .profile-cover-art > span { left: 18px; bottom: 32px; font-size: 56px; }
  .profile-cover-art svg { width: 58%; right: 0; }
  .profile-hero, .player-heading { margin-top: -38px; padding: 0 20px 22px; gap: 16px; flex-wrap: wrap; text-align: left; }
  .profile-avatar-shell, .player-avatar { flex-basis: 90px; width: 90px; height: 90px; border-width: 5px; }
  .profile-hero-copy, .player-heading-copy { flex: 1; padding-top: 52px; min-width: 0; width: auto; text-align: left; }
  .profile-hero .profile-player-name, .player-heading h1 { font-size: 24px; }
  .profile-hero-actions { flex: 1 1 100%; padding-top: 0; flex-direction: row; align-items: center; justify-content: space-between; margin-top: 2px; }
  .profile-hero-actions .profile-avatar-tools { justify-content: flex-end; }
  .profile-hero-actions .profile-avatar-button { font-size: 9px; }
  .profile-account-id { font-size: 9px; gap: 5px 8px; }
  .profile-account-id button { font-size: 9px; }
  .profile-tabs { padding: 0 16px; gap: 10px; }
  .profile-tab { padding: 14px 5px; min-height: 48px; font-size: 10px; }
  .profile-content { padding: 20px 16px 0; gap: 16px; }
  .profile-shortcuts { grid-template-columns: 1fr; }
  .profile-actions { padding: 18px 16px; }
  .player-facts { margin: 0 20px; gap: 20px 28px; }
  .player-showcase { padding: 20px; }
  .player-cosmetic { grid-template-columns: 85px minmax(0, 1fr); padding: 12px; }
  .player-card-footer { padding: 14px 20px; }
  .profile-banner-dialog form { padding: 20px; }
  #profileBannerPlaceholder { padding: 8px; gap: 3px; }
  #profileBannerPlaceholder > span { font-size: 20px; }
  #profileBannerPlaceholder strong { font-size: 11px; }
  #profileBannerPlaceholder small { display: none; }
  .profile-banner-dialog-footer { flex-wrap: wrap; }
  .profile-banner-dialog-footer .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .profile-cover-art { transition: none; } }

/* The selected cosmetics are shared by public and private profile views. */
.player-cosmetics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.player-cosmetic { min-width: 0; border: 1px solid var(--border-card); }
.player-cosmetic h3 { margin: 10px 0 3px; color: var(--text-primary); font: 600 12px var(--font-display); overflow-wrap: anywhere; }
.player-cosmetic p, .player-empty { margin: 0; font-size: 11px; color: var(--text-muted); }
.player-empty { margin-top: 20px; line-height: 1.6; }
.profile-avatar-fallback { font: 700 38px var(--font-display); }
.profile-account-id button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; }
.profile-account-id [role="status"] { color: var(--green-300); }
@media (max-width: 700px) { .player-cosmetics { grid-template-columns: 1fr; } .profile-account-id { justify-content: flex-start; } .profile-avatar-fallback { font-size: 28px; } }

/* Keep all equipped slots visible, including a real nickname preview. */
.player-cosmetics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.player-cosmetic { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 16px; text-align: center; }
.player-cosmetic .cos-preview { grid-column: 1; grid-row: auto; width: 100%; height: 110px; min-height: 110px; }
.player-cosmetic h3, .player-cosmetic p { grid-column: 1; align-self: auto; }
.player-cosmetic h3 { margin: 14px 0 5px; }
.player-cosmetic .cos-preview--nickname { gap: 10px; border-radius: 8px; padding: 12px; }
.player-cosmetic .cos-preview--nickname .cos-preview__name { display: block; font-size: 18px; line-height: 1.35; max-width: 100%; }
.player-cosmetic .cos-preview__effect { display: none; }
.player-cosmetic .cos-title { max-width: 100%; font-size: 10px; padding: 6px 9px; }
.cos-preview__avatar > :is(svg, img:not(.cos-frame)) { grid-area: 1 / 1; }
.cos-preview__avatar > img:not(.cos-frame) { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
@media (max-width: 700px) { .player-cosmetics { grid-template-columns: minmax(0, 1fr); } }
