/* G&C REV10W — consistent desktop scrollbar branding across pages, drawers, lists and edit modals. */
@media (hover:hover) and (pointer:fine){
  html{scrollbar-color:#6fdbec #071820;scrollbar-width:thin}
  body *{scrollbar-color:#6fdbec #071820}
  html::-webkit-scrollbar,body::-webkit-scrollbar,body *::-webkit-scrollbar{width:10px;height:10px}
  html::-webkit-scrollbar-track,body::-webkit-scrollbar-track,body *::-webkit-scrollbar-track{background:linear-gradient(180deg,rgba(5,18,24,.94),rgba(9,18,29,.96));border-radius:999px}
  html::-webkit-scrollbar-thumb,body::-webkit-scrollbar-thumb,body *::-webkit-scrollbar-thumb{min-height:34px;border:2px solid rgba(5,18,24,.94);border-radius:999px;background:linear-gradient(180deg,#64dfe9 0%,#65cddd 48%,#8b76eb 100%);background-clip:padding-box;box-shadow:inset 0 0 0 1px rgba(217,253,255,.13)}
  html::-webkit-scrollbar-thumb:hover,body::-webkit-scrollbar-thumb:hover,body *::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#79edf3 0%,#70dbe6 45%,#9a85f5 100%);background-clip:padding-box}
  html::-webkit-scrollbar-corner,body::-webkit-scrollbar-corner,body *::-webkit-scrollbar-corner{background:#071820}
}


/* REV10W FIX4 — stronger G&C brand mark without increasing top-bar footprint much. */
.gcHomeBrandLogo{
  width:48px!important;
  height:48px!important;
  padding:3px!important;
}
.gcProfileBrandLogo{
  width:44px!important;
  height:44px!important;
  flex-basis:44px!important;
  padding:3px!important;
}
@media(max-width:620px){
  .gcHomeBrandLogo{
    width:42px!important;
    height:42px!important;
    padding:2px!important;
  }
  .gcProfileBrandLogo{
    width:40px!important;
    height:40px!important;
    flex-basis:40px!important;
    padding:2px!important;
  }
}

/* REV10W FIX5 — standalone PWA top-touch safety + premium utility controls.
 * Some iOS/Android Home Screen launches can report safe-area-inset-top as 0
 * while the OS status area still overlays the visual viewport. These route
 * shells are intentionally clamped after every other theme/layout stylesheet
 * so Back controls, headings and first form controls remain tappable.
 */
@media (display-mode:standalone) and (max-width:900px){
  :root{--gc-fix5-touch-top:max(58px,calc(env(safe-area-inset-top,0px) + 14px))}

  body[data-gc-page="browsegames"] .browseGamesContainer,
  body[data-gc-page="game_reviews"] .gameReviewsContainer{
    padding-top:var(--gc-fix5-touch-top)!important;
    scroll-padding-top:var(--gc-fix5-touch-top)!important;
  }

  /* All Admin tools (not the main ?page=admin dashboard) use one of these
   * top-level shells. Override rather than add padding so mobile density stays
   * compact while the first interactive row clears the status/Dynamic Island.
   */
  body[data-gc-page^="admin_"] > main,
  body[data-gc-page^="admin_"] > .container,
  body[data-gc-page^="admin_"] > [class*="Container"]{
    padding-top:var(--gc-fix5-touch-top)!important;
  }

  body[data-gc-page^="admin_"]{
    scroll-padding-top:var(--gc-fix5-touch-top)!important;
  }
}

/* iOS exposes navigator.standalone even on builds where the CSS display-mode
 * media query can be late during initial paint. gc-pwa.js adds this class as a
 * second authoritative signal; keep the exact same geometry under it. */
@media (max-width:900px){
  html.gc-pwa-standalone body[data-gc-page="browsegames"] .browseGamesContainer,
  html.gc-pwa-standalone body[data-gc-page="game_reviews"] .gameReviewsContainer,
  body.gc-pwa-standalone[data-gc-page="browsegames"] .browseGamesContainer,
  body.gc-pwa-standalone[data-gc-page="game_reviews"] .gameReviewsContainer{
    padding-top:max(58px,calc(env(safe-area-inset-top,0px) + 14px))!important;
  }
  html.gc-pwa-standalone body[data-gc-page^="admin_"] > main,
  html.gc-pwa-standalone body[data-gc-page^="admin_"] > .container,
  html.gc-pwa-standalone body[data-gc-page^="admin_"] > [class*="Container"],
  body.gc-pwa-standalone[data-gc-page^="admin_"] > main,
  body.gc-pwa-standalone[data-gc-page^="admin_"] > .container,
  body.gc-pwa-standalone[data-gc-page^="admin_"] > [class*="Container"]{
    padding-top:max(58px,calc(env(safe-area-inset-top,0px) + 14px))!important;
  }
}

/* Browse Games + Admin Portal go-to-top control. It deliberately lives above
 * the floating navigation on phones and outside the centre dock on desktop. */
.gcRev10wGoTop{
  position:fixed;
  right:max(18px,calc(env(safe-area-inset-right,0px) + 14px));
  bottom:max(24px,calc(env(safe-area-inset-bottom,0px) + 18px));
  z-index:2147482990;
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid rgba(94,229,240,.38);
  border-radius:19px;
  background:linear-gradient(145deg,rgba(20,73,84,.97),rgba(12,35,48,.98) 56%,rgba(39,31,79,.96));
  color:#7be8f1;
  box-shadow:0 18px 42px rgba(0,0,0,.42),0 0 28px rgba(69,218,231,.12),0 0 22px rgba(137,106,244,.08),inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transform:translateY(16px) scale(.88);
  transition:opacity .18s ease,transform .22s cubic-bezier(.2,.8,.2,1),border-color .18s ease,box-shadow .18s ease;
  -webkit-tap-highlight-color:transparent;
}
.gcRev10wGoTop::before{
  content:"";
  position:absolute;
  inset:9px;
  border:1px solid rgba(110,235,243,.12);
  border-radius:12px;
  background:linear-gradient(145deg,rgba(84,225,236,.07),rgba(145,112,255,.055));
  pointer-events:none;
}
.gcRev10wGoTop.isVisible{opacity:1;pointer-events:auto;transform:none}
.gcRev10wGoTop svg{position:relative;z-index:1;width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2.15;stroke-linecap:round;stroke-linejoin:round}
.gcRev10wGoTop:hover{border-color:rgba(112,238,247,.62);box-shadow:0 20px 46px rgba(0,0,0,.44),0 0 34px rgba(69,218,231,.18),0 0 28px rgba(137,106,244,.11),inset 0 1px 0 rgba(255,255,255,.1)}
.gcRev10wGoTop:active{transform:translateY(1px) scale(.92)}
.gcRev10wGoTop:focus-visible{outline:2px solid rgba(115,235,244,.82);outline-offset:3px}
@media(max-width:900px){
  .gcRev10wGoTop{
    right:max(14px,calc(env(safe-area-inset-right,0px) + 10px));
    bottom:calc(104px + env(safe-area-inset-bottom,0px));
    width:50px;
    height:50px;
    border-radius:17px;
  }
  .gcRev10wGoTop svg{width:23px;height:23px}
}
@media(max-width:360px){
  .gcRev10wGoTop{right:max(10px,calc(env(safe-area-inset-right,0px) + 8px));width:47px;height:47px}
}
@media(prefers-reduced-motion:reduce){.gcRev10wGoTop{transition:none!important}.gcRev10wGoTop{backdrop-filter:none;-webkit-backdrop-filter:none}}

/* REV10W FIX8 — subtle shared G&C avatar-frame signature on Member Profiles.
 * Filter glow is independent of the existing level-specific box-shadow
 * animations, so LV25/LV50 treatments remain intact. */
body[data-gc-page="profile"] .gcProfileAvatarFrame{
  filter:
    drop-shadow(0 0 7px rgba(76,222,235,.18))
    drop-shadow(0 0 11px rgba(139,106,246,.12));
}
@media(max-width:620px){
  body[data-gc-page="profile"] .gcProfileAvatarFrame{
    filter:
      drop-shadow(0 0 6px rgba(76,222,235,.17))
      drop-shadow(0 0 9px rgba(139,106,246,.11));
  }
}
@media(prefers-reduced-motion:reduce){
  body[data-gc-page="profile"] .gcProfileAvatarFrame{
    filter:drop-shadow(0 0 5px rgba(76,222,235,.14)) drop-shadow(0 0 7px rgba(139,106,246,.09));
  }
}
