.wd-stats-page{max-width:760px;margin:auto}.wd-stats-page .card{margin:16px 0;padding:22px}.wd-stats-page h1,.wd-stats-page h2{color:#fff}.wd-back{color:#ffd15d;font-weight:700}.wd-stats-page li{padding:5px 0}.wd-rating{display:inline-block;margin:6px auto;padding:4px 9px;border-radius:9px;font-size:13px;font-weight:800;border:1px solid currentColor}.wd-rating-blue{color:#77d8ff;background:#123b65}.wd-rating-green{color:#a3f58a;background:#193e30}.wd-rating-purple{color:#e2b0ff;background:#44305f}.wd-rating-gold{color:#ffd764;background:#654814}.wd-stat-button{display:block;margin:5px auto 9px;font-size:12px;padding:5px 9px}.wd-public-stats-overlay:not([hidden]){position:fixed;inset:0;z-index:99999;background:#001126bf;display:flex;align-items:center;justify-content:center;padding:16px}.wd-public-stats-box{width:min(480px,95vw);background:#102b56;color:white;border:2px solid #22c9ff;border-radius:16px;padding:22px;box-shadow:0 12px 45px #0008}.wd-public-stats-box button{float:right}.wd-stats-page .brand img{max-width:100%}#lifetimeStatsLink[hidden]{display:none!important}
/* Compact signed-in account panel; guest registration stays full width. */
#accountBar:has(#accountLogout:not([hidden])){padding:10px 12px!important;min-height:0!important;max-width:320px!important;margin:8px auto 12px!important;box-sizing:border-box}
#accountBar:has(#accountLogout:not([hidden])) #accountStatus{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:14px;line-height:1.2}
#accountBar:has(#accountLogout:not([hidden])) #accountStatus strong{font-size:15px;letter-spacing:.04em}
#accountBar:has(#accountLogout:not([hidden])) #accountStatus .wd-rating{margin:3px 0;padding:3px 8px;font-size:12px}
#accountBar:has(#accountLogout:not([hidden])) #accountActions{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap}
#accountBar:has(#accountLogout:not([hidden])) #lifetimeStatsLink{margin:3px!important;font-size:12px}
#accountBar:has(#accountLogout:not([hidden])) #accountLogout{padding:7px 11px;font-size:12px}
/* Preserve visibility semantics even when a parent layout rule uses display. */
.wd-rating[hidden],.wd-stat-button[hidden]{display:none!important}

/* In-game score cards: name, colored rating, stats control, then score. */
#playerCard,#opponentCard{display:flex;flex-direction:column;align-items:center}
#playerCard .wd-rating,#opponentCard .wd-rating{order:0;margin:5px auto 4px;padding:4px 9px;line-height:1.2;min-height:0;font-size:13px}
#playerCard .wd-stat-button,#opponentCard .wd-stat-button{margin:4px auto 8px}
#playerCard .wd-rating:not([hidden]),#opponentCard .wd-rating:not([hidden]){display:inline-block!important}

/* Five-tier competitive ratings: 1000 green, 1200 blue, 1500 red, 1800 purple, 2000 brilliant gold. */
.wd-rating-red{color:#ff7373;background:#5b1620;border-color:#ff4545;text-shadow:0 0 7px #ff323280}
.wd-rating-purple{color:#e2b0ff;background:#44305f;border-color:#bb7cff;text-shadow:0 0 7px #bb7cff66}
.wd-rating-gold{color:#fff6b0!important;background:linear-gradient(115deg,#a96600 0%,#ffd336 21%,#fff5a1 40%,#ffb400 61%,#fff3a1 79%,#b97700 100%)!important;border:2px solid #ffe987!important;box-shadow:0 0 7px #ffce44,0 0 16px #ffcf657a,inset 0 1px 3px #ffffffbb;text-shadow:0 1px 2px #724000,0 0 7px #fffbd8;position:relative;overflow:hidden;animation:wd-gold-glow 2.8s ease-in-out infinite}
.wd-rating-gold:after{content:'';position:absolute;inset:0;background:linear-gradient(105deg,transparent 25%,#ffffff00 37%,#ffffffa8 49%,#ffffff00 61%,transparent 75%);transform:translateX(-140%);animation:wd-gold-shine 3.5s ease-in-out infinite;pointer-events:none}
@keyframes wd-gold-glow{0%,100%{box-shadow:0 0 7px #ffce44,0 0 16px #ffcf657a,inset 0 1px 3px #ffffffbb}50%{box-shadow:0 0 11px #fff18b,0 0 24px #ffda66,inset 0 1px 4px #fff}}
@keyframes wd-gold-shine{0%,18%{transform:translateX(-140%)}52%,100%{transform:translateX(140%)}}
@media(prefers-reduced-motion:reduce){.wd-rating-gold,.wd-rating-gold:after{animation:none}}

/* Statistics page: align the main stats card directly under the centered Word Dome logo. */
.wd-stats-page .brand{
 height:125px;
 margin-bottom:0;
}
.wd-stats-page .card{
 margin:8px auto 16px;
}


/* Lifetime statistics: match the Play Online royal-blue / gold artwork. */
.wd-stats-page .brand{
 height:auto!important;
 min-height:0!important;
 margin:0 auto 0!important;
 padding:0!important;
 display:flex!important;
 justify-content:center!important;
 align-items:center!important;
}
.wd-stats-page .brand img{
 display:block!important;
 width:min(100%,510px)!important;
 height:auto!important;
 max-height:185px!important;
 object-fit:contain!important;
 margin:0 auto!important;
}
.wd-stats-page .card{
 width:min(470px,calc(100% - 28px))!important;
 max-width:470px!important;
 box-sizing:border-box!important;
 margin:3px auto 12px!important;
 padding:22px!important;
 border:2px solid #f4c253!important;
 border-radius:17px!important;
 background:linear-gradient(165deg,#153b7a 0%,#0b285b 55%,#071a42 100%)!important;
 box-shadow:0 0 17px #e7b8484d,inset 0 1px 0 #fff3!important;
}
.wd-stats-page .wd-back{
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 width:auto!important;
 margin:0 0 16px!important;
 padding:10px 17px!important;
 border:2px solid #ffe092!important;
 border-radius:10px!important;
 background:linear-gradient(#ffe48a,#e9a51b)!important;
 color:#092451!important;
 font-weight:900!important;
 text-decoration:none!important;
 box-shadow:0 3px 8px #0005!important;
}
.wd-stats-page .wd-back:hover{filter:brightness(1.08)}
.wd-stats-page h1{font-size:clamp(24px,4vw,32px)!important;line-height:1.2!important}
@media(max-width:520px){
 .wd-stats-page .card{padding:17px!important}
 .wd-stats-page .brand img{max-height:145px!important}
}

/* Royal Lifetime Player Statistics: dedicated player-only page */
body.wd-royal-stats{min-height:100vh;background:radial-gradient(ellipse at 50% 5%,#1a67c9 0%,#102f75 42%,#051536 100%);color:white}
body.wd-royal-stats .wd-stats-page{width:min(1080px,calc(100% - 24px));max-width:1080px;margin:0 auto;padding:8px 0 32px}
body.wd-royal-stats .brand img{width:min(660px,95vw)!important;max-height:210px!important}
body.wd-royal-stats .wd-back{margin:4px 0 15px!important}
.wd-royal-panel{border:3px solid #edbb48;border-radius:23px;padding:20px;background:linear-gradient(160deg,#123a83,#061b47 78%);box-shadow:0 12px 35px #0009,0 0 22px #e7b84844,inset 0 0 0 2px #fff2}
.wd-royal-panel h1{margin:0 0 18px;text-align:center;font:700 clamp(26px,4vw,43px) Georgia,serif!important;color:#ffdb6a!important;text-shadow:0 2px 4px #000,0 0 12px #d39b3c77}
.wd-stats-identity{display:flex;align-items:center;gap:18px;padding:12px 20px;margin-bottom:17px;border:1px solid #d6a83f;border-radius:16px;background:linear-gradient(100deg,#071b49,#124b9b,#061b49)}
.wd-stats-crown{font-size:55px;color:#ffda62;line-height:1}
#statsIdentity{font-size:clamp(20px,3vw,30px);font-weight:900;overflow-wrap:anywhere}
.wd-stats-rating{color:#92e5ff;font-size:17px;font-weight:800;margin-top:5px}
.wd-stats-emblem{margin-left:auto;font-size:50px;color:#fbd35b}
.wd-stat-panels{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.wd-stat-card{min-width:0;border:2px solid #d7a844;border-radius:17px;background:linear-gradient(160deg,#07347a,#061a43);padding:15px;box-shadow:inset 0 0 12px #1665d155}
.wd-stat-card h2{font:700 clamp(20px,2.5vw,26px) Georgia,serif!important;color:#ffe17a!important;margin:0 0 7px!important}
.wd-stat-subtitle{color:#cde3ff;margin:0 0 14px;font-size:14px}
.wd-stat-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.wd-stat-tile{border:1px solid #64a9ef;border-radius:11px;text-align:center;padding:14px 3px;background:#09295c;min-width:0}
.wd-stat-tile strong{display:block;font-size:clamp(20px,2.7vw,32px);color:white}
.wd-stat-tile span{display:block;font-size:12px;font-weight:700;color:white}
.wd-stat-tile.wins{background:#07552b;border-color:#2ddb80}.wd-stat-tile.losses{background:#621523;border-color:#f95e70}.wd-stat-tile.draws{background:#16345d}.wd-stat-tile.rate{background:#441078;border-color:#bd77ff}
.wd-difficulty-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:15px}
.wd-difficulty{min-width:0;border:1px solid #67b8fc;border-radius:9px;padding:8px 5px;text-align:center;background:#072451}
.wd-difficulty-name{font-weight:900;background:#0b8ec9;border-radius:5px;padding:4px;margin-bottom:8px}
.wd-difficulty:first-child .wd-difficulty-name{background:#07864d}.wd-difficulty:last-child .wd-difficulty-name{background:#b32736}
.wd-difficulty strong,.wd-difficulty span{display:block;font-size:12px;line-height:1.5}
.wd-progress{height:9px;border:1px solid #448bd2;background:#061735;border-radius:10px;overflow:hidden;margin-top:7px}.wd-progress i{display:block;height:100%;background:#2de37c}
.wd-stats-refresh{display:block;margin:18px auto 0!important;background:linear-gradient(#ffe48a,#e9a51b)!important;color:#092451!important;border:2px solid #ffe092!important;border-radius:10px;padding:10px 18px;font-weight:900}
@media(max-width:740px){.wd-stat-panels{grid-template-columns:1fr}.wd-royal-panel{padding:12px}.wd-stats-identity{padding:12px;gap:10px}.wd-stats-crown{font-size:37px}.wd-stats-emblem{font-size:34px}}

/* Approved stats presentation: lift logo 1% of viewport and raise frame toward trophy */
body.wd-royal-stats .wd-stats-page .brand{transform:translateY(-1vh)!important;position:relative!important;z-index:2!important}
body.wd-royal-stats .wd-royal-panel{position:relative!important;margin-top:-22px!important}
body.wd-royal-stats .wd-stats-identity{justify-content:flex-start!important}
@media(max-width:740px){body.wd-royal-stats .wd-royal-panel{margin-top:-10px!important}}

/* Position trophy pedestal against upper frame edge; preserve stats and back link */
body.wd-royal-stats .wd-stats-page .brand{margin-bottom:-42px!important;z-index:3!important;pointer-events:none!important}
body.wd-royal-stats .wd-royal-panel{margin-top:-32px!important}
body.wd-royal-stats .wd-stats-page .wd-back{position:relative!important;z-index:4!important}
@media(max-width:740px){body.wd-royal-stats .wd-stats-page .brand{margin-bottom:-22px!important}body.wd-royal-stats .wd-royal-panel{margin-top:-15px!important}}

/* Compact royal in-game player statistics overlay */
.wd-public-stats-overlay:not([hidden]){z-index:100050!important;background:#001029d9!important;overflow:auto;align-items:center!important}
.wd-public-stats-overlay .wd-royal-quickstats{position:relative;float:none;width:min(790px,96vw);max-height:90dvh;overflow:auto;box-sizing:border-box;border:3px solid #e5b74c;border-radius:19px;padding:16px;background:linear-gradient(150deg,#164a99,#071c49 75%);box-shadow:0 15px 50px #000b,0 0 22px #f0bb4850;color:#fff}
.wd-royal-quickstats #closePublicStats{position:absolute;right:12px;top:12px;float:none;background:linear-gradient(#ffe68d,#e9a820);color:#092653;border:1px solid #ffe6a0;border-radius:8px;font-size:25px;font-weight:900;width:40px;height:38px;line-height:1;cursor:pointer;z-index:2}
.wd-quickstats-logo{display:block;width:min(340px,70%);height:auto;max-height:110px;object-fit:contain;margin:0 auto -3px}
.wd-royal-quickstats #publicStatsHeading{text-align:center;color:#ffe080;font:700 clamp(22px,3vw,31px) Georgia,serif;text-shadow:0 2px 5px #000;margin:4px 0 14px}
.wd-quick-player{border:1px solid #d5a84b;border-radius:12px;padding:10px 16px;background:linear-gradient(95deg,#061a43,#1955a2);margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.wd-quick-player strong{font-size:22px}.wd-quick-player span{font-weight:800;color:#8ddcff}
.wd-quick-panels{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.wd-quick-card{border:2px solid #d4a640;border-radius:12px;padding:12px;background:linear-gradient(#083578,#061b47);min-width:0}
.wd-quick-card h3{font:700 20px Georgia,serif;color:#ffdf78;margin:0 0 12px}
.wd-quick-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.wd-quick-tile{border:1px solid #5ba9ec;border-radius:8px;padding:9px 2px;text-align:center;background:#10365c;min-width:0}
.wd-quick-tile strong{display:block;font-size:clamp(17px,2.4vw,25px)}.wd-quick-tile span{font-size:11px;font-weight:700}
.wd-quick-tile.wins{background:#07552b;border-color:#25d77a}.wd-quick-tile.losses{background:#601523;border-color:#f25b70}.wd-quick-tile.rate{background:#471275;border-color:#c277f5}
.wd-quick-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:10px}
.wd-quick-difficulty{border:1px solid #5ba9ec;border-radius:7px;padding:5px;text-align:center;min-width:0;background:#0a2c62}
.wd-quick-difficulty strong{display:block;background:#098dba;border-radius:4px;margin-bottom:5px}.wd-quick-difficulty:first-child strong{background:#0a9155}.wd-quick-difficulty:last-child strong{background:#b62b3c}
.wd-quick-difficulty span,.wd-quick-difficulty small{display:block;font-size:11px;line-height:1.5}
.wd-quick-meter{height:7px;background:#071a38;border:1px solid #458ed4;border-radius:9px;overflow:hidden;margin-top:5px}.wd-quick-meter i{display:block;height:100%;background:#22d87d}
@media(max-width:620px){.wd-quick-panels{grid-template-columns:1fr}.wd-public-stats-overlay .wd-royal-quickstats{padding:12px}.wd-quick-card h3{font-size:18px}}

/* In-game stats dialog: compact header, full-screen overlay above game HUD */
body>.wd-public-stats-overlay:not([hidden]){position:fixed!important;inset:0!important;z-index:2147483000!important;display:flex!important;align-items:center!important;justify-content:center!important}
.wd-royal-quickstats #publicStatsHeading{margin:5px 44px 12px!important}

/* Ensure the in-game stats popup never displays a second Word Dome logo. */
body>.wd-public-stats-overlay .wd-royal-quickstats .wd-quickstats-logo,
body>.wd-public-stats-overlay .wd-royal-quickstats>img,
body>.wd-public-stats-overlay .wd-royal-quickstats .brand{display:none!important}
body>.wd-public-stats-overlay .wd-royal-quickstats{isolation:isolate;background:#0b275d!important}
body>.wd-public-stats-overlay .wd-royal-quickstats #publicStatsHeading{margin-top:12px!important}

/* An account without active Royal Membership has no displayed
   competitive rating. Preserve the existing badge geometry and gold frame. */
.wd-rating-unrated{color:#dce8f9;background:#213858;border-color:#a7c0de}

/* Membership tenure and rank presentation; tier follows the live numeric rating. */
.wd-royal-since{color:#ffdb73;font:800 12px/1.3 Georgia,serif;letter-spacing:.035em;margin-top:5px;text-shadow:0 1px 2px #0009}
.wd-royal-since[hidden]{display:none!important}
.wd-tier-green,.wd-tier-text.wd-rating-green{color:#4bdf83!important}
.wd-tier-blue,.wd-tier-text.wd-rating-blue{color:#75bdff!important}
.wd-tier-red,.wd-tier-text.wd-rating-red{color:#ff868f!important}
.wd-tier-purple,.wd-tier-text.wd-rating-purple{color:#d6a0ff!important}
.wd-tier-gold,.wd-tier-text.wd-rating-gold{color:#ffdb5a!important}
.wd-stats-emblem{white-space:nowrap;font-size:clamp(20px,3vw,42px)!important;letter-spacing:-.10em;text-align:right}
.wd-stats-rating{letter-spacing:.025em}
.wd-quick-player .wd-tier-text{font-weight:800}
.wd-quick-player .wd-royal-since{display:block}

/* Royal statistics identity only: official crest and uniform membership-year lettering. */
.wd-royal-player-name,#statsIdentity{display:inline-flex;align-items:center;gap:9px}
.wd-stats-crest{display:inline-block;width:32px;height:32px;object-fit:contain;flex:none;vertical-align:middle}
.wd-quick-player .wd-royal-since,#statsRoyalSince{font-family:Georgia,serif!important;font-size:13px!important;font-weight:800!important;line-height:1.25!important;letter-spacing:0!important;white-space:nowrap!important;font-variant-numeric:lining-nums!important;font-variant-caps:normal!important;font-variant:normal!important;text-transform:none!important}
@media(max-width:600px){.wd-quick-player .wd-royal-since,#statsRoyalSince{font-size:11px!important}.wd-stats-crest{width:27px;height:27px}}
