/* A quiet score object with a clear action, floating above the settled board. */
body .game-result-panel{display:grid!important;grid-template-columns:minmax(0,1fr) 50px;grid-template-areas:'title emblem' 'score emblem' 'metrics metrics' 'action home';align-items:center!important;justify-content:normal!important;gap:10px 12px;text-align:left!important;box-sizing:border-box;pointer-events:auto!important}
body .game-result-panel>[hidden]{display:none!important}
body .game-result-panel.has-game-reward{grid-template-areas:'title emblem' 'score emblem' 'coins coins' 'metrics metrics' 'action home'}
.game-result-coins{grid-area:coins;display:flex;align-items:center;flex-wrap:wrap;gap:5px 7px;min-width:0;padding:9px 10px;border-radius:10px;background:linear-gradient(115deg,#ffffff0b,#ffffff04);color:#d6d6d6}
.result-coin-icon{flex:none;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:linear-gradient(130deg,#dbdbdb,#858585 55%,#c4c4c4);box-shadow:inset 0 0 0 1px #ffffff45,inset 0 0 0 3px #6b6b6b80,0 2px 3px #0003;color:#4d4d4d}.result-coin-icon svg{width:21px;height:21px}
.game-result-coins strong{font:500 19px/1.2 var(--sans);font-variant-numeric:tabular-nums;letter-spacing:-.025em}.game-result-coins>span:not(.result-coin-icon){font:400 11px/1.4 var(--sans);color:#b2b2b2}.game-result-coins>span:empty{display:none}
.game-result-coins small{margin-left:auto;color:#999;font:400 10px/1.4 var(--sans)}.game-result-coins:not([data-state=credited]) strong{font-size:12px;font-weight:400;letter-spacing:0}
body .game-result-panel>:is(.eyebrow,#overlay-label,#overlay-caption,#overlay-eyebrow){display:none!important}
body .game-result-panel .game-result-title{grid-area:title;align-self:end;margin:0!important;padding:0;font:400 12px/1.3 var(--sans)!important;letter-spacing:.01em!important;color:#aaa!important}
body .game-result-panel .game-result-value{grid-area:score;min-width:0;font:500 clamp(40px,8vw,58px)/.98 var(--sans);font-variant-numeric:tabular-nums;letter-spacing:-.065em;color:#ededed;overflow-wrap:anywhere}
body .game-result-panel .game-result-emblem{grid-area:emblem;align-self:center;width:62px;height:62px;margin-left:-8px;color:#aaa;filter:drop-shadow(0 4px 4px #0004);animation:result-emblem-land .85s .1s cubic-bezier(.16,.7,.25,1) both}
.game-result-emblem svg{display:block;width:100%;height:100%}
.game-result-emblem text{font-family:var(--sans);letter-spacing:-.06em}
body .game-result-panel[data-result-outcome=won] .game-result-emblem{color:#dedede;filter:drop-shadow(0 0 12px #ffffff18)}
body .game-result-panel .game-result-metrics{grid-area:metrics;display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 22px;min-width:0;margin:5px 0 8px}
.game-result-metrics>div{display:flex;align-items:baseline;gap:8px;min-width:0}
.game-result-metrics span{font:400 11px/1.4 var(--sans);color:#999}
.game-result-metrics strong{font:500 14px/1.4 var(--sans);font-variant-numeric:tabular-nums;color:#ccc}
body .game-result-panel .game-result-action{grid-area:action;position:relative!important;display:inline-flex!important;align-items:center;justify-content:center;gap:12px;width:100%!important;min-width:0!important;height:46px!important;min-height:46px!important;margin:0!important;padding:0 16px!important;clip-path:none!important;overflow:visible!important;border:0!important;border-radius:10px;white-space:nowrap;pointer-events:auto;cursor:pointer;background:linear-gradient(140deg,#dedede,#b4b4b4)!important;box-shadow:0 4px 9px #0003,inset 0 1px #ffffff55!important;color:#282828!important;font:500 13px/1 var(--sans)!important;transform:none;transition:transform .16s,filter .16s;touch-action:manipulation}
body .game-result-panel .game-result-action::before{content:'↻';font:400 20px/1 var(--sans)}
body .game-result-panel[data-result-game=relay] .game-result-action::before{content:'→'}
body .game-result-panel .game-result-action>span:last-child[aria-hidden=true]{display:none}
body .game-result-panel .game-result-action:active{transform:translateY(1px) scale(.985);filter:brightness(.94)}
body .game-result-panel .game-result-action:disabled{opacity:.58;cursor:default}
body .game-result-panel .game-result-home{grid-area:home;display:grid;place-items:center;width:46px;height:46px;min-height:44px;padding:0;margin:0;border:0;border-radius:10px;background:linear-gradient(135deg,#393939,#2b2b2b);box-shadow:inset 0 1px #ffffff06,0 3px 7px #0003;color:#bcbcbc;touch-action:manipulation;transition:background .2s,transform .15s}
.game-result-home svg{width:19px;height:19px}
body .game-result-panel .game-result-home:hover{color:#eee;background:#414141}
body .game-result-panel .game-result-home:active{transform:scale(.95)}
body .game-result-panel :is(a,button):focus-visible{outline:1.5px solid #d2d2d2;outline-offset:3px}
body .blocks-board-wrap[data-flow=over] .blocks-overlay.game-result-panel,
body:is([data-game=snake],[data-game='2048']) .board-container[data-flow=result] .game-overlay.game-result-panel,
body.together-page #duel-overlay.game-result-panel,
body.relay-page .relay-curtain.game-result-panel{position:absolute;inset:auto 12px 12px;min-height:0;max-height:calc(100% - 24px);padding:20px;border:0;border-radius:15px;background:linear-gradient(145deg,#2c2c2cf5,#222f);box-shadow:0 14px 32px #0005,inset 0 1px 1px #ffffff08;backdrop-filter:none;overflow:auto;animation:result-panel-arrive .6s cubic-bezier(.2,.65,.25,1) both}
body.play-page #board-overlay.flow-result{inset:auto 12px 12px;padding:20px;max-height:calc(100% - 24px);overflow:auto;border-radius:15px;background:linear-gradient(145deg,#2c2c2cf5,#222f);box-shadow:0 14px 32px #0005,inset 0 1px 1px #ffffff08;pointer-events:auto}
body.play-page #board-overlay.flow-result::after{display:none}
body.play-page #board-overlay.flow-result .game-result-panel{width:100%;padding:0}
.blocks-board-wrap[data-flow=over] .blocks-flow-cue{display:none}
body .board-container[data-flow=result]::after{display:none}
@keyframes result-emblem-land{from{opacity:0;transform:translateY(-8px) rotate(-7deg)}to{opacity:1;transform:none}}
@keyframes result-panel-arrive{0%{opacity:0;transform:translateY(14px)}20%{opacity:0}100%{opacity:1;transform:none}}
@media(max-width:360px){body .game-result-panel{gap:8px 10px;grid-template-columns:minmax(0,1fr) 46px}body .game-result-panel .game-result-value{font-size:40px}body .game-result-panel .game-result-emblem{width:52px;height:52px;margin-left:-4px}body .game-result-panel .game-result-metrics{gap:6px 15px;margin:2px 0 4px}body .blocks-board-wrap[data-flow=over] .blocks-overlay.game-result-panel,body:is([data-game=snake],[data-game='2048']) .board-container[data-flow=result] .game-overlay.game-result-panel,body.together-page #duel-overlay.game-result-panel,body.relay-page .relay-curtain.game-result-panel,body.play-page #board-overlay.flow-result{inset:auto 8px 8px;padding:16px}}
@media(prefers-reduced-motion:reduce){body .game-result-panel,body .game-result-panel .game-result-emblem{animation:none!important}body .game-result-panel :is(a,button){transition:none}}

/* A tangible receipt: the real server award lands once, without covering play. */
.game-result-coins{position:relative;isolation:isolate;display:grid;grid-template-columns:38px minmax(0,1fr) 36px;grid-template-areas:'coin amount shop' 'coin unit shop' 'note note shop';gap:1px 10px;padding:12px;border-radius:12px;overflow:hidden;background:radial-gradient(ellipse at 5% 0,#ffffff0c,transparent 70%),linear-gradient(120deg,#ffffff07,#ffffff03)}
.result-coin-icon{grid-area:coin;position:relative;width:36px;height:36px;transform:rotate(-12deg);box-shadow:inset 0 0 0 1px #ffffff55,inset 0 0 0 4px #6b6b6b80,2px 3px #717171,3px 5px #454545,5px 8px 9px #0004}
.result-coin-icon svg{width:29px;height:29px}
.game-result-coins strong{grid-area:amount;font-size:27px;line-height:1.05;overflow-wrap:anywhere}
.game-result-coins>span:not(.result-coin-icon){grid-area:unit;font-size:10px;margin-top:2px}
.game-result-coins small{grid-area:note;margin:7px 0 0;font-size:10px;color:#a4a4a4}
.result-coin-shop{grid-area:shop;display:grid;place-items:center;min-width:36px;min-height:44px;border-radius:9px;color:#bcbcbc;background:#ffffff05;touch-action:manipulation}
.result-coin-shop svg{width:18px;height:18px}.result-coin-shop:hover{background:#ffffff0b;color:#eee}
.result-coin-shop[hidden]{display:none}
.game-result-coins:not([data-state=credited]){grid-template-columns:30px minmax(0,1fr);grid-template-areas:'coin amount' 'note note';min-height:52px}
.game-result-coins:not([data-state=credited]) .result-coin-icon{width:25px;height:25px;opacity:.6}.game-result-coins:not([data-state=credited]) .result-coin-icon svg{width:21px;height:21px}
.game-result-coins::after{content:'';position:absolute;inset:-50%;z-index:-1;pointer-events:none;opacity:0;background:linear-gradient(110deg,transparent 38%,#ffffff14 49%,transparent 60%);transform:translateX(-60%)}
.game-result-coins.is-crediting::after{animation:reward-sheen 680ms ease-out both}
.game-result-coins.is-crediting .result-coin-icon{animation:reward-coin-land 650ms cubic-bezier(.16,.8,.2,1) both}
@keyframes reward-coin-land{0%{transform:translateY(-9px) rotate(-38deg) scale(.7);opacity:.3}65%{transform:translateY(-1px) rotate(-9deg) scale(1.07);opacity:1}100%{transform:rotate(-12deg) scale(1);opacity:1}}
@keyframes reward-sheen{0%{opacity:0;transform:translateX(-60%)}30%{opacity:1}100%{opacity:0;transform:translateX(60%)}}
@media(prefers-reduced-motion:reduce){.game-result-coins,.game-result-coins *,.game-result-coins::after{animation:none!important;transition:none!important}}
