/* Final reference refinements, scoped to auth and the existing pending area. */
html body.sgbo-page.sg-riddles-page .brand-name{text-transform:uppercase;letter-spacing:.5px}
.sg-riddles-page .sgb-back{display:inline-flex;align-items:center;justify-content:center;gap:9px}
.sg-riddles-page #brainGameContent .is-submitting{outline:3px solid #d7a55e;outline-offset:2px}
.sg-riddles-page #brainGameContent[aria-busy="true"] button{cursor:progress}
.sg-riddles-page .sgb-card:not(.is-open){background-color:#630b29;border-radius:16px}
html body.sg-auth-riddles #spinner:not(.show){pointer-events:none;transition:none}
html.sg-ivory-app body.sg-auth-riddles :is(.sg-login-card,.sg-register-card){padding-inline:13px;padding-top:23px}
html.sg-ivory-app body.sg-auth-riddles :is(.sg-login-input,.sg-register-input) .form-control{font-size:16px;box-shadow:inset 0 2px 4px #ba778717,0 3px 7px #86423b12!important}
html.sg-ivory-app body.sg-auth-riddles :is(.sg-login-support,.sg-register-support){font-size:15px;font-weight:600}
html body.sg-auth-riddles.sg-register-page{background:linear-gradient(140deg,#e6b0b8bb,#fff0dcb8 50%,#e8b0b8ad),url('../images/burgundy-games/register-background.webp') center/cover fixed!important}
html body.sgbo-page.sg-riddles-page{background:radial-gradient(ellipse at 100% 0,#eebfc4,transparent 50%),linear-gradient(140deg,#fff5e9,#f6d9cc)!important}
html body.sgbo-page.sg-riddles-page .brand-header{position:relative;top:auto;overflow:hidden;min-height:96px;padding:13px;border-radius:20px;isolation:isolate}
html body.sgbo-page.sg-riddles-page .brand-header::after{content:'';position:absolute;z-index:-1;right:-76px;top:-106px;width:230px;height:230px;border:1px solid #edc18399;border-radius:50%;box-shadow:0 0 0 23px #e8b69d10,0 0 0 45px #efa4ac0d;pointer-events:none}
html body.sgbo-page.sg-riddles-page .brand{gap:13px;flex:1;min-width:0}
html body.sgbo-page.sg-riddles-page .brand-logo{width:62px;height:62px;flex-shrink:0}
html body.sgbo-page.sg-riddles-page .brand-name{font-size:24px;line-height:1.1;white-space:normal}
/* Keep the approved single-line brand beside the Back/Logout control. */
html body.sgbo-page.sg-riddles-page .brand-logo{width:62px!important;height:62px!important}
html body.sgbo-page.sg-riddles-page .brand-name{font-size:clamp(17px,5.2vw,23px)!important;white-space:nowrap}
html body.sgbo-page.sg-riddles-page .sgr-categories-header .brand-logo{width:48px!important;height:48px!important}
html body.sgbo-page.sg-riddles-page .sgr-categories-header .brand-name{font-size:clamp(15px,4.5vw,20px)!important}
/* Keep all three header controls separate on narrow phones. */
@media(max-width:350px){html body.sgbo-page.sg-riddles-page .sgr-categories-header{padding-inline:8px;gap:4px}html body.sgbo-page.sg-riddles-page .sgr-categories-header .brand{gap:4px}html body.sgbo-page.sg-riddles-page .sgr-categories-header .brand-logo{width:40px!important;height:40px!important}}
html body.sgbo-page.sg-riddles-page .logout{min-height:44px;padding:8px 13px;border-radius:13px;font-size:16px}
html body.sgbo-page.sg-riddles-page .sgb-shell{padding:12px 14px 28px}
html body.sgbo-page.sg-riddles-page .sgb-panel{border:1px solid #dba968;padding:20px 16px;border-radius:24px;background:radial-gradient(ellipse at 0 0,#fffefa,transparent 50%),linear-gradient(145deg,#fffaf3,#fae7d7);box-shadow:inset 0 0 0 3px #fff7edb8,0 8px 15px #6c2c3730}
.sg-riddles-page .sgb-primary,.sg-riddles-page .sgb-continue-label{position:relative;border:2px solid #d0a061;border-radius:17px;background:radial-gradient(ellipse at 18% 0,#eb8b9f88,transparent 65%),linear-gradient(170deg,#9d2a49 0%,#70112f 46%,#47021c 53%,#5b0b29)!important;box-shadow:inset 0 2px 2px #ffd1bd99,inset 0 -3px 3px #26001166,0 2px 0 #a4643d,0 5px 9px #70343c44;color:#fff1d5!important;font-size:24px;line-height:1.2;min-height:60px;padding:14px 18px}
.sg-riddles-page .sgb-secondary{border-color:#dca56e;background:linear-gradient(160deg,#fff7e8,#f4cdad);box-shadow:inset 0 2px #fff,0 4px 6px #773f3426;min-height:50px;font-size:20px;line-height:1.25}
.sg-riddles-page .sgb-primary:disabled{cursor:not-allowed;opacity:.66}
.sg-riddles-page .sgb-primary:focus-visible,.sg-riddles-page .sgb-secondary:focus-visible,.sg-riddles-page .sgb-card:focus-visible,.sg-riddles-page .sgb-game:focus-visible,.sg-riddles-page .sgb-history-card:focus-visible{outline:3px solid #b76632;outline-offset:4px}
html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-games{gap:12px}
html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-game{min-height:108px;padding:8px 13px 8px 6px;gap:9px;background:radial-gradient(ellipse at 100% 5%,#fff9f2 0 47%,transparent 48%),linear-gradient(145deg,#fffdf4,#f9dfd2);border-radius:17px;box-shadow:inset 0 1px #fff,0 4px 7px #7c3b342b}
html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-game-copy{margin-left:0}
html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-game-art{width:101px;height:91px;flex-basis:101px}
html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-game-copy strong{font-size:22px;line-height:1.1}
html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-game-copy small{font-size:14px;font-weight:600}
html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-game-arrow{width:37px;height:37px;flex-basis:37px;font-size:31px;border-color:#e6b68b}
.sg-riddles-page .sgb-scores{min-height:74px;border:1px solid #d2a36b;background:radial-gradient(ellipse at 100% 0,#b6557280,transparent 65%),linear-gradient(150deg,#811d39,#390014);box-shadow:inset 0 2px #f4b7b366,0 5px 8px #722c2d33}
.sg-riddles-page .sgb-scores img{width:57px;height:57px;margin-right:4px}.sg-riddles-page .sgb-scores strong{border-left:1px solid #dbac7266;padding-left:16px}
html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-resume-card{margin-bottom:12px}.sg-riddles-page .sgb-continue-label{flex-shrink:0;display:block;min-height:36px;padding:7px 10px;font-size:15px;border-radius:20px}
html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-resume-card .sgb-game-copy strong{font-size:19px}.sg-riddles-page .sgb-resume-card .sgb-game-art{flex-basis:88px!important;width:88px!important}
html body.sgbo-page.sg-riddles-page.sg-game-memory,html body.sgbo-page.sg-riddles-page.sg-intro-memory{background:url('../images/burgundy-games/burgundy-wave.svg') bottom/100% 200px no-repeat,linear-gradient(145deg,#fff1e2,#f3cdbb)!important;min-height:100vh;min-height:100dvh}
html body.sgbo-page.sg-riddles-page.sg-game-memory .sgb-shell,html body.sgbo-page.sg-riddles-page.sg-intro-memory .sgb-shell{padding:0 7px 180px}
html body.sgbo-page.sg-riddles-page.sg-game-memory .sgb-panel,html body.sgbo-page.sg-riddles-page.sg-intro-memory .sgb-panel{padding:20px 18px 14px;border:0;box-shadow:inset 0 0 0 6px #ffe8d9,0 5px 10px #87453420}
html body.sgbo-page.sg-riddles-page.sg-game-memory .sgb-grid{margin:18px 7px 0;gap:9px}.sg-riddles-page .sgb-card{aspect-ratio:.69}.sg-riddles-page .sgb-card:not(.is-open){background-size:110% 110%;filter:drop-shadow(0 3px 3px #7a3d3a44)}
html body.sgbo-page.sg-riddles-page.sg-game-memory #brainGameContent .sgb-panel h1{font-size:34px;margin-bottom:12px}
.sg-riddles-page .sgb-metrics{gap:10px}.sg-riddles-page .sgb-metrics>span{min-height:66px;box-shadow:inset 0 2px #fff,0 3px 6px #96564026;background:linear-gradient(135deg,#fffbf4,#fbe9dd);border-color:#dfb793}
.sg-riddles-page .sgb-memory-metric{justify-content:center}.sg-riddles-page .sgb-memory-metric::before{font-size:32px}.sg-riddles-page .sgb-memory-metric strong{font-size:26px}
.sg-riddles-page .sgb-memory-instruction{font-size:19px!important;line-height:1.25!important;padding:10px!important;margin-bottom:0!important}
html body.sgbo-page.sg-riddles-page.sg-game-words,html body.sgbo-page.sg-riddles-page.sg-game-maths,html body.sgbo-page.sg-riddles-page.sg-game-daily{background:linear-gradient(140deg,#f3c7c7dd,#fff0ddcc 50%,#e8a7b3cc),url('../images/burgundy-games/register-background.webp') center/cover fixed!important}
html body.sgbo-page.sg-riddles-page.sg-game-words .brand-header,html body.sgbo-page.sg-riddles-page.sg-game-daily .brand-header{min-height:125px;padding:20px 17px 38px;border-radius:24px}
html body.sgbo-page.sg-riddles-page.sg-game-words .brand-logo,html body.sgbo-page.sg-riddles-page.sg-game-daily .brand-logo{width:75px;height:75px}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-shell,html body.sgbo-page.sg-riddles-page.sg-game-daily .sgb-shell{padding-top:0}
html body.sgbo-page.sg-riddles-page.sg-game-words #brainGameContent .sgb-panel,html body.sgbo-page.sg-riddles-page.sg-game-daily #brainGameContent .sgb-panel{margin-top:-22px}
html body.sgbo-page.sg-riddles-page.sg-game-words #brainGameContent .sgb-panel h1,html body.sgbo-page.sg-riddles-page.sg-game-daily #brainGameContent .sgb-panel h1{font-size:36px}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-clue{min-height:94px!important;margin:18px 0!important;font-size:22px!important}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-slots{gap:7px;margin:18px 3px 23px}html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-slot{box-shadow:inset 0 2px 5px #a5624233,0 4px 5px #783d3633}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-tiles{gap:8px;margin-bottom:26px}html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-tiles button{min-height:62px;font-size:36px;box-shadow:inset 0 2px #fff,0 3px 0 #ad8973,0 5px 7px #803c3533}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-controls{gap:8px;margin-bottom:23px}html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-controls button{background:linear-gradient(#fff8f2,#efbfc1);font-size:16px;min-height:50px}html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-controls button:last-child{background:linear-gradient(#fff4d4,#edc491)}
.sg-riddles-page .sgb-controls button::before{font-family:'Font Awesome 5 Free';font-weight:900;font-size:19px;margin-right:6px}.sg-riddles-page .sgb-controls button:nth-child(1)::before{content:'\f2ea'}.sg-riddles-page .sgb-controls button:nth-child(2)::before{content:'\f2ed'}.sg-riddles-page .sgb-controls button:nth-child(3)::before{content:'\f0eb'}
html body.sgbo-page.sg-riddles-page.sg-game-maths .sgb-shell{padding-top:14px!important}html body.sgbo-page.sg-riddles-page.sg-game-maths .sgb-panel{padding:23px 18px!important}html body.sgbo-page.sg-riddles-page.sg-game-maths #brainGameContent .sgb-clue{min-height:136px;font-size:58px;margin:17px 0 21px}
html body.sgbo-page.sg-riddles-page.sg-game-maths .sgb-choices{gap:16px}html body.sgbo-page.sg-riddles-page.sg-game-maths .sgb-choices button{min-height:102px;border-radius:23px;font-size:42px;box-shadow:inset 0 2px 2px #fff0cd99,inset 0 -3px 2px #34001599,0 3px 0 #b5824f,0 6px 8px #57162e55}
html body.sgbo-page.sg-riddles-page.sg-game-daily .sgb-progress{display:block!important;border-radius:20px!important;margin:12px 0 20px!important;background:linear-gradient(#fff3e9,#efc9c8)!important;padding:5px!important}
html body.sgbo-page.sg-riddles-page.sg-game-daily #brainGameContent .sgb-clue{min-height:115px;font-size:25px;margin:18px 0!important;box-shadow:none;border-color:#efc8ac}
html body.sgbo-page.sg-riddles-page.sg-game-daily .sgb-choices{gap:13px}html body.sgbo-page.sg-riddles-page.sg-game-daily .sgb-choices button{min-height:65px;background:linear-gradient(150deg,#fffcf4,#f2d4cf);font-size:23px;padding-inline:16px;box-shadow:inset 0 2px #fff,0 3px 5px #8f534333}
html body.sgbo-page.sg-riddles-page.sg-game-daily .sgb-choices button::before{width:27px;height:27px;flex-basis:27px;box-shadow:inset 0 1px #fff,0 2px 3px #b9986644}
.sg-riddles-page .sgb-result-visual{height:205px;width:100%;margin:14px auto 7px}.sg-riddles-page .sgb-result-score{font-size:30px;line-height:1.1;padding:15px;border-radius:17px;margin:10px 8px}
.sg-riddles-page .sgb-result-score strong{font-size:55px}.sg-riddles-page .sgb-result-score small{display:block;font-size:28px}.sg-riddles-page .sgb-result .sgb-metrics>span{min-height:82px;font-size:18px}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-result-score{display:flex;align-items:baseline;justify-content:center;gap:10px;padding:10px}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-result-score strong{font-size:38px}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-result-score small{display:inline;font-size:23px}
.sg-riddles-page .sgb-result .sgb-primary{margin-top:15px}.sg-riddles-page .sgb-result-back{margin-top:14px}
.sg-riddles-page .sgb-result-visual-daily{height:235px}.sg-riddles-page .sgb-result-visual-daily .sgb-medal-score{font-size:52px}.sg-riddles-page .sgb-result-visual-daily::after{content:'';position:absolute;top:12%;width:75%;max-width:205px;aspect-ratio:1;border:2px solid #d7a55e;border-radius:50%;pointer-events:none;box-shadow:inset 0 0 0 2px #ffe3b7,0 3px 5px #92533355}
.sg-riddles-page .sgb-intro-art{height:235px;width:100%;margin:20px auto 12px}.sg-riddles-page .sgb-intro h1{font-size:36px}.sg-riddles-page .sgb-intro-description{font-size:21px!important}
html body.sgbo-page.sg-riddles-page.sg-scores-page .brand-header{margin-top:0!important;border-radius:0!important;width:100%!important;max-width:none!important;min-height:85px}.sg-riddles-page .sgb-empty-scores img{margin:48px auto 28px;width:100%;max-width:310px}.sg-riddles-page .sgb-empty-scores .sgb-primary{border-radius:32px;margin:25px 10px 0;width:calc(100% - 20px)}
.sg-riddles-page .sgb-history-heading{text-align:center;font-size:27px!important;margin:30px 0 22px!important}.sg-riddles-page .sgb-history-list{display:grid;gap:14px}.sg-riddles-page .sgb-history-card{display:grid;grid-template-columns:82px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:110px;padding:10px 8px;border:1px solid #d79c64;border-radius:18px;background:linear-gradient(140deg,#fffcf6,#f9e9d9);box-shadow:inset 0 2px #fff,0 5px 7px #7e453229;color:#4a071f;text-decoration:none}.sg-riddles-page .sgb-history-card .sgb-game-art{width:82px;height:82px}.sg-riddles-page .sgb-history-copy{min-width:0;display:grid;gap:3px}.sg-riddles-page .sgb-history-copy strong{font-size:22px;line-height:1.05}.sg-riddles-page .sgb-history-copy small{font-size:12px;color:#875763}.sg-riddles-page .sgb-history-score{min-width:76px;padding:15px 8px;border:1px solid #dca364;border-radius:15px;background:linear-gradient(#fff4df,#f4d3b7);box-shadow:inset 0 2px #fff,0 4px 6px #955f4433;text-align:center}.sg-riddles-page .sgb-history-score strong{font-size:25px;white-space:nowrap}.sg-riddles-page .sgb-history-score small{display:block;font-size:16px}.sg-riddles-page .sgb-history-detail{grid-column:1/-1;text-align:right;font-size:13px;color:#875763}
html body.sg-riddles-page .sgr-round-intro{gap:13px;padding:17px 15px;margin-bottom:14px}.sg-riddles-page .sgr-round-intro h1::before{content:'\f518';font-family:'Font Awesome 5 Free';display:inline-block;margin-right:10px;color:#ca8a35;text-shadow:0 2px #fff0c4}
html body.sg-riddles-page .sgr-stat{min-height:146px;padding:11px;gap:8px;border-radius:17px}.sg-riddles-page .sgr-stat>span{text-transform:uppercase;font-weight:700}.sg-riddles-page .sgr-stat strong{font-size:40px}
html body.sg-riddles-page .sgr-history{margin-top:15px}.sg-riddles-page .sgr-section-heading{background:radial-gradient(ellipse at 100% 0,#d2788f66,transparent 65%),linear-gradient(#8b213e,#4c041e);color:#ffe6b6;box-shadow:inset 0 1px #fff7ca80;padding:12px 14px}.sg-riddles-page .sgr-section-heading>span{color:#efc2ad}.sg-riddles-page .sgr-section-heading h2{color:#ffe6b6}
@media(max-width:350px){html body.sgbo-page.sg-riddles-page .brand-name{font-size:20px}.sg-riddles-page .sgb-game-copy strong,html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-game-copy strong{font-size:19px}html body.sgbo-page.sg-riddles-page.sg-games-home .sgb-game-art{flex-basis:72px;width:72px;height:72px}.sg-riddles-page .sgb-continue-label{font-size:12px;padding:7px}.sg-riddles-page .sgb-history-card{grid-template-columns:60px minmax(0,1fr) auto;gap:6px}.sg-riddles-page .sgb-history-card .sgb-game-art{width:60px;height:60px}.sg-riddles-page .sgb-history-copy strong{font-size:18px}.sg-riddles-page .sgb-history-score{min-width:62px}.sg-riddles-page .sgb-history-score strong{font-size:22px}}
@media(forced-colors:active){html body.sgbo-page.sg-riddles-page :is(.sgb-primary,.sgb-secondary,.sgb-panel,.sgb-game,.sgb-history-card,.sgb-history-score){background:Canvas!important;color:CanvasText!important;box-shadow:none!important}}
html body.sgbo-page.sg-riddles-page.sg-game-words .brand-header{margin-top:34px!important}
html body.sgbo-page.sg-riddles-page.sg-game-daily .brand-header{margin-top:56px!important}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-back{background:linear-gradient(#fff3ed,#e9b8c1)!important;border-color:#d7a76e!important}
html body.sgbo-page.sg-riddles-page.sg-game-words .sgb-clue{font-size:20px!important;padding-inline:12px}
.sg-riddles-page .sgb-result-metric{display:grid;align-content:center;justify-items:center;gap:4px}.sg-riddles-page .sgb-result-metric small{font-size:16px}.sg-riddles-page .sgb-result-metric strong{font-size:30px;line-height:1.15}.sg-riddles-page .sgb-result-metric::before{font-family:'Font Awesome 5 Free';font-weight:900;color:#b47283;font-size:27px}.sg-riddles-page .sgb-metric-moves::before{content:'\f54b'}.sg-riddles-page .sgb-metric-time::before{content:'\f2f2'}.sg-riddles-page .sgb-metric-retries::before{content:'\f2ea'}.sg-riddles-page .sgb-metric-hints::before{content:'\f0eb';color:#b8812d}
.sg-riddles-page .sgb-completed{display:flex;align-items:center;justify-content:center;gap:15px;background:linear-gradient(#fffff3,#eaf3df)!important}.sg-riddles-page .sgb-completed img{width:44px;height:44px}.sg-riddles-page .sgb-completed strong{font-size:25px}.sg-riddles-page .sgb-result-score small{font-weight:700}.sg-riddles-page .sgb-pair-count{width:max-content;margin:12px auto 5px;padding:13px 25px;border:1px solid #deb797;border-radius:12px;background:#ffefe2;font-weight:700;font-size:20px!important}.sg-riddles-page .sgb-pair-count i{color:#b47785;margin-right:10px}
.sg-riddles-page .sgb-intro form .sgb-primary::before,.sg-riddles-page .sgb-empty-scores .sgb-primary::before{content:'\f04b';font-family:'Font Awesome 5 Free';font-weight:900;margin-right:13px;color:#ffe2a5}.sg-riddles-page .sgb-result form .sgb-primary::before{content:'\f2f9';font-family:'Font Awesome 5 Free';font-weight:900;margin-right:13px;color:#ffe2a5}
