.player-profile-open{margin-inline-start:.6rem;border:1px solid #c0d2e1;border-radius:18px;padding:.4rem .9rem;background:white;color:#17334b;font-weight:700;cursor:pointer}
.chess-player-dialog{border:0;border-radius:18px;color:#17334b;width:min(400px,92vw);padding:20px;max-height:90dvh;overflow:auto;box-sizing:border-box;box-shadow:0 15px 65px #162c4050}
.chess-player-dialog::backdrop{background:#112b447d}
.chess-player-dialog header,.chess-player-dialog nav{position:static;display:flex;align-items:center;justify-content:space-between;padding:0;background:white;height:auto}
.chess-player-dialog h2,.chess-player-dialog h3{margin:0 0 .5rem}
.chess-player-dialog .avatar-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.avatar-grid button{aspect-ratio:1;min-width:0;padding:2px;background:white;border:2px solid transparent;border-radius:10px}
.avatar-grid button[aria-pressed=true]{border-color:#005a9c;background:#c4eaff}
.avatar-grid .chess-photo{display:block;width:100%;height:100%;border-radius:6px;background-repeat:no-repeat}
.chess-player-dialog nav,.chess-player-dialog label{margin-top:.7rem}
.chess-player-dialog nav button,.chess-player-dialog .close,.chess-player-dialog .save{padding:6px 12px;border:1px solid #b8cad7;background:#fff;border-radius:8px;color:#12334b}
.chess-player-dialog label{display:grid;gap:3px;font-weight:700}
.chess-player-dialog select{width:100%;padding:.5rem}
.chess-player-dialog .save{background:#145787;color:white;width:100%;font-weight:700}
.chess-player-dialog button:disabled{opacity:.45}
.learner-seat img.player-flag{display:inline-block!important;width:27px!important;height:18px!important;border-radius:0!important;object-fit:contain}
.anyone-opponent .chess-photo,.learner-seat .chess-photo{display:block!important;flex:0 0 56px;width:56px;height:56px;border-radius:10px;background-repeat:no-repeat}.timed-board-column .learner-seat{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#eef6ff;color:#102542;border-radius:14px}.learner-seat>img:not(.player-flag),.learner-seat>span:not(.chess-photo){display:none!important}
html .square:has(>img[src*="pieces/"]){position:relative!important}html .square>img[src*="pieces/"]{position:absolute!important;inset:0!important;margin:auto!important;object-fit:contain!important;object-position:center!important;scale:1!important;width:94%!important;height:94%!important;pointer-events:none}
.learner-seat>span:not(.chess-photo):not([hidden]){display:inline-block!important;font-size:.875rem;color:#40576a}.anyone-opponent .opponent-elo{display:block;font-size:.875rem;color:#40576a}.anyone-opponent strong [role="img"],.learner-seat img.player-flag{border-radius:4px!important;overflow:hidden}.learner-seat img.player-flag{object-fit:cover!important}

/* Raised reward icons share their existing accessible labels. */
.reward-strip .reward-symbol{position:relative;display:inline-block;width:27px;height:29px;flex:none;filter:drop-shadow(0 2px 1px #20384b38);--shape:polygon(60% 1%,13% 56%,44% 56%,33% 98%,88% 38%,57% 38%);--face:linear-gradient(120deg,#b6ff92 12%,#72e97b 40%,#2ab860 42%,#138c4c 76%);--edge:#087444}
.reward-strip .reward-symbol svg{display:none}.reward-strip .reward-symbol:before,.reward-strip .reward-symbol:after{content:'';display:block;position:absolute;inset:1px 1px 4px;clip-path:var(--shape)}.reward-strip .reward-symbol:before{background:var(--edge);transform:translateY(3px)}.reward-strip .reward-symbol:after{background:var(--face)}
.reward-total:nth-child(2) .reward-symbol{--shape:polygon(50% 0,64% 31%,99% 36%,73% 61%,79% 96%,50% 80%,20% 96%,26% 61%,1% 36%,36% 31%);--edge:#b56b08;--face:conic-gradient(from 0deg at 50% 52%,#fff4a1 0 36deg,#ffd458 36deg 80deg,#ffb72e 80deg 144deg,#e9890e 144deg 180deg,#ffc33b 180deg 220deg,#ffda62 220deg 286deg,#fff2a0 286deg 323deg,#ffe373 323deg)}
.reward-total:nth-child(3) .reward-symbol{--shape:polygon(22% 7%,78% 7%,100% 39%,50% 99%,0 39%);--edge:#1c5196;--face:conic-gradient(from 0deg at 50% 39%,#b9f1ff 0 38deg,#78ccff 38deg 90deg,#4393ee 90deg 151deg,#276aca 151deg 180deg,#4d9bf1 180deg 211deg,#81ccff 211deg 270deg,#b8e8ff 270deg 322deg,#7fc9ff 322deg)}

.reward-total:nth-child(2) .reward-symbol{--shape:polygon(50% 0,59% 29%,82% 12%,72% 38%,100% 43%,75% 55%,93% 78%,64% 71%,57% 100%,45% 76%,23% 94%,29% 67%,0 61%,25% 47%,9% 26%,37% 32%);--face:conic-gradient(from -20deg at 50% 50%,#ffd047 0deg 60deg,#38ab62 60deg 125deg,#3686ef 125deg 200deg,#a158ba 200deg 243deg,#ec5848 243deg 305deg,#ffbf38 305deg);--edge:#987334}
.reward-total:nth-child(3) .reward-symbol{animation:ts-gem-turn 5s linear infinite;transform-origin:center}@keyframes ts-gem-turn{0%{transform:perspective(120px) rotateY(0deg)}100%{transform:perspective(120px) rotateY(360deg)}}@media(prefers-reduced-motion:reduce){.reward-total:nth-child(3) .reward-symbol{animation:none}}
.friend-room-card{display:flex;align-items:center;gap:10px;background:#eef6ff;padding:8px 12px;border-radius:12px;margin-bottom:8px}.friend-room-card .chess-photo{width:48px;height:48px;border-radius:8px}.friend-room-card img{width:26px;border-radius:4px}.friend-code-form{display:grid;gap:.45rem;margin:1rem 0;max-width:16rem}.friend-code-form input{font:inherit;letter-spacing:.2em;width:8ch;padding:.5rem}.friend-code-form button{justify-self:start}

.reward-total:nth-child(1) .reward-symbol{transform-origin:50% 65%;animation:ts-bolt-breathe 2.8s ease-in-out infinite}
@keyframes ts-bolt-breathe{0%,100%{transform:scale(.98,.86)}50%{transform:scale(1.02,1.1)}}
.reward-total:nth-child(2) .reward-symbol{--shape:polygon(50% 0,59% 32%,74% 20%,68% 39%,99% 50%,69% 59%,79% 77%,59% 68%,50% 100%,41% 69%,23% 80%,32% 59%,0 50%,32% 41%,21% 24%,41% 32%);--face:conic-gradient(from -20deg,#fff2aa,#efad23 22%,#fff0a0 32%,#ce8110 52%,#ffce50 67%,#fff3ab 82%,#e9a51b);--edge:#c68a14}
.reward-total:nth-child(2) .reward-symbol:after{animation:ts-spark-turn 4.4s ease-in-out infinite}
.reward-total:nth-child(2) .reward-symbol:before{inset:-3px;clip-path:none;background:repeating-conic-gradient(from 8deg,transparent 0deg 40deg,#f4b426 41deg 44deg,transparent 45deg);mask-image:radial-gradient(closest-side,transparent 62%,black 71% 88%,transparent 100%);opacity:0;animation:ts-spark-rays 4.4s ease-out infinite}
@keyframes ts-spark-turn{0%,32%{transform:rotate(0) scale(.96)}63%{transform:rotate(170deg) scale(.88)}71%{transform:rotate(180deg) scale(1.12)}82%,100%{transform:rotate(180deg) scale(.96)}}
@keyframes ts-spark-rays{0%,63%,88%,100%{opacity:0;transform:scale(.78)}70%{opacity:.95;transform:scale(.96)}84%{opacity:0;transform:scale(1.18)}}
.reward-total:nth-child(3) .reward-symbol:has(.gem-solid){animation:none;filter:none;perspective:100px;overflow:visible}
.reward-total:nth-child(3) .reward-symbol:has(.gem-solid):before,.reward-total:nth-child(3) .reward-symbol:has(.gem-solid):after{display:none}
.gem-solid{position:absolute;left:50%;top:50%;width:0;height:0;transform-style:preserve-3d;transform:rotateX(-16deg) rotateY(20deg);animation:ts-gem-orbit 5s linear infinite}
.gem-solid>i{position:absolute;left:0;top:0;width:1px;height:1px;transform-origin:0 0;clip-path:polygon(0 0,100% 0,0 100%)}
@keyframes ts-gem-orbit{from{transform:rotateX(-16deg) rotateY(20deg)}to{transform:rotateX(-16deg) rotateY(380deg)}}
@media(prefers-reduced-motion:reduce){.reward-total:nth-child(1) .reward-symbol,.reward-total:nth-child(2) .reward-symbol:before,.reward-total:nth-child(2) .reward-symbol:after,.gem-solid{animation:none!important}}

.reward-total:nth-child(2) .reward-symbol:after{clip-path:none;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 0Q18 13 32 16Q18 18 16 32Q14 18 0 16Q14 13 16 0Z'/%3E%3C/svg%3E") center/contain no-repeat;background:conic-gradient(from 0deg,#ffe58b 0deg 45deg,#efa91a 45deg 135deg,#cb820e 135deg 225deg,#ffd150 225deg 315deg,#fff1ae 315deg)}
.reward-total:nth-child(2) .reward-symbol{filter:none}.reward-total:nth-child(2) .reward-symbol:before{background:repeating-conic-gradient(from -2deg,#ebb335 0deg 4deg,transparent 4deg 90deg)}
.reward-total:nth-child(3) .reward-symbol:has(.cut-gem){animation:none;perspective:none;filter:none;transform:none}.reward-total:nth-child(3) .reward-symbol:has(.cut-gem):before,.reward-total:nth-child(3) .reward-symbol:has(.cut-gem):after{display:none}.reward-strip .reward-symbol svg.cut-gem{display:block;width:100%;height:100%;filter:none;shape-rendering:geometricPrecision}

/* Board player cards use the same portrait and two-line identity layout. */
body .timed-board-column .chess-seat-card,body .anyone-opponent{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#eef6ff;color:#102542;border-radius:14px}
.chess-seat-card .seat-copy,.anyone-opponent>div{min-width:0}
body .chess-seat-card strong,body .anyone-opponent strong{display:block;font-size:1.25rem;line-height:1.25}
body .chess-seat-card .seat-elo,body .anyone-opponent .opponent-elo{display:block;font-size:.875rem;font-weight:400;line-height:1.35;color:#40576a}
body .chess-seat-card .seat-avatar,body .chess-seat-card .chess-photo{width:56px;height:56px;flex:0 0 56px;border-radius:10px;object-fit:contain}
.learner-seat:not(:has(.chess-photo))>img.seat-avatar{display:block!important}.chess-seat-card strong img.player-flag{width:27px;height:18px;object-fit:cover;border-radius:4px;margin-inline-start:.5em;vertical-align:middle}
