/*
  pw-shell.css — the signed-in site nav (js/pw-shell.js, 2026-11-18, the owner's
  call): a fixed 220 px sidebar on desktop, a bottom tab bar at <=640 px.

  Everything keys on body.pw-shell-on, which pw-shell.js sets ONLY while the
  visitor is signed in (the nav-auth hint first, then PWAuth.onChange). A
  signed-out visitor never gets the class, so every rule here is inert for them
  and the page keeps its own top nav exactly as before.

  Tokens are home.html's, copied by hand (each page owns its :root, and the
  locker / season-pass pages run on #000, so nothing here reads a page var).
*/
.pw-shell{display:none;font-family:'Inter',-apple-system,BlinkMacSystemFont,'Helvetica Neue',sans-serif;-webkit-font-smoothing:antialiased;}
body.pw-shell-on .pw-shell{display:flex;}
.pw-shell ul{list-style:none;margin:0;padding:0;}
.pw-shell a{text-decoration:none;color:rgba(255,255,255,.62);}
.pw-shell-ic{width:22px;height:22px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.pw-shell-item[hidden]{display:none!important;}
/* An item with a phone label (js/pw-shell.js `short`: Sponsorship -> Sponsor)
   shows its long label in the sidebar and its short one on the tab bar. */
.pw-shell-s{display:none;}

/* ---- desktop: the sidebar ---- */
@media (min-width:641px){
  .pw-shell{position:fixed;top:0;left:0;bottom:0;width:220px;z-index:400;flex-direction:column;gap:22px;
    padding:22px 14px;background:#050506;border-right:1px solid rgba(255,255,255,.10);overflow-y:auto;}
  .pw-shell-brand{display:block;padding:0 12px;color:#fff!important;font-family:'Anton',sans-serif;font-size:26px;letter-spacing:.5px;line-height:1;}
  .pw-shell-brand .wiki{color:#ff6ec7;}
  .pw-shell ul{display:flex;flex-direction:column;gap:2px;}
  .pw-shell-item a{display:flex;align-items:center;gap:14px;padding:11px 12px;border-radius:12px;font-size:15px;font-weight:600;transition:background .15s,color .15s;}
  .pw-shell-item a:hover{background:rgba(255,255,255,.05);color:#fff;}
  .pw-shell-item.is-on a{color:#ff6ec7;background:rgba(255,110,199,.08);font-weight:800;}
  /* The page moves right by the sidebar's width; its own max-width wrappers
     stay centred in what is left. */
  body.pw-shell-on{padding-left:220px;}
  /* The sidebar carries the wordmark, so the top nav drops its copy; the
     nav-right avatar slot (nav-auth) stays where it was. */
  body.pw-shell-on nav.top .logo{display:none;}
  body.pw-shell-on nav.top .nav-right{margin-left:auto;}
}

/* ---- phone: the bottom tab bar ---- */
@media (max-width:640px){
  .pw-shell{position:fixed;left:0;right:0;bottom:0;z-index:400;align-items:stretch;
    padding:0 4px env(safe-area-inset-bottom,0px);background:rgba(5,5,6,.96);
    -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-top:1px solid rgba(255,255,255,.10);}
  .pw-shell-brand{display:none;}
  .pw-shell ul{display:flex;width:100%;}
  .pw-shell-item{flex:1 1 0;min-width:0;}
  .pw-shell-item a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:58px;
    font-size:10.5px;font-weight:600;letter-spacing:.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .pw-shell-item.is-on a{color:#ff6ec7;font-weight:800;}
  .pw-shell-item .pw-shell-l:not(:only-child){display:none;}
  .pw-shell-s{display:inline;}
  /* A sponsor's sixth tab (2026-11-24): a hair smaller so "Highlights" still fits. */
  .pw-shell.pw-shell-six .pw-shell-item a{font-size:10px;letter-spacing:0;}
  body.pw-shell-on{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px));}
  /* js/nav-search.js's fixed phone search bar sits where the tab bar goes:
     while the shell shows, the tab bar wins and Explore is the way to search
     (since 2026-11-18 nav-search keeps its DESKTOP top-nav box on shell pages,
     so this rule is the phone half). The 78 px padding it adds to body loses to
     the rule above: body.pw-shell-on is more specific. */
  body.pw-shell-on .pw-navsearch{display:none!important;}
  /* js/app-prompt.js's "get the app" bar is pinned to bottom:0 above everything
     (z 900): lift it onto the tab bar, and take it out entirely while it is
     slid away, or its hidden position would sit on top of the tabs. */
  body.pw-shell-on #pw-appbar{bottom:calc(58px + env(safe-area-inset-bottom,0px))!important;padding-bottom:0;}
  body.pw-shell-on #pw-appbar:not(.show){visibility:hidden;}
  /* js/highlights.js's save toast: above the tabs, not on them. */
  body.pw-shell-on .hl-toast{bottom:calc(76px + env(safe-area-inset-bottom,0px));}
  /* Any page's own bottom-pinned toast (2026-11-18; player.html, academy.html
     build theirs with inline styles, hence !important): add class pw-shell-lift. */
  body.pw-shell-on .pw-shell-lift{bottom:calc(76px + env(safe-area-inset-bottom,0px))!important;}
}
