/* R10 petrol/cream shared shell. Buttons use the existing CWK solid rounded box-shadow. */
#hiscore-nav51{position:relative;z-index:100;display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap;padding:10px 14px 13px;background:#244b56;color:#fff;border-bottom:3px solid #e5ad39;font:800 13px/1.25 system-ui,sans-serif;min-height:58px;box-sizing:border-box;width:100%}
#hiscore-nav51 a,#hiscore-nav51 button{appearance:none;display:inline-flex;align-items:center;justify-content:center;min-height:34px;gap:5px;background:#fff;color:#222;border:2px solid #222;border-radius:10px;padding:7px 12px;text-decoration:none;font:900 13px/1.25 system-ui,sans-serif;box-shadow:0 3px #222;cursor:pointer;transform:none;white-space:nowrap}
#hiscore-nav51 a:hover,#hiscore-nav51 button:hover{background:#fff7d2}
#hiscore-nav51 a:active,#hiscore-nav51 button:active{transform:translateY(2px);box-shadow:0 1px #222}
#hiscore-nav51 a:focus-visible,#hiscore-nav51 button:focus-visible{outline:3px solid #f5c657;outline-offset:3px}
#hiscore-nav51 [hidden]{display:none!important}
#hiscore-nav51 .hs-nav-separator{height:26px;border-left:2px solid #a7c1c6;margin:0 5px}
.hs-hint-in-nav{position:absolute!important;left:-10000px!important;right:auto!important;top:auto!important;bottom:auto!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}
body:has(#hiscore-nav51){scroll-padding-top:70px}
body.hiscore-nav-flex-layout{flex-direction:column;justify-content:flex-start;align-items:center}
body.hiscore-nav-flex-layout>#hiscore-nav51{flex:0 0 auto;align-self:stretch;width:100%}
body.hiscore-nav-flex-layout>main{flex:0 1 auto;max-width:100%}
/* Legacy menu links: use the same raised outline without changing destinations or events. */
.hs-level-menu__list{grid-template-columns:repeat(2,minmax(0,1fr))}
.hs-level-menu__item{border:2px solid #222!important;border-radius:12px!important;box-shadow:0 4px #222!important;background:#fff!important;min-width:0}
.hs-level-menu__item-title{font-size:.85rem!important;color:#777!important;font-weight:650!important}
.hs-level-menu__item-description{font-size:1.06rem!important;color:#222!important;font-weight:850!important}
.hs-level-menu__item:hover{background:#fff7d2!important}
/* Shared level-card variants; do not change CWK's game controls. */
.level-card{border:2px solid #222!important;box-shadow:0 4px #222!important;border-radius:12px!important}
@media(max-width:720px){#hiscore-nav51{gap:7px;padding:9px 6px 12px}#hiscore-nav51 a,#hiscore-nav51 button{font-size:12px;padding:6px 9px}#hiscore-nav51 .hs-nav-separator{display:none}.hs-level-menu__list{grid-template-columns:1fr}}

.level-card .description{display:block;font-size:1.05rem!important;font-weight:850!important;color:#222!important}.level-card .hs-catalogue-id{display:block;font-size:.78rem!important;font-weight:650!important;color:#777!important;margin-top:5px}.level-card:hover{background:#fff7d2!important}

/* Menu cards: preserve each menu's links and badge data; upgrade only their visual treatment. */
body.hs-level-menu-page main .menu-grid,body.hs-level-menu-page main .levels,body.hs-level-menu-page main .list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
body.hs-level-menu-page main a.menu-card,body.hs-level-menu-page main a.level,body.hs-level-menu-page main a.l{background:#fff;border:2px solid #222;border-radius:12px;box-shadow:0 4px #222;text-decoration:none;color:#222;min-height:75px;transition:background .12s,transform .12s,box-shadow .12s}
body.hs-level-menu-page main a.menu-card:hover,body.hs-level-menu-page main a.level:hover,body.hs-level-menu-page main a.l:hover{background:#fff7d2}
body.hs-level-menu-page main a.menu-card:active,body.hs-level-menu-page main a.level:active,body.hs-level-menu-page main a.l:active{transform:translateY(2px);box-shadow:0 2px #222}
body.hs-level-menu-page main a.l{display:flex;align-items:center;gap:14px;padding:12px}
body.hs-level-menu-page main a.l b{font-size:1.08rem;font-weight:850;flex:1}
body.hs-level-menu-page main a.l .n{font-size:.8rem;font-weight:750;flex:0 0 42px;text-align:center;align-self:stretch;display:flex;align-items:center;justify-content:center;background:#e9b824;border-radius:7px}
body.hs-level-menu-page main a.l:nth-child(8n+2) .n{background:#159447}body.hs-level-menu-page main a.l:nth-child(8n+3) .n{background:#109b9a}body.hs-level-menu-page main a.l:nth-child(8n+4) .n{background:#f57c16}body.hs-level-menu-page main a.l:nth-child(8n+5) .n{background:#f24791}body.hs-level-menu-page main a.l:nth-child(8n+6) .n{background:#8c45c7}body.hs-level-menu-page main a.l:nth-child(8n+7) .n{background:#e7a1b0}body.hs-level-menu-page main a.l:nth-child(8n) .n{background:#81c7d4}
@media(max-width:720px){body.hs-level-menu-page main .menu-grid,body.hs-level-menu-page main .levels,body.hs-level-menu-page main .list{grid-template-columns:1fr}}

/* R10 R1: unified application surfaces, not game art or controls. */
html:has(#hiscore-nav51){background:#f3efe6}
body:has(#hiscore-nav51):not(.hs-trophy-theme){background:#f3efe6}
#hiscore-nav51{isolation:isolate;flex-shrink:0}
body:has(#hiscore-nav51)>main{position:relative;z-index:0}
.hs-session-notice{position:relative!important;inset:auto!important;z-index:10!important;max-width:100%;box-sizing:border-box}
body.hs-menu-surface main a.game,body.hs-menu-surface main a.menu-card,body.hs-menu-surface main a.level-card,body.hs-menu-surface main a.level,body.hs-menu-surface main a.l,body.hs-menu-surface main a.module,body.hs-menu-surface main a.card,body.hs-menu-surface main .hs-level-menu__item{background:#fff;border:2px solid #222;border-radius:12px;box-shadow:0 4px #222;color:#222;text-decoration:none;transition:background .12s,transform .12s,box-shadow .12s}
body.hs-menu-surface main a.game:hover,body.hs-menu-surface main a.menu-card:hover,body.hs-menu-surface main a.level-card:hover,body.hs-menu-surface main a.level:hover,body.hs-menu-surface main a.l:hover,body.hs-menu-surface main a.module:hover,body.hs-menu-surface main a.card:hover{background:#fff7d2}
body.hs-menu-surface main a.game:active,body.hs-menu-surface main a.menu-card:active,body.hs-menu-surface main a.level-card:active,body.hs-menu-surface main a.level:active,body.hs-menu-surface main a.l:active{transform:translateY(2px);box-shadow:0 2px #222}
body.hs-menu-surface main a:focus-visible{outline:3px solid #e5ad39;outline-offset:5px}
body.hs-menu-surface main .menu-grid,body.hs-menu-surface main .hs-level-menu__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
body.hs-menu-surface main .game strong,body.hs-menu-surface main .menu-card strong{font-weight:850}
body.hs-menu-surface main .game span,body.hs-menu-surface main .menu-card small{font-size:.9rem}
/* Decorative Key Signatures sequence for existing numbered level markers. */
body.hs-menu-surface main .level-card:nth-child(8n+1),body.hs-menu-surface main a.l:nth-child(8n+1){--hs-level-accent:#e9b824}
body.hs-menu-surface main .level-card:nth-child(8n+2),body.hs-menu-surface main a.l:nth-child(8n+2){--hs-level-accent:#159447}
body.hs-menu-surface main .level-card:nth-child(8n+3),body.hs-menu-surface main a.l:nth-child(8n+3){--hs-level-accent:#109b9a}
body.hs-menu-surface main .level-card:nth-child(8n+4),body.hs-menu-surface main a.l:nth-child(8n+4){--hs-level-accent:#f57c16}
body.hs-menu-surface main .level-card:nth-child(8n+5),body.hs-menu-surface main a.l:nth-child(8n+5){--hs-level-accent:#f24791}
body.hs-menu-surface main .level-card:nth-child(8n+6),body.hs-menu-surface main a.l:nth-child(8n+6){--hs-level-accent:#8c45c7}
body.hs-menu-surface main .level-card:nth-child(8n+7),body.hs-menu-surface main a.l:nth-child(8n+7){--hs-level-accent:#e7a1b0}
body.hs-menu-surface main .level-card:nth-child(8n),body.hs-menu-surface main a.l:nth-child(8n){--hs-level-accent:#81c7d4}
body.hs-menu-surface main .level-card{border-left:10px solid var(--hs-level-accent,#e9b824)!important}
body.hs-menu-surface main a.l .n{background:var(--hs-level-accent,#e9b824)}
/* Homepage and category cards retain their existing semantics and destinations. */
body.hs-menu-surface.hs-home main .game{border-left:9px solid #244b56;padding:20px 22px}
body.hs-menu-surface.hs-category main .game{border-left:9px solid #e5ad39}
@media(max-width:720px){body.hs-menu-surface main .menu-grid,body.hs-menu-surface main .hs-level-menu__list{grid-template-columns:1fr}}
/* All menu tiers: master sections, category games, grade menus and level cards. */
body.hs-menu-surface.hs-home main [data-hs-catalogue-menu="sections"],body.hs-menu-surface.hs-category main [data-hs-catalogue-menu="theory-pitch"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch}
body.hs-menu-surface.hs-home main [data-hs-catalogue-menu="sections"]>.game,body.hs-menu-surface.hs-category main [data-hs-catalogue-menu="theory-pitch"]>.game{margin:0;min-width:0;height:100%}
body.hs-menu-surface main .level-card .description{font-size:1.06rem;font-weight:850}
body.hs-menu-surface main .level-card .hs-catalogue-id{font-size:.78rem;color:#777;font-weight:650}
/* Dashboard surfaces: petrol/cream shell without overriding form controls. */
body:has(#hiscore-nav51) main>.card{border-color:#244b56}
@media(max-width:720px){body.hs-menu-surface.hs-home main [data-hs-catalogue-menu="sections"],body.hs-menu-surface.hs-category main [data-hs-catalogue-menu="theory-pitch"]{grid-template-columns:1fr}}

/* R10 R2: semantic active nav and universal menu accents. */
#hiscore-nav51 .hs-nav-active{background:#e5ad39!important;color:#171717!important;box-shadow:0 1px #222!important;transform:translateY(2px);cursor:default}
body.hs-menu-surface main a.hs-accent-card:not(.soon),body.hs-menu-surface main .hs-level-menu__item.hs-accent-card{border-left:9px solid var(--hs-menu-accent,#e5ad39)!important}
body.hs-menu-surface main a.hs-accent-card .n,body.hs-menu-surface main a.hs-accent-card .number{background:var(--hs-menu-accent,#e5ad39)!important}
body.hs-menu-surface.hs-home main a.hs-accent-card.game,body.hs-menu-surface.hs-category main a.hs-accent-card.game{border-left-color:var(--hs-menu-accent,#e5ad39)!important}

/* R10 R3 consolidated navigation */
#hiscore-nav51{min-height:64px;padding:11px 16px 15px;gap:10px;font-size:14.3px}
#hiscore-nav51 a,#hiscore-nav51 button{min-height:37px;font-size:14.3px;padding:8px 13px}
#hiscore-nav51 .hs-nav-back{margin-right:auto;background:transparent;color:#fff;border-color:transparent;box-shadow:none;font-weight:850}
#hiscore-nav51 .hs-nav-logo{padding:3px 7px;background:#fff;min-width:86px}
#hiscore-nav51 .hs-nav-logo img{display:block;width:82px;height:35px;object-fit:contain}
#hiscore-nav51 .hs-nav-active{background:#e5ad39!important;box-shadow:0 3px #222!important;transform:none!important}
.hs-legacy-nav-duplicate{display:none!important}
body.hs-trophy-shared-nav>header{display:none!important}
body.hs-trophy-shared-nav main{background:#1d1d1b;min-height:300px}
/* Level descriptions lead, IDs remain supporting information. */
body.hs-menu-surface .level-card .level-details{display:flex;flex-direction:column-reverse;gap:5px}
body.hs-menu-surface .level-card .level-details .level-description{display:block!important;font-size:1.08rem!important;font-weight:850!important;color:#181818!important}
body.hs-menu-surface .level-card .level-details>b{font-size:.8rem!important;font-weight:650!important;color:#666!important}
@media(max-width:720px){#hiscore-nav51{padding:10px 8px 13px;gap:7px}#hiscore-nav51 a,#hiscore-nav51 button{font-size:12.5px;padding:7px 9px}#hiscore-nav51 .hs-nav-back{margin-right:0}#hiscore-nav51 .hs-nav-logo img{width:65px;height:29px}}

/* R10 R4: one stable navigation shell with three distinct zones. */
#hiscore-nav51{display:grid!important;grid-template-columns:minmax(110px,1fr) auto minmax(240px,1fr);align-items:center;gap:18px;justify-content:stretch}
#hiscore-nav51 .hs-nav-group{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap}
#hiscore-nav51 .hs-nav-left{justify-content:flex-start}
#hiscore-nav51 .hs-nav-middle{justify-content:center}
#hiscore-nav51 .hs-nav-right{justify-content:flex-end}
#hiscore-nav51 .hs-nav-separator{margin:0 6px}
#hiscore-nav51 .hs-nav-account{margin-left:8px}
body.hiscore-nav-grid-layout{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;min-height:100vh;padding:0!important}
body.hiscore-nav-grid-layout>#hiscore-nav51{flex:0 0 auto;align-self:stretch}
body.hiscore-nav-grid-layout>main{margin:auto!important;max-width:calc(100% - 32px)}
body.hiscore-nav-grid-layout>main:first-of-type{margin-top:auto!important}
@media(max-width:1100px){#hiscore-nav51{grid-template-columns:auto 1fr;gap:8px}#hiscore-nav51 .hs-nav-right{grid-column:1/-1;justify-content:center}#hiscore-nav51 .hs-nav-middle{justify-content:flex-end}}
@media(max-width:620px){#hiscore-nav51{grid-template-columns:1fr}#hiscore-nav51 .hs-nav-left,#hiscore-nav51 .hs-nav-middle,#hiscore-nav51 .hs-nav-right{grid-column:1;justify-content:center}#hiscore-nav51 .hs-nav-left{justify-content:flex-start}#hiscore-nav51 .hs-nav-separator{display:none}}

/* R10 R5: nav controls are isolated from specialist-game button rules. */
#hiscore-nav51 .hs-nav-group > a:not([hidden]),
#hiscore-nav51 .hs-nav-group > button:not([hidden]){
  box-sizing:border-box!important;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:14.3px!important;
  font-weight:900!important;
  line-height:1.25!important;
  min-height:40px!important;
  padding:8px 13px!important;
  text-transform:none!important;
  letter-spacing:normal!important;
  white-space:nowrap!important;
  flex:0 0 auto;
}
#hiscore-nav51 .hs-nav-group > .hs-nav-logo{padding:3px 7px!important}
#hiscore-nav51 .hs-nav-group > .hs-nav-back{padding:8px 0!important;min-height:40px!important}
#hiscore-nav51 .hs-nav-right > .hs-nav-account{margin-left:8px}
@media(max-width:720px){
 #hiscore-nav51 .hs-nav-group > a:not([hidden]),
 #hiscore-nav51 .hs-nav-group > button:not([hidden]){font-size:12.5px!important;padding:7px 9px!important;min-height:36px!important}
 #hiscore-nav51 .hs-nav-group > .hs-nav-logo{padding:3px 6px!important}
}
