.publicProfileBar { display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:64px; }
.publicProfileBar nav { align-items:center; }
.publicProfileBar a { color:var(--muted); text-decoration:none; font-weight:600; }
.publicProfileBar a:is(:hover,:focus-visible) { color:var(--white); text-decoration:underline; }
.publicProfilePage .profileColumns { column-gap:clamp(2rem,5vw,5rem); }
.publicProfilePage .publicMapCounts { color:var(--muted); font-size:.85rem; white-space:nowrap; }
.pianoProfile .profileRank[data-grade=SS],.pianoProfile .profileStanding .gradeSS { color:var(--skin-ranks-SS-color,#ffdd8e); }
.pianoProfile .profileRank[data-grade=S],.pianoProfile .profileStanding .gradeS { color:var(--skin-ranks-S-color,#ffdd8e); }
.pianoProfile .profileRank[data-grade=A],.pianoProfile .profileStanding .gradeA { color:var(--skin-ranks-A-color,#9bedd6); }
.pianoProfile .profileRank[data-grade=B] { color:var(--skin-ranks-B-color,#c2a3ff); }
.pianoProfile .profileRank[data-grade=C] { color:var(--skin-ranks-C-color,#c2a3ff); }
.pianoProfile .profileRank[data-grade=D] { color:var(--skin-ranks-D-color,#ff9aa5); }
@media(max-width:700px) {
  .publicProfilePage .profileScore { grid-template-columns:2rem minmax(0,1fr) auto; }
  .profileRankHistory text { font-size:16px; }
}
.pianoProfile { padding: 24px 0 4rem; --profile-line: var(--stroke,#403748); }
.profileCover { position: relative; isolation: isolate; display: flex; align-items: end; flex-wrap: wrap; gap: 1.25rem; min-height: clamp(190px,22vw,300px); padding: clamp(18px,4vw,50px); overflow: hidden; background: #29223e; }
.profileCoverArt, .profileCover::before { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.profileCoverArt img,.profileCoverArt canvas { width: 100%; height: 100%; object-fit: cover; }
.profileCover::before { content: ""; z-index: 0; background: linear-gradient(0deg,#100e1fe0,transparent 97%), linear-gradient(90deg,#1611227a,transparent); }
.profileCover > :not(.profileCoverArt) { z-index: 1; }
.profilePortrait { flex: none; width: clamp(68px,10vw,112px); aspect-ratio: 1; overflow: hidden; border: 2px solid #ffffff9c; border-radius: 50%; display: grid; place-items: center; background: #29213b; font-size: 1.65rem; }
.profilePortrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profileHeading { flex: 1; min-width: 0; }
.profileHeading h1, .profileHeading #playerName { margin: .15em 0; font: 750 clamp(1.65rem,4.4vw,3.8rem)/1.08 "Segoe UI",sans-serif; letter-spacing: -.045em; overflow-wrap: anywhere; color: #fff; }
.profileHeading #playerName { display: block; width: 100%; max-width: 26ch; padding: 0; margin: 0; border: 0; background: transparent; text-overflow: ellipsis; }
.profileHeading #playerName:focus-visible { outline-offset: 2px; }
.profileHeading .eyebrow { font-size: .72rem; letter-spacing: .15em; color: #ded2ef; }
.profileNumbers,.profileLinks,.profileFilters,.profileLearning { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1.1rem; }
.profileNumbers { font: 600 .95rem/1.5 var(--mono); }
.profileNumbers #playerPP { color: #dbccff; font-size: inherit; }
.profileLinks { justify-content: end; }
.pianoProfile .profileLinks :is(a,button,label),.profileSection a { color: #e2d2ff; font-weight: 600; text-decoration: none; }
.pianoProfile .profileLinks :is(a,button,label) { cursor: pointer; font-size: .88rem; padding: .3rem 0; }
.profileLinks input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.profileLinks label:focus-within { outline: 2px solid #9af3f3; }
.profileLinks :is(a,button,label):hover,.profileSection a:hover { text-decoration: underline; }
.profileLevelBlock { display:grid; width:min(12.5rem,100%); gap:.22rem; margin-top:.55rem; }
.profileLevelBlock .levelStrip { position:relative; height:1.05rem; border-radius:1rem; background:#262230; overflow:hidden; }
.levelStrip progress,.levelStrip #playerProgress { position:absolute; inset:0; appearance:none; display:block; width:100%; height:100%; border:0; border-radius:inherit; margin:0; background:#282332; }
.levelStrip progress::-webkit-progress-bar { background:#282332; }.levelStrip progress::-webkit-progress-value { background:#8460b9; }
.levelStrip progress::-moz-progress-bar { background:#8460b9; }
.levelStrip strong { position:relative; display:block; text-align:center; font:700 .76rem/1.05rem var(--mono); color:#fff; text-shadow:0 1px 3px #110d23; }
.profileLevelBlock #playerXp,.profileLevelBlock .levelXp { color:#d2c7e4; font:.68rem/1.25 var(--mono); text-align:right; }
.profileStanding { display: flex; gap: clamp(1rem,5vw,4rem); flex-wrap: wrap; align-items: center; }
.profileStanding > span { display: grid; gap: .1rem; color: var(--muted); font-size: .78rem; }
.profileStanding strong { font: 700 1.4rem var(--mono); color: var(--white); }
.profileColumns { display: grid; grid-template-columns: 1.5fr 1fr; column-gap: clamp(1rem,5vw,4rem); }
.profileSection { border-top: 1px solid var(--profile-line); margin-top: 1.6rem; padding: .85rem 0 .2rem; min-width: 0; }
.profileSection h2 { margin: .25rem 0 .9rem; font-size: clamp(1.15rem,2vw,1.55rem); }
.profileSection h2 small { margin-left:.25em; font:400 .8rem var(--mono); color:var(--muted); }
.profileStanding .gradeStat { display:flex; flex-direction:row; align-items:baseline; gap:.45rem; color:#d7c3ff; font:italic 900 clamp(1.35rem,3vw,2.1rem)/1 "Segoe UI",sans-serif; letter-spacing:-.07em; }
.profileStanding .gradeSS { color:#fff0b7; text-shadow:0 0 .6rem #ffdb8333; }
.profileStanding .gradeS { color:#ffd27c; }
.profileStanding .gradeStat strong { color:var(--white); font:600 .95rem var(--mono); letter-spacing:0; }
.profileRankHistory { margin:0; }
.profileRankHistory figcaption,.profileTotals { color:var(--muted); }
.profileRankHistory svg { display:block; width:100%; max-height:190px; }
.profileAttempts { padding:0; list-style:none; }
.profileAttempts li { display:flex; align-items:baseline; gap:.8rem; padding:.55rem 0; border-bottom:1px solid var(--profile-line); }
.profileAttempts b { margin-left:auto; font-family:var(--mono); }
.medalGallery { display:flex; flex-wrap:wrap; gap:clamp(.45rem,2vw,1.1rem); padding:.9rem 0; }
.medalCategory { padding:1rem 0; border-top:1px solid var(--profile-line); }
.medalCategory h3 { font:650 1rem/1.3 var(--font,system-ui); margin:0; }
.dailyEntry a,.profileAttempts a { color:inherit; text-decoration:none; }
.dailyEntry a:hover,.dailyEntry a:focus-visible,.profileAttempts a:hover,.profileAttempts a:focus-visible { color:var(--lav); text-decoration:underline; }
.medalSlot { position:relative; --medal-rim:#ffd998; --medal-color:#b26a36; --medal-dark:#60394a; }
.medalSlot[data-medal="first-ss"] { --medal-rim:#fff5c7; --medal-color:#cf9a34; --medal-dark:#8a5342; }
.medalSlot[data-medal="hundred-notes"] { --medal-rim:#b9edff; --medal-color:#5778b5; --medal-dark:#354273; }
.medalSlot[data-medal="two-hands"] { --medal-rim:#aff5e5; --medal-color:#3d9c98; --medal-dark:#235e72; }
.profileMedal summary { display:block; list-style:none; cursor:pointer; border-radius:.75rem; line-height:0; }
.profileMedal summary::-webkit-details-marker { display:none; }
.medalDrawing { width:clamp(3.4rem,6vw,4.6rem); height:auto; filter:drop-shadow(0 2px 2px #08071399); }
.medalSlot[data-unlocked=false] .medalDrawing { filter:grayscale(1) brightness(.63); }
.medalTip { display:none; position:absolute; z-index:5; inset:100% auto auto 0; width:max-content; max-width:min(14rem,76vw); padding:.75rem .95rem; background:#292439; color:#fffcfa; border:1px solid #645774; border-radius:.45rem; box-shadow:0 5px 20px #0a071555; line-height:1.4; pointer-events:none; }
.medalTip span { font-size:.86rem; }.medalTip small { color:#d1badf; }
.medalSlot:hover .medalTip,.medalSlot:focus-within .medalTip,.profileMedal[open]+.medalTip { display:grid; gap:.23rem; }
.handStats { max-width:30rem; margin:1.2rem 0 .35rem; }.handStats small { color:var(--muted); }
.handStats>div { display:flex; justify-content:space-between; margin:.35rem 0; font-size:.9rem; }
.handStats meter { width:100%; height:.6rem; display:block; background:#bb9ee2; border-radius:.5rem; overflow:hidden; }
.handStats meter::-webkit-meter-bar { background:#bb9ee2; border:0; }.handStats meter::-webkit-meter-optimum-value { background:#87d7cd; }
@media(max-width:600px){.medalSlot:nth-child(n+3) .medalTip { left:auto; right:0; }}
.profileScores,.profileWeek { padding: 0; margin: 0; list-style: none; }
.profileScore { display: grid; grid-template-columns: 3.3rem minmax(0,1fr) auto; width:100%; align-items:center; gap: .7rem; padding: .75rem 0; border-bottom: 1px solid var(--profile-line); text-align:left; color: inherit; }
button.profileScore:hover { background: #ffffff09; }
.profileRank { font: italic 700 1.6rem var(--mono); color: var(--yellow); }
.profileScoreName,.profileScoreValue { overflow-wrap:anywhere; font-weight: 650; }
.profileScoreValue { text-align:right; font-family: var(--mono); }
.profileScore small { display: block; font: 400 .8rem/1.5 "Segoe UI",sans-serif; color: var(--muted); }
.profileWeek { display:grid; grid-template-columns:repeat(7,1fr); gap:.4rem; }
.profileWeek li { display:grid; grid-template-rows:1.1rem 3rem 1.4rem; justify-items:center; color:var(--muted); font:.8rem var(--mono); }
.profileWeek i { align-self:end; height: max(2px,var(--amount)); width:min(1.5rem,70%); background: var(--lav); }
.profileWeek small { padding-top:.35rem; }
.profileLearning { border-top:1px solid var(--profile-line); padding-top:.65rem; margin-top:1rem; justify-content:space-between; }
.profileMapHeader,.profileMapRow { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:.5rem 1rem; }
.profileFilters select,.profileMapRow select { background:var(--bg); border:0; border-bottom:1px solid var(--profile-line); padding:.35rem; font-size:.875rem; }
.profileMapRow { border-bottom:1px solid var(--profile-line); padding:.8rem 0; }
.profileMapRow > div { flex:1 1 14rem; min-width:0; }
.profileMapRow small { display:block; color:var(--muted); }
.profileMapRow button[aria-pressed=true] { color:#ffadcd; }
.profileMapRow a { overflow-wrap:anywhere; }
.mapThumbnail { flex:none; width:74px; height:44px; object-fit:cover; border-radius:3px; }
.mapCoverEdit { position:relative; color:var(--lav); font-size:.86rem; cursor:pointer; }
.mapCoverEdit input { position:absolute; inset:0; width:100%; opacity:0; cursor:pointer; }
.mapCoverEdit:focus-within { outline:2px solid var(--lav); }
#profileImageStatus:empty { display:none; }
.achievementToast { position:fixed; z-index:100; inset:auto max(16px,env(safe-area-inset-right)) max(22px,env(safe-area-inset-bottom)) auto; pointer-events:none; display:flex; align-items:center; gap:1rem; max-width:calc(100% - 32px); padding:.75rem 1.5rem .75rem 1rem; background:#241e35f5; border-left:4px solid #ffdb88; color:#fff6df; box-shadow:0 .4rem 1.2rem #09081055; animation:achievementIn .22s ease-out; }
.achievementToast b { font:italic 900 2rem/1 serif; color:#ffdb88; }
.achievementToast small,.achievementToast strong { display:block; }
.achievementToast small { font:600 .72rem/1.4 var(--mono); color:#f5d69a; }
.achievementToast strong { font-size:1.12rem; }
.achievementToast[hidden] { display:none; }
@keyframes achievementIn { from { transform:translateY(.6rem); opacity:0; } }
@media(prefers-reduced-motion:reduce){.achievementToast {animation:none;}}
@media (max-width:700px) {
  .profileColumns { grid-template-columns:1fr; }
  .profileCover { gap:.65rem; }
  .profileLinks { flex-basis:100%; justify-content:start; }
  .top .nav { display:flex; flex-wrap:wrap; }
  .top .libraryTabs { order:3; width:100%; justify-content:space-between; }
  .top .settingsLink { margin-left:auto; }
}

.dailyHistory { min-width:0; font-variant-numeric:tabular-nums; }
.dailyRange,.dailyRange>div,.dailyEntry summary,.dailyEntry li { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.dailyRange { color:var(--muted); font:.8rem var(--mono); }
.dailyRange>div { gap:.2rem; }
.dailyRange button { width:2rem; min-height:2rem; padding:0; color:var(--lav); font:1.5rem/1 var(--mono); }
.dailyRange button:disabled { opacity:.3; }
.dailyHistory:not([data-interactive]) .dailyRange>div { visibility:hidden; }
.dailyBars { display:grid; grid-template-columns:repeat(14,minmax(0,1fr)); gap:2px; margin:.25rem 0 .8rem; }
.dailyBars>button,.dailyZero { display:grid; grid-template-rows:4.4rem 1.3rem; align-items:end; justify-items:center; padding:0; min-width:0; color:var(--muted); }
.dailyBars i { align-self:end; height:max(2px,var(--bar)); width:clamp(3px,55%,18px); border-radius:3px 3px 0 0; background:#9783ba; }
.dailyZero i { background:#71687b66; }
.dailyBars small { width:100%; text-align:center; font:.64rem/1.65 var(--mono); border-top:1px solid var(--profile-line); }
.dailyBars button:hover i,.dailyBars button:focus-visible i { background:#e0ceff; }
.dailyBars button[aria-pressed=true] { color:#a1ebda; }
.dailyBars button[aria-pressed=true] i { background:#8edccb; }
.dailyBars button[aria-pressed=true] small { border-top-color:currentColor; font-weight:bold; }
.dailyEntry[hidden] { display:none; }
.dailyEntry summary { cursor:pointer; font-size:.84rem; padding:.3rem 0; color:var(--white); }
.dailyEntry summary::before { content:'›'; color:var(--lav); font:1.1rem var(--mono); }
.dailyEntry[open] summary::before { transform:rotate(90deg); }
.dailyEntry summary time { margin-right:auto; font-weight:bold; }
.dailyEntry summary b { color:var(--muted); font:500 .78rem var(--mono); text-align:right; }
.dailyEntry ul { margin:.2rem 0 0; padding:0; list-style:none; }
.dailyEntry li { border-top:1px solid var(--profile-line); padding:.38rem 0; font-size:.86rem; }
.dailyEntry li span { min-width:0; overflow-wrap:anywhere; }
.dailyEntry li small { display:block; color:var(--muted); font-size:.75rem; }
.dailyEntry li b { margin-left:.4rem; color:#d6c5ef; font-family:var(--mono); }
.profileScoreName,.profileAttempts a { color:inherit; text-decoration:none; }
.profileWatched .profileReplayWatch { display:inline-grid; place-items:center; width:2rem; height:2rem; justify-self:start; color:var(--lav); font-size:1.1rem; text-decoration:none; }
.profileWatched .profileReplayWatch:hover { color:white; }
.profileScore button.profileScoreValue { padding:.25rem 0 .25rem .5rem; color:inherit; }
.profileScoreName:hover,.profileAttempts a:hover,.profileScore button.profileScoreValue:hover strong { color:var(--lav); text-decoration:underline; text-underline-offset:.2em; }
