/* Owner-selected crystal chrome. Additive presentation only; existing controls keep their behavior. */
@layer taplureGem;
@layer taplureGem {
 html[data-gem-ui] body :is(button,a,input).gs-gem-button[data-gem-kind] {
  --gem-top:#44445b;--gem-mid:#27283c;--gem-bottom:#171a2a;--gem-edge:#9ca3bf;--gem-glow:#9786c733;
 }
 html[data-gem-ui] body :is(button,a,input).gs-gem-button[data-gem-kind="lavender"],
 html[data-gem-ui] body :is(button,a,input).gs-gem-button:is([aria-selected="true"],[aria-pressed="true"],.active) {
  --gem-top:#9161c5;--gem-mid:#673996;--gem-bottom:#492574;--gem-edge:#d7b5ff;--gem-glow:#a763e34d;
 }
 html[data-gem-ui] body #mpAuthSubmit.gs-gem-button[data-gem-kind],
 html[data-gem-ui] body #mpAuthClose.gs-gem-button[data-gem-kind],
 html[data-gem-ui] body :is(button,a,input).gs-gem-button[data-gem-kind]:not(.correct,.incorrect,.success,.danger,[class*="bg-emerald-"],[class*="bg-green-"],[class*="bg-teal-"],[class*="bg-red-"],[class*="bg-rose-"]) {
  background-color:var(--gem-bottom)!important;
  background-image:linear-gradient(180deg,#ffffff6b 0%,#ffffff24 8%,#ffffff08 24%,#ffffff00 42%,#00000012 55%,#00000000 76%,#d8b7ff22 100%),radial-gradient(ellipse at 18% 0%,#f8eaff29,transparent 62%),linear-gradient(145deg,var(--gem-top),var(--gem-mid) 47%,var(--gem-bottom))!important;
  border:1px solid var(--gem-edge)!important;
  color:#fffaff!important;-webkit-text-fill-color:#fffaff!important;
  box-shadow:inset 0 1px 1px #ffffffa3,inset 1px 0 0 #ffffff38,inset -1px 0 1px #c9a9ff48,inset 0 -2px 2px #09061694,0 2px 0 #10101d9c,0 5px 13px #160c2d24,0 0 10px var(--gem-glow)!important;
  text-shadow:0 1px 2px #120d2666!important;
  backdrop-filter:blur(12px) saturate(1.15);-webkit-backdrop-filter:blur(12px) saturate(1.15);
  transition:box-shadow .18s ease,border-color .18s ease,filter .18s ease,transform .12s ease;
 }
 html[data-gem-ui] body .gs-gem-button[data-gem-kind]:is(:hover,:focus-visible):not(:disabled,[aria-disabled="true"]) {
  filter:brightness(1.08); /* Brighten the existing surface without adding another hover rim. */
 }
 html[data-gem-ui] body .gs-gem-button[data-gem-kind]:focus-visible{outline:3px solid #38bdd6!important;outline-offset:4px!important}
 html[data-gem-ui] body .gs-gem-button[data-gem-kind]:active:not(:disabled,[aria-disabled="true"]){transform:translateY(1px);filter:brightness(.97)}
 html[data-gem-ui] body .gs-gem-button[data-gem-kind]:disabled,html[data-gem-ui] body .gs-gem-button[data-gem-kind][aria-disabled="true"]{opacity:.55!important;filter:saturate(.55);cursor:not-allowed}
 html[data-gem-ui] body img[src*="/assets/taplure-icons/"]{object-fit:contain;filter:drop-shadow(0 1px 2px #25104736)}
 @media(prefers-reduced-motion:reduce){html[data-gem-ui] body .gs-gem-button[data-gem-kind]{transition:none!important}}
 @media(forced-colors:active){html[data-gem-ui] body .gs-gem-button[data-gem-kind]{background:ButtonFace!important;color:ButtonText!important;-webkit-text-fill-color:ButtonText!important;border:1px solid ButtonText!important;box-shadow:none!important;text-shadow:none!important;forced-color-adjust:auto}}
}

/* Owner correction: dark navigation, including the current page, is deep neutral charcoal. */
@layer taplureGem {
 html[data-gem-ui] body .app-shell[data-theme="dark"] #dashboard-sidebar .nav-item {
  --gem-top:#24272e;--gem-mid:#14161b;--gem-bottom:#0b0c10;--gem-edge:#555b66;--gem-glow:#00000000;
  background-color:#101216!important;
  background-image:linear-gradient(180deg,#ffffff2e 0%,#ffffff0a 16%,#ffffff00 35%,#00000020 64%,#ffffff06 100%),linear-gradient(150deg,#24272e,#14161b 44%,#0b0c10)!important;
  border-color:#555b66!important;
  color:#f5f5f7!important;-webkit-text-fill-color:#f5f5f7!important;
  box-shadow:inset 0 1px 1px #ffffff70,inset 1px 0 0 #ffffff16,inset 0 -2px 2px #00000099,0 2px 0 #07080ca6,0 5px 13px #00000038!important;
  text-shadow:0 1px 2px #00000066!important;
 }
 html[data-gem-ui] body .app-shell[data-theme="dark"] #dashboard-sidebar .nav-item:is(.active,[aria-current="page"]) {
  border-color:#b1b7c2!important;
  box-shadow:inset 3px 0 0 #b1b7c2,inset 0 1px 1px #ffffff70,inset 0 -2px 2px #00000099,0 2px 0 #07080ca6,0 5px 13px #00000038!important;
 }
 html[data-gem-ui] body .app-shell[data-theme="dark"] #dashboard-sidebar .nav-item:is(:hover,:focus-visible):not(:disabled,[aria-disabled="true"]) {
  border-color:#c0c6cf!important;filter:brightness(1.07);
  box-shadow:inset 0 1px 1px #ffffff8a,inset 0 -2px 2px #00000099,0 2px 0 #07080ca6,0 6px 16px #00000045!important;
 }
 @media(forced-colors:active){html[data-gem-ui] body .app-shell[data-theme="dark"] #dashboard-sidebar .nav-item{background:ButtonFace!important;color:ButtonText!important;-webkit-text-fill-color:ButtonText!important;border-color:ButtonText!important;box-shadow:none!important}}
}

/* Light navigation uses one white glass surface in every React navigation state. */
@layer taplureGem {
 html[data-gem-ui][data-acemblex-theme="light"] body .app-shell[data-theme="light"] #dashboard-sidebar .nav-item {
  --gem-top:#ffffff;--gem-mid:#ffffff;--gem-bottom:#ffffff;--gem-edge:#bba8d6;--gem-glow:#00000000;
  background-color:#fff!important;
  background-image:linear-gradient(155deg,#fff,#ffffffed)!important;
  color:#282139!important;-webkit-text-fill-color:#282139!important;text-shadow:none!important;
  border:1px solid #bba8d6!important;filter:none!important;
  box-shadow:inset 0 1px 1px #fff,0 2px 7px #49315d12!important;
 }
 html[data-gem-ui][data-acemblex-theme="light"] body .app-shell[data-theme="light"] #dashboard-sidebar .nav-item:is(.active,[aria-current="page"]) {
  border-color:#7846ae!important;box-shadow:inset 3px 0 0 #7846ae,inset 0 1px 1px #fff,0 2px 7px #49315d12!important;
 }
 html[data-gem-ui][data-acemblex-theme="light"] body .app-shell[data-theme="light"] #dashboard-sidebar .nav-item:is(:hover,:focus-visible,:active) {
  background-color:#fff!important;background-image:linear-gradient(155deg,#fff,#ffffffed)!important;
  border-color:#7846ae!important;filter:none!important;
 }
 html[data-gem-ui][data-acemblex-theme="light"] body .app-shell[data-theme="light"] #dashboard-sidebar .nav-item:focus-visible {outline:3px solid #7846ae!important;outline-offset:3px!important}
 @media(forced-colors:active){html[data-gem-ui][data-acemblex-theme="light"] body .app-shell[data-theme="light"] #dashboard-sidebar .nav-item{background:ButtonFace!important;color:ButtonText!important;-webkit-text-fill-color:ButtonText!important;box-shadow:none!important;border-color:ButtonText!important}}
}

/* Retained logo and account controls, without the duplicate black-strip site tabs. */
html body header nav.mep-simple-header{display:flex!important;flex-wrap:wrap!important;gap:12px!important;align-items:center!important;justify-content:flex-start!important;padding:10px 20px!important;max-width:1200px!important}
html body .mep-simple-header .mep-old-site-tabs,html body .mep-simple-header #menuBtn,html body header #mobileMenu[hidden]{display:none!important}
html body .mep-simple-header .mep-header-account{display:flex!important;align-items:center!important;gap:10px!important;margin-left:auto!important}
html body .mep-simple-header .taplure-brand-link{flex:0 1 230px!important;min-width:130px!important;max-width:230px!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
html body .mep-header-logo{display:block!important;width:100%!important;height:70px!important}
html body .mep-header-logo img{width:100%!important;height:100%!important;object-fit:contain!important}
html body .mep-logo-light{display:none!important}
html.acemblex-light body .mep-logo-dark{display:none!important}
html.acemblex-light body .mep-logo-light{display:block!important}
html body .mep-simple-header .study-games-home{display:inline-flex!important;align-items:center!important;min-height:44px!important;padding:8px 14px!important;position:static!important;font-size:15px!important}
html body #acemblex-user-btn{min-height:44px!important;max-width:100%!important}
html body #acemblex-user-btn>span:nth-child(2){max-width:190px!important}
html body #acemblex-account-panel{max-width:calc(100vw - 32px)!important}
html body #acemblex-user-btn[aria-expanded="true"]+#acemblex-account-panel{visibility:visible!important;opacity:1!important}
@media(max-width:600px){
 html body header nav.mep-simple-header{padding:8px 12px!important;gap:6px!important}
 html body .mep-simple-header .taplure-brand-link{flex-basis:170px!important;max-width:170px!important}
 html body .mep-header-logo{height:54px!important}
 html body .mep-simple-header .mep-header-account{width:100%!important;justify-content:flex-end!important;flex-wrap:wrap!important}
 html body .mep-simple-header .study-games-home{margin-left:auto!important}
}

html body .mep-simple-header .study-games-home,html body .mep-simple-header #acemblex-user-btn,html body .mep-simple-header #acemblex-user-btn>span:nth-child(2){color:#eee8fa!important;-webkit-text-fill-color:#eee8fa!important}
html.acemblex-light body .mep-simple-header .study-games-home,html.acemblex-light body .mep-simple-header #acemblex-user-btn,html.acemblex-light body .mep-simple-header #acemblex-user-btn>span:nth-child(2){color:#302443!important;-webkit-text-fill-color:#302443!important}
html body #acemblex-account-panel{background:#fff!important;color:#302443!important;-webkit-text-fill-color:#302443!important}
html body #acemblex-account-panel a,html body #acemblex-account-panel button{color:#302443!important;-webkit-text-fill-color:#302443!important;min-height:44px!important}

html body .mep-simple-header #acemblex-user-btn{background:transparent!important;background-image:none!important;box-shadow:none!important;border:1px solid #9484ad80!important;border-radius:12px!important;padding:6px 10px!important}
@media(max-width:600px){html body .mep-simple-header #acemblex-user-btn>span:nth-child(2){max-width:130px!important;white-space:normal!important;font-size:14px!important;line-height:1.25!important}html body .mep-simple-header .mep-header-account{gap:6px!important}html body .mep-simple-header #streakBadge{display:none!important}}
@media(max-width:600px){html body .mep-simple-header .theme-switch-control{box-sizing:border-box!important;width:56px!important;min-width:56px!important;padding:0!important}html body .mep-simple-header .theme-switch-control>svg{display:none!important}}
@media(max-width:600px){html body .mep-simple-header #acemblex-user-btn{box-sizing:border-box!important;width:180px!important;gap:6px!important}html body .mep-simple-header #acemblex-user-btn>span:nth-child(2){max-width:98px!important;white-space:normal!important}}

/* Painted wood keeps its own shape; generic glass must not outline a second box. */
@layer taplureGem {
 html:root:root:root:root body #gameContent .af-board .af-control:not(.ae-control,.af-cell):is(:hover,:focus-visible){border-radius:999px!important;box-shadow:none!important;outline:none!important}
}

/* One light on the painted wood, with no rectangular focus/hover overlay. */
@layer taplureGem {
 html:root:root:root:root body #gameContent .af-board.af-contraindication .af-control:is(:hover,:focus-visible):not(:disabled)::before{content:""!important;display:block!important;position:absolute!important;inset:0!important;pointer-events:none!important;border:0!important;border-radius:999px!important;box-shadow:none!important;background:transparent!important;backdrop-filter:brightness(1.13)!important;-webkit-backdrop-filter:brightness(1.13)!important;z-index:-1!important}
 html:root:root:root:root body #gameContent :is(.kq-control,.ex-hit,.approved-hit):is(:hover,:focus-visible){outline:none!important;box-shadow:none!important}
 html:root:root:root:root body #gameContent .kq-control:is(:hover,:focus-visible):not(:disabled)>.kq-skin{filter:brightness(1.17) saturate(1.08)!important}
 html:root:root:root:root body #gameContent :is(.kq-control,.ex-hit,.approved-hit):focus-visible{text-decoration:underline!important}
}
