.player-profile{width:min(1000px,96vw);max-height:92dvh;padding:24px;border:1px solid var(--border,#78859d);border-radius:20px;background:var(--soft-ink,#292e37);color:var(--soft-cream,#f5eedc);box-shadow:0 24px 90px #0009;font-family:var(--font-body)}
.player-profile::backdrop{background:#10151dcc;backdrop-filter:blur(7px)}
.player-profile header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.player-profile h2{font-family:var(--font-display);font-size:clamp(22px,4vw,34px);margin:7px 0;overflow-wrap:anywhere}
.player-profile small{color:#c5cada;font-size:12px}.profile-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.player-profile button{min-height:44px;font:inherit;cursor:pointer;padding:8px 14px}.player-profile nav{display:flex;gap:8px;border-bottom:1px solid #78859d66;padding:10px 0}
.player-profile nav button[aria-pressed=true]{background:var(--soft-pink,#ffbcd9);color:#292e37}
.profile-status{margin:8px 0;min-height:18px}.profile-body{max-height:65dvh;overflow:auto;overscroll-behavior:contain;padding-right:8px}
.profile-overview{display:grid;grid-template-columns:minmax(180px,30%) 1fr;gap:24px}.profile-avatar{display:flex;align-items:center;justify-content:center;min-height:220px;background:linear-gradient(140deg,#526a9666,#ffbcd918);border-radius:16px;overflow:hidden}
.profile-avatar canvas{width:100%;height:auto;display:block}.profile-rank{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.profile-rank strong{display:block;font-size:22px;margin-top:6px}.profile-rank>div{border-bottom:2px solid #ffbcd9;padding-bottom:12px}
.profile-badges{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.profile-badge{padding:14px;background:#526a9626;border:1px solid #78859d66;border-radius:12px;display:flex;align-items:flex-start;flex-direction:column;gap:7px}
.profile-medal{border:2px solid #ffbcd9;color:#ffbcd9;border-radius:50%;display:grid;place-items:center;width:40px;height:40px;font-weight:900}.profile-empty{color:#c5cada;padding:10px 0}
.profile-ultimates{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:12px 0}.profile-ultimates article{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:12px;background:#526a9633}.profile-ultimate-icon{font-size:28px;color:#ffbcd9}
.profile-match{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 0;border-bottom:1px solid #78859d55}.profile-match>strong{color:#ffbcd9}.profile-match[data-result=win]>strong{color:#bce6db}.profile-delta{text-align:right}.profile-match-players{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px}.profile-link{background:transparent!important;color:inherit;border:none!important;text-align:left;text-decoration:underline;text-underline-offset:3px}
.profile-ultimate-icon{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px}.profile-progress{padding:10px;background:#526a9626;border-radius:8px}.profile-unlock-toast{position:fixed;z-index:10000;bottom:max(24px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(500px,88vw);padding:20px;border-radius:16px;background:#292e37;color:#f5eedc;border:2px solid #ffbcd9;box-shadow:0 8px 40px #0008}.profile-unlock-toast button{min-height:44px;margin-right:8px}
.profile-badge{--medal:#d5a77b;border-top:3px solid var(--medal)}.profile-badge[data-tier="2"]{--medal:#c5d2e2}.profile-badge[data-tier="3"]{--medal:#e5c56d;background:linear-gradient(135deg,#e5c56d16,#526a9626)}
.profile-medal{color:var(--medal);border-color:var(--medal);border-radius:8px;transform:rotate(-5deg);box-shadow:inset 0 0 0 3px #292e37, inset 0 0 0 4px var(--medal)}
.profile-progress{display:grid;grid-template-columns:1fr auto;gap:8px 16px}.profile-progress progress{grid-column:1/-1;width:100%;height:8px;accent-color:#e5c56d}.profile-progress span{font-variant-numeric:tabular-nums}
.player-profile button:focus-visible{outline:3px solid #e5c56d;outline-offset:3px}.player-profile button:disabled{opacity:.55;cursor:default}
@media(max-width:600px){.player-profile{padding:14px;max-height:96dvh}.profile-overview{grid-template-columns:1fr}.profile-avatar{min-height:160px;max-height:230px}.profile-avatar canvas{width:230px}.profile-rank{grid-template-columns:repeat(2,1fr)}.profile-ultimates{grid-template-columns:1fr}.profile-body{max-height:64dvh}.player-profile header{flex-wrap:wrap}.profile-actions{width:100%}.player-profile nav button{flex:1;padding:8px}.profile-badges{grid-template-columns:repeat(2,minmax(0,1fr))}}
.player-profile[open]{display:flex;flex-direction:column;overflow:hidden}.player-profile header,.player-profile nav,.profile-status{flex-shrink:0}.player-profile .profile-body{flex:1;min-height:0;max-height:none}.profile-body>.profile-link{display:block;width:100%;padding:14px 0;border-bottom:1px solid #78859d55!important}
@media(max-width:600px){.player-profile header{padding:8px 4px;gap:8px;flex-wrap:nowrap}.player-profile header h2{font-size:22px}.player-profile header p{margin:8px 0}.player-profile .profile-actions{width:auto;flex-shrink:0}.player-profile .profile-status{margin:4px 0;min-height:8px}}
/* SIDEOUT profile: shared navy, ice, cream and orange palette and bold sans headings. */
.player-profile{--profile-accent:#ff985d;--profile-muted:#bed3e9;--font-display:ArchivoBlack,Arial,sans-serif;--font-body:Arial,Helvetica,sans-serif;width:min(1060px,96vw);padding:24px;background:linear-gradient(155deg,#23354e,#111b2d 65%);color:#fbf0df;border:1px solid #8da6c384;border-top:2px solid var(--profile-accent);border-radius:22px;font-family:var(--font-body)}
.player-profile :is(h2,h3){font-family:var(--font-display);font-weight:400;font-style:normal}.player-profile h3{font-size:17px;margin:24px 0 12px}.player-profile small{color:var(--profile-muted)}
.player-profile button{background:#283e59;border:1px solid #8da6c366;border-radius:9px;color:#fbf0df;font-family:var(--font-body);font-weight:700}.player-profile nav button[aria-pressed=true]{background:var(--profile-accent);color:#111b2d;border-color:var(--profile-accent)}.player-profile button:focus-visible{outline-color:var(--profile-accent)}
.profile-rank>div{border-bottom-color:var(--profile-accent)}.profile-rank strong{font-family:var(--font-display);font-weight:400;font-variant-numeric:tabular-nums}.profile-avatar{background:radial-gradient(ellipse at center,#526a9655,#111b2d)}
.profile-ultimates{grid-template-columns:repeat(3,minmax(0,1fr))}.profile-ultimates article{display:grid;grid-template-columns:64px minmax(0,1fr);gap:4px 12px;align-items:center;padding:12px;background:#0c152580;border:1px solid #8da6c333;border-radius:12px}.profile-ultimate-icon{grid-row:1/3;width:64px;height:64px;aspect-ratio:1;object-fit:contain;border-radius:12px}.profile-ultimates strong{font-size:14px;overflow-wrap:anywhere}.profile-ultimates small{font-size:12px}
.profile-match{display:grid;grid-template-columns:120px minmax(0,1fr) 120px;gap:12px 16px;align-items:center;margin:10px 0;padding:14px;background:#0c152580;border:1px solid #8da6c333;border-left:3px solid #8da6c3;border-radius:12px}.profile-match[data-result=win]{border-left-color:#bce6db}.profile-match[data-result=loss]{border-left-color:#ff985d}.profile-match-court{margin:0;min-width:0}.profile-match-court :is(img,i){display:block;width:120px;height:66px;object-fit:cover;border-radius:6px}.profile-match-court figcaption{font-size:12px;color:#bed3e9;margin-top:6px}.profile-court-swatch{position:relative;border:6px solid #345f87}.profile-court-swatch:after{content:'';position:absolute;inset:5px;border:1px solid #fff;background:linear-gradient(90deg,transparent 49%,#fff 49%,#fff 51%,transparent 51%)}
.profile-match-detail{min-width:0}.profile-match-players{display:flex;align-items:center;gap:4px 10px;line-height:1.45;margin-bottom:6px;font-size:14px}.profile-match-team{display:inline-flex;align-items:center;flex-wrap:wrap;gap:0 6px;min-width:0;overflow-wrap:anywhere}.profile-match-players .profile-link{min-height:44px;padding:4px 0;font-weight:700;max-width:100%;overflow-wrap:anywhere}.profile-match-separator,.profile-match-versus{color:#bed3e9}.profile-match-versus{font-size:12px;font-weight:400}.profile-match-summary{text-align:right;display:grid;gap:4px}.profile-result{font-size:12px;text-transform:uppercase;color:#ff985d}.profile-match[data-result=win] .profile-result{color:#bce6db}.profile-match[data-result=neutral] .profile-result{color:#bed3e9}.profile-score{font-size:26px;font-family:var(--font-display);font-variant-numeric:tabular-nums;white-space:nowrap}.profile-delta{font-variant-numeric:tabular-nums}
.profile-match-stats{grid-column:1/-1;overflow-x:auto;border-top:1px solid #8da6c333;padding-top:10px}.profile-match-stats table{width:100%;border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums}.profile-match-stats caption{text-align:left;font-weight:700;margin:0 0 8px}.profile-match-stats :is(th,td){padding:8px;text-align:right;border-bottom:1px solid #8da6c322}.profile-match-stats th{color:#bed3e9;font-weight:400}.profile-match-stats tr>:first-child{text-align:left;min-width:100px}.profile-match-stats>small{display:block;margin-top:8px}
@media(max-width:700px){.profile-ultimates{grid-template-columns:1fr}.profile-match{grid-template-columns:80px minmax(0,1fr);gap:10px;padding:12px}.profile-match-court :is(img,i){width:80px;height:54px}.profile-match-summary{grid-column:2;grid-row:2;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px}.profile-score{font-size:22px}.profile-match-court{grid-row:1/3;align-self:start}.profile-match-players{gap:2px 6px}.profile-match-team{width:100%}.profile-match-detail>small{font-size:12px}.profile-match-stats{grid-row:3}.player-profile{padding:14px}.profile-match-players .profile-link{font-size:13px}}

/* Compact profile pages keep section controls and match paging in view. Body
   overflow remains available for unusually long names, zoom and keyboards. */
.player-profile .profile-pages[hidden] {display:none}
.player-profile[data-compact-profile] {
 width:min(100%,720px);height:calc(100dvh - 12px);max-height:none;
 padding:6px max(8px,var(--pu-sr,0px)) 6px max(8px,var(--pu-sl,0px));
}
html.phone-ui .player-profile[data-compact-profile] {
 height:100dvh;max-width:none;width:100%;margin:0;border-radius:0;
 padding:var(--pu-st,env(safe-area-inset-top)) max(8px,var(--pu-sr,env(safe-area-inset-right))) var(--pu-sb,env(safe-area-inset-bottom)) max(8px,var(--pu-sl,env(safe-area-inset-left)));
}
.player-profile[data-compact-profile] header {padding:0 0 4px;align-items:center;gap:5px}
.player-profile[data-compact-profile] header h2 {margin:0;font-size:19px;line-height:1.15}
.player-profile[data-compact-profile] header :is(small,p) {margin:0;font-size:12px;line-height:1.15}
.player-profile[data-compact-profile] .profile-actions {width:auto;flex-wrap:nowrap;gap:4px}
.player-profile[data-compact-profile] button {padding:3px 8px}
.player-profile[data-compact-profile] nav {padding:3px 0;gap:4px}
.player-profile[data-compact-profile] nav button {flex:1;min-width:0;font-size:clamp(12px,2vw,14px)}
.player-profile[data-compact-profile] .profile-status {margin:2px 0;min-height:0;font-size:12px}
.player-profile[data-compact-profile] .profile-status:empty {display:none}
.player-profile[data-compact-profile] .profile-body {padding:4px 2px 0}
.player-profile[data-compact-profile] .profile-body>p {margin:4px 0}
.player-profile[data-compact-profile] .profile-pages {display:flex;flex:none;gap:4px;padding:3px 0 0}
.player-profile[data-compact-profile] .profile-pages select {height:44px;min-width:44px;flex:1 1 0;padding:2px 4px;background:#283e59;color:inherit;border:1px solid #8da6c366;border-radius:8px}
.player-profile[data-compact-profile] :is(.profile-pages button,.profile-actions button) {min-width:44px;font-size:12px;touch-action:manipulation}
.player-profile[data-compact-profile] .profile-rank {grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.player-profile[data-compact-profile] .profile-rank>div {padding:3px 1px}
.player-profile[data-compact-profile] .profile-rank :is(strong,small) {margin:0;font-size:clamp(12px,2.1vw,18px)}
.player-profile .profile-mini-avatar {display:block;height:min(18dvh,160px);width:auto;margin:auto}
.player-profile[data-compact-profile] .profile-match {grid-template-columns:minmax(55px,.65fr) minmax(75px,1fr) minmax(85px,.75fr);gap:4px;margin:0;padding:4px 6px}
.player-profile[data-compact-profile] .profile-match-court {grid-row:auto;grid-column:auto;align-self:center}
.player-profile[data-compact-profile] .profile-match-court :is(img,i) {width:100%;max-width:90px;height:28px}
.player-profile[data-compact-profile] .profile-match-court figcaption {margin:2px 0 0}
.player-profile[data-compact-profile] .profile-match-summary {grid-column:auto;grid-row:auto;display:grid;justify-content:end;gap:1px}
.player-profile[data-compact-profile] .profile-score {font-size:20px}
.player-profile[data-compact-profile] .profile-match[data-teams] {display:block}
.player-profile[data-compact-profile] .profile-match[data-teams] :is(figure,.profile-match-summary,.profile-match-detail>small) {display:none}
.player-profile[data-compact-profile] .profile-match-players {display:grid;grid-template-columns:1fr auto 1fr;align-content:start;margin:0}
.player-profile[data-compact-profile] .profile-match-team {display:flex;flex-direction:column;align-items:start;gap:0}
.player-profile[data-compact-profile] .profile-match-separator {display:none}
.player-profile[data-compact-profile] .profile-match-team span {min-height:44px;line-height:44px}
.player-profile[data-compact-profile] .profile-link {padding:3px;min-height:44px;min-width:44px}
.player-profile .profile-mobile-details {padding:4px}
.player-profile .profile-mobile-stats {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:4px 0}
.player-profile .profile-mobile-stats dt {font-size:12px;color:var(--profile-muted)}
.player-profile .profile-mobile-stats dd {margin:0;font-size:18px}
.player-profile[data-compact-profile] .profile-badges {display:block}
.player-profile[data-compact-profile] .profile-badge {padding:4px;display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:4px}
.player-profile[data-compact-profile] {box-sizing:border-box}
