/* A single character turns cyan at a time; the full title stays readable. */
a.ranking-highlight {
 display:inline-flex; align-items:center; justify-content:center; gap:9px;
 padding:10px 13px; min-height:44px; max-width:100%; min-width:0;
 color:#ffe494; background:linear-gradient(115deg,#193c40,#203c2a);
 border:1px solid #e7bb51; border-radius:5px; text-decoration:none;
 font-weight:800; line-height:1.45; white-space:normal; overflow-wrap:anywhere;
}
a.ranking-highlight:hover,a.ranking-highlight:focus-visible {color:#fff6d9;border-color:#fff1b0;box-shadow:0 0 0 3px #f7c94840;outline:2px solid transparent;}
.ranking-highlight .ranking-trophy {flex-shrink:0;font-size:1.2rem;}
.topbar-meta .ranking-highlight {max-width:300px;letter-spacing:0;font-size:.75rem;}
.player-links .ranking-highlight {justify-content:flex-start;font-size:1rem;}
.ranking-gate {padding:clamp(24px,5vw,48px);text-align:center;border-color:#e7bb51;}
.ranking-gate .ranking-trophy {font-size:2.5rem;display:block;margin-bottom:18px;}
.ranking-gate h2 {line-height:1.5;}
.ranking-gate .pixel-button {max-width:100%;white-space:normal;}
.ranking-gate [hidden], [hidden].ranking-gate, [hidden]#board-panel {display:none!important;}
@media(max-width:560px) {
 .topbar-meta {flex-wrap:wrap;}
 .topbar-meta .ranking-highlight {flex:1 1 100%;max-width:100%;}
 .ranking-gate {padding:24px 16px;}
}
.ranking-character { color:inherit; }
.ranking-character.is-highlighted { color:#71fff0; background:#71fff018; text-shadow:0 0 8px #38e8d5; }
@media(prefers-reduced-motion:reduce) {
 .ranking-character.is-highlighted { color:inherit; background:transparent; text-shadow:none; }
}

.ranking-stats-action { width:100%; margin:8px 0 12px; }
.ranking-stats-action .ranking-highlight { display:flex; width:100%; box-sizing:border-box; font-size:.8rem; letter-spacing:.02em; }

/* Remove the preceding layout's bottom margin so this gap is consistently 8px. */
body[data-game-id] :is(.stats-grid,.test-stats,.scoreboard,.stats):has(+ .ranking-stats-action, + .reactive-detail) { margin-bottom:0; }
body[data-game-id] .reactive-detail { margin:8px 0 0; min-height:0; }
body[data-game-id] .reactive-detail:empty { display:none; }
