/* v68.9.184-nav Mockup B nav + first-paint dock clearance and phone wrap/tap fixes.
   Loaded by assets/nav.js. Overrides inlined page nav CSS. Prop Doc stays parked. */

/* ---- Chrome tap targets >= 40px ---- */
nav a.logo{min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}
/* v68.9.187-dockfix: restore v39acct 36px / 16px glyph. v68.9.184-nav had forced 40px. */
nav .acct{width:36px!important;height:36px!important;min-width:36px;min-height:36px;max-width:36px!important;padding:0!important;box-sizing:border-box;border-radius:50%!important;justify-content:center!important;gap:0!important;overflow:hidden}
nav .acct .al{display:none!important}
nav .acct svg{width:16px!important;height:16px!important;vertical-align:0!important}
nav .psb,nav .psw,nav #psq,nav .psb input{min-height:40px;box-sizing:border-box}
@media(max-width:520px){
  nav .psb,nav .psw{min-width:40px;min-height:40px}
  nav #psq{min-width:40px}
}

/* ---- Phone (<=520): top bar is logo, Search, star, account. Menu moves to the dock. ---- */
@media(max-width:520px){
  nav .pp-rspacer{display:none!important}
  nav .ptabs{display:none!important}
  nav > .wrap > button.mnb, nav .wrap > .mnb{display:none!important}
  nav .acct{display:inline-flex!important}
  nav .acct.fav{display:inline-flex!important;margin-left:auto!important;margin-right:8px!important}
  nav .acct.fav + .acct{display:inline-flex!important;margin-left:0!important}
  nav .wrap{gap:8px!important;padding-left:12px!important;padding-right:12px!important;height:62px}
}

/* Site dock: same look as live #ppbn (compact centered cluster of individual
   rounded buttons, shrink-wrapped, not a full-width floating pill). Items are
   Props · Teams · Sim · Menu (Menu far right). top/height reset beats nav{top:0}. */
#ppdn{display:none}
/* Match live `html.psfull .ppbn{display:none}`: hide the site dock while phone Search is full-screen.
   Otherwise `html.psfull nav{transform:none!important}` strips translateX(-50%) and Menu clips off the right edge. */
html.psfull #ppdn{display:none!important}
@media(max-width:520px){
  #ppdn{display:flex;position:fixed;left:50%;right:auto;top:auto!important;height:auto!important;bottom:calc(12px + env(safe-area-inset-bottom, 0px));transform:translateX(-50%);z-index:80;gap:0;padding:5px;border-radius:999px;background:rgba(17,19,23,.92);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid #2A2D35;box-shadow:0 10px 30px rgba(0,0,0,.5);align-items:center;justify-content:center;max-width:calc(100vw - 16px);width:auto;min-height:0!important;box-sizing:border-box;overflow:visible;flex-wrap:nowrap}
  #ppdn a,#ppdn button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:55px;flex:1 1 0;padding:6px 7px;border-radius:999px;margin:0;color:#9AA0AA;background:transparent;border:0;text-decoration:none;font:700 10px Sora,system-ui,sans-serif;cursor:pointer;box-sizing:border-box;overflow:visible;white-space:nowrap;min-height:40px;-webkit-appearance:none;appearance:none}
  #ppdn a.on,#ppdn button.on{background:#1D4ED8;color:#fff}
  #ppdn svg{width:20px;height:20px;flex:none}
  #ppdn a span,#ppdn button span,#ppdn .lbl{overflow:visible;white-space:nowrap;max-width:none}
  body.hasdn,html.hasdn body{padding-bottom:calc(168px + env(safe-area-inset-bottom, 0px))!important;scroll-padding-bottom:calc(168px + env(safe-area-inset-bottom, 0px))}
  /* Phone menu is a sheet above the dock, not a top-bar dropdown */
  #mnm.mnm{display:block!important;position:fixed!important;left:12px!important;right:12px!important;top:auto!important;bottom:calc(82px + env(safe-area-inset-bottom, 0px))!important;z-index:90;width:auto!important;min-width:0!important;max-width:none!important;max-height:min(70vh, calc(100vh - 150px));overflow:auto;background:#14161B;border:1px solid #2A2D35;border-radius:12px;padding:6px;box-shadow:0 12px 32px rgba(0,0,0,.5)}
  #mnm.mnm[hidden]{display:none!important}
  #mnm a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;min-height:44px;box-sizing:border-box;border-radius:8px;color:#E6E8EC;text-decoration:none;font-size:15px;font-weight:600}
  #mnm a:hover,#mnm a:focus{background:#1E2027;outline:none}
  #mnm a.on{color:#fff;background:rgba(47,123,255,.16)}
  #mnm hr{border:0;border-top:1px solid #2A2D35;margin:6px 4px}
  .mnm-scrim{display:block;position:fixed;inset:0;z-index:85;background:rgba(0,0,0,.5);border:0;padding:0;margin:0}
  .mnm-scrim[hidden]{display:none!important}
}

/* ---- Desktop (>=521): Props / Teams / Sim centered; tools in Menu after the icons ---- */
@media(min-width:521px){
  nav .wrap{position:relative;justify-content:flex-start}
  nav .ptabs{position:absolute;left:50%;transform:translateX(-50%);margin-left:0!important;flex-shrink:0!important;z-index:1;pointer-events:auto}
  /* Right cluster spacer is static (not .psb). Opening Search cannot collapse Menu onto the tabs. */
  nav .pp-rspacer{display:block;margin-left:auto!important;flex:1 1 auto;min-width:0;width:0;height:0;overflow:hidden;pointer-events:none}
  nav .psb{margin-left:8px!important;height:40px;z-index:2;position:relative}
  nav .psb:not(:focus-within){flex:0 0 40px!important;width:40px!important;min-width:40px!important;max-width:40px!important}
  nav .psb:focus-within{flex:0 0 auto!important;width:min(340px,calc(100% - 24px))!important;min-width:200px!important;max-width:min(340px,calc(100% - 24px))!important;z-index:70}
  nav .psb input{height:40px;min-height:40px}
  nav .psb:focus-within input{padding:0 12px;color:#fff;cursor:text}
  nav .acct.fav{margin-left:8px!important;z-index:2;position:relative}
  nav .acct{z-index:2;position:relative}
  /* width:auto !important beats the site-wide `button{width:100%}` rule that was stretching Menu across the header. */
  nav .wrap > button.mnb, nav .mnb{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;height:40px;min-height:40px;min-width:40px;width:auto!important;max-width:max-content;flex:0 0 auto!important;padding:0 13px;margin:0 0 0 8px!important;border:1px solid var(--line,#1E2026);border-radius:10px;background:#0E0F12;color:#E6E8EC;font:600 14px Sora,system-ui,sans-serif;cursor:pointer;box-sizing:border-box;position:relative;z-index:2;align-self:center}
  nav .mnb svg{width:18px;height:18px}
  #mnm.mnm{display:block!important;position:fixed!important;right:14px;top:80px;left:auto!important;bottom:auto!important;z-index:1000;min-width:232px;max-width:calc(100vw - 28px);width:auto!important;background:#14161B;border:1px solid #2A2D35;border-radius:12px;padding:6px;box-shadow:0 12px 32px rgba(0,0,0,.5);box-sizing:border-box}
  #mnm.mnm[hidden]{display:none!important}
  #mnm a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;min-height:44px;box-sizing:border-box;border-radius:8px;color:#E6E8EC;text-decoration:none;font-size:15px;font-weight:600}
  #mnm a:hover,#mnm a:focus{background:#1E2027;outline:none}
  #mnm a.on{color:#fff;background:rgba(47,123,255,.16)}
  #mnm hr{border:0;border-top:1px solid #2A2D35;margin:6px 4px}
  .mnm-scrim{display:none!important}
  /* Hide leftover top-level page links that now live in Menu */
  nav .ptabs a[href="/plans"],
  nav .ptabs a[href="/convert"],
  nav .ptabs a[href="/model-results"],
  nav .ptabs a[data-flag="model-results"]{display:none!important}
}

/* ---- In-page Props / Outliers / Markets tabs (un-hide #plviews on phone) ---- */
@media(max-width:760px){
  #plviews{display:inline-flex!important;flex-wrap:wrap;gap:4px;margin:4px 0 8px}
  #plviews button,#plviews a{min-height:40px;padding:8px 12px;box-sizing:border-box}
}

/* ---- M1: compact GAME / SORT / PERIOD onto one row so they sit above the dock at first paint ---- */
@media(max-width:760px){
  #plctl .plctls{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:end;margin:8px 0 12px;padding-right:0}
  #plctl .plctls .plseg{grid-column:1 / -1}
  #plctl .plctls .plf:last-child{grid-column:1 / -1} /* Show as */
  #plctl,#plctl .plf{padding-right:0!important}
  .pltier{padding-right:12px!important}
}

/* ---- M4: wrap league chips; keep Coming soon wording; do not hide pills ---- */
#sports.gsp,.gsp.chipset,#sports{
  flex-wrap:wrap!important;
  overflow:visible!important;
  overflow-x:visible!important;
}
#sports .csoon,#sports .csoon small{white-space:nowrap}

/* Player prop-type chips: wrap instead of clipping the last tab */
#pvtabs,.pvtabs{
  display:flex;
  flex-wrap:wrap!important;
  overflow:visible!important;
  overflow-x:visible!important;
  row-gap:6px;
  gap:6px;
}

/* Team Top performers: wrap so cards and figures are not clipped or trapped under the dock */
@media(max-width:520px){
  .tmcc{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-bottom:8px}
}

/* ---- L2: props-row star cell no longer self-overflows by 4px ---- */
.plr .c.st,.c.st,.star{
  overflow:hidden;
  box-sizing:border-box;
  width:30px;
  height:30px;
  min-width:30px;
  max-width:30px;
}

/* ---- LOW 2: phone search results clear the site dock (do not change the dock) ---- */
@media(max-width:520px){
  body.hasdn .psr,html.hasdn .psr,.hasdn .psr{
    max-height:calc(100vh - 58px - 108px - env(safe-area-inset-bottom, 0px))!important;
  }
}

/* v68.9.185-gap: leftover section top padding was sized as cover / old
   header clearance, but the top bar is position:sticky and already in
   document flow (~62px phone, ~75px desktop). That stacked .cv's 56px
   (convert 64px, plans-page 36px, .pmr 32–40px, plus .soonp margin 40px
   and .cv h1 margin 14px) as a dead band under the bar on every width.
   Tighten padding-top only (section.cv, not bare .cv — sim.html uses
   <span class="cv"> as a player-card chevron). Do not change the nav, dock, or desktop tabs. */
section.cv,
section.tk{
  padding-top:16px!important;
}
section.cv .soonp{
  margin-top:0!important;
}
section.cv h1.pgh,
section.cv h1.tlh,
section.cv .tlh,
section.cv #pgh{
  margin-top:0!important;
}
/* model-results uses <main class="pmr">, not .cv */
main.pmr,
.pmr{
  padding-top:16px!important;
}
/* Keep in-page anchors from sliding under the sticky top bar */
html{
  scroll-padding-top:84px;
}
@media(max-width:520px){
  html{scroll-padding-top:70px}
}

/* v68.9.186-dock (Tarrin t711u, Nov 29 11:33 PM MT: phone dock "completely inoperable").
   Cause: the beta-only Demo view bar (#ppdemo, built by auth.js when ?demo= or /demo is used,
   kept for the tab in sessionStorage) is position:fixed; bottom:12px; centered; z-index:9999,
   285x37 on phone. It sat exactly on top of the site dock (#ppdn, bottom:12px, z-index:80, 232x58)
   and took every tap: Props hit its "Demo view" label, Teams/Sim/Menu hit Free/Pro/Prestige
   (reloading with ?demo=free|pro|prestige). Fix: on phone, lift the demo bar above the dock (left-aligned so it
   clears the Props filters button) and keep it under the Menu scrim (85) and sheet (90). The dock itself is not changed. */
@media(max-width:520px){
  body.hasdn #ppdemo{bottom:calc(82px + env(safe-area-inset-bottom, 0px))!important;left:8px!important;transform:none!important;z-index:84!important;max-width:calc(100vw - 16px);box-sizing:border-box}
  body.hasdn:has(> #ppdemo){padding-bottom:calc(150px + env(safe-area-inset-bottom, 0px))!important}
}
/* Narrow phones (<=360): compact the demo bar so it also clears the Props filters button (#ppfab, right:14px). */
@media(max-width:360px){
  body.hasdn #ppdemo{font-size:11px!important;padding:3px 3px 3px 9px!important;gap:1px!important}
  body.hasdn #ppdemo a{padding:6px 7px!important}
  body.hasdn #ppdemo a.x{padding:6px 6px!important}
}


/* v68.9.187-dockfix (Tarrin t803u): keep the dock looking the same; fix tap lag and the
   blue flash behind the dock when Menu is tapped.

   Blue flash cause: the menu scrim is a <button class="mnm-scrim"> covering the viewport
   (nav.js). Pages set `button{background:#2A70EE}` and `button:hover{background:#1F6AF0}`
   (games.html and the other shells). `.mnm-scrim` (0,1,0) loses to `button:hover` (0,1,1),
   so on sticky-hover / the tap that opens the menu the full-screen scrim paints primary
   blue, then clears when :hover drops.

   Tap lag cause: #ppdn links/buttons have no `touch-action: manipulation` (mobile 300ms
   click delay), no `-webkit-tap-highlight-color: transparent`, no :active/press style, and
   Menu only listens for `click` (not pointerdown). Opening the menu also waits on that
   delayed click, then the blue hover paints. Dock item navigations are full page loads
   (SW network-first on navigate) with no instant pressed state, so taps feel dead. */

#ppdn,#ppdn a,#ppdn button,.mnm-scrim,#mnm{
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
#ppdn a,#ppdn button{transition:none}
#ppdn a:active,#ppdn button:active,#ppdn a.press,#ppdn button.press{background:#1D4ED8;color:#fff}
#ppdn button,#ppdn button:hover,#ppdn button:active,#ppdn button:focus{
  background:transparent;color:#9AA0AA;width:auto;margin:0;padding:6px 7px;box-shadow:none;font:700 10px Sora,system-ui,sans-serif
}
#ppdn button.on,#ppdn button:active,#ppdn button.press,#ppdn a.on:active{background:#1D4ED8;color:#fff}

/* Scrim must never inherit the site-wide primary button (blue, width 100%, 14px padding). */
.mnm-scrim,.mnm-scrim:hover,.mnm-scrim:active,.mnm-scrim:focus,.mnm-scrim:focus-visible{
  background:rgba(0,0,0,.5)!important;
  width:auto!important;max-width:none!important;height:auto!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  color:transparent!important;box-shadow:none!important;font-size:0!important;
  -webkit-appearance:none;appearance:none;
  -webkit-tap-highlight-color:transparent!important;
  outline:none!important;
}

/* t793u: filter-sheet close (X) must always stay visible.
   Root cause: on phone .plfp used width:100vw (can clip the top-right Close control),
   .fptop was not sticky, and .fpx could shrink. */
.plfp{z-index:200!important;box-sizing:border-box!important;max-width:100%!important;overflow:hidden}
.plfpbd{z-index:199!important}
/* t819u: phone filter sheet is sized to the visual viewport (JS in nav.js)
   so the header and Close X stay on screen with the keyboard up or down.
   dvh is the CSS fallback when visualViewport is missing. */
@media(max-width:700px){
  .plfp{width:100%!important;max-width:100%!important;left:0!important;right:0!important;top:0;bottom:auto;height:100vh;height:100dvh;max-height:100vh;max-height:100dvh;padding-bottom:env(safe-area-inset-bottom, 0px);display:flex!important;flex-direction:column!important}
  .plfp .fpbody{min-height:0;flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch}
  .plfpbd{top:0;bottom:auto;height:100vh;height:100dvh}
}
.fptop{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;padding:16px max(18px, env(safe-area-inset-right, 0px)) 10px max(18px, env(safe-area-inset-left, 0px));border-bottom:1px solid #1E2127;background:#0B0C0F;box-sizing:border-box;width:100%}
.fptop h3{margin:0;font-size:20px;min-width:0}
.fpx{all:unset;cursor:pointer;flex:0 0 auto;box-sizing:border-box;display:inline-flex!important;align-items:center;justify-content:center;min-height:40px;min-width:40px;font-size:12px;font-weight:600;color:#C8CCD4;border:1px solid #2A2D35;border-radius:999px;padding:5px 12px;visibility:visible!important;opacity:1!important;position:relative;z-index:4;background:#0B0C0F}

/* qasi .194 (Tarrin t920u/t921u): desktop Search opened as a floating box pinned to the header's right side, BELOW the header
   (psearch.js `html.pscompact .psb:focus-within{position:absolute;right:12px;top:calc(100% + 6px);padding:6px}`), and the 40px box
   height from this file cut its 40px input + 12px padding, so the input hung out of its frame. Desktop (>=1024) only: the box
   opens in place in the header row (right edge stays on the search control; it grows left only as far as the room next to the
   Props/Teams/Sim tabs, --psbw set by nav.js) and the results open right under it. Phone (<=520) and tablet are not touched. */
@media(min-width:1024px){
  html.pscompact nav .psb:focus-within,nav .psb:focus-within{position:relative!important;top:auto!important;right:auto!important;left:auto!important;bottom:auto!important;transform:none!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;height:40px!important;flex:0 0 auto!important;width:var(--psbw,220px)!important;min-width:0!important;max-width:var(--psbw,220px)!important;z-index:70}
  html.pscompact nav .psb:focus-within input{height:40px!important;background:#0E0F12;border-color:#3A3F4A}
  html.pscompact nav .psb:focus-within .psg{height:40px!important;line-height:38px}
  html.pscompact nav .psb:focus-within .psr,nav .psb:focus-within .psr{position:absolute!important;top:46px!important;right:0!important;left:auto!important;width:var(--psrw,340px)!important;max-width:calc(100vw - 16px)!important;max-height:min(65vh,calc(100vh - 140px))!important;box-sizing:border-box}
}
/* prelaunch t996u (desktop >=1024): open Search covers the whole Props/Teams/Sim tab group; results align under it, same left and right edges. */
@media(min-width:1024px){
  html.pscompact nav .psb:focus-within,nav .psb:focus-within{margin-left:var(--psbml,0px)!important;z-index:75}
  html.pscompact nav .psb:focus-within .psr,nav .psb:focus-within .psr{left:0!important;right:0!important;width:auto!important;max-width:none!important}
}

/* v68.9.214: dock/FAB clearance spacer (inserted by nav.js before footer).
   body padding alone lived after the footer, so last rows of a card like Deeper
   splits were hidden under #ppdn and #pvfab/#ppfab while the card was in view.
   168px = FAB top clearance (~132px from viewport bottom) + gap. Also used at 521-760px where the FAB
   still shows after the dock hides. */
#ppdn-clear{display:none;height:0;pointer-events:none}
@media (max-width:760px){
  body.hasdn #ppdn-clear{display:block;height:calc(168px + env(safe-area-inset-bottom, 0px));flex:none}
}

/* v68.9.214 dock hover: only the real .on item is the solid blue pill.
   Chrome device-mode sticky :hover (and a leftover .press) was painting a
   second dock item blue, so at 360 both Props and Teams looked selected. */
@media (max-width:520px){
  #ppdn a:not(.on):not(:active):not(.press),
  #ppdn button:not(.on):not(:active):not(.press){
    background:transparent!important;
    color:#9AA0AA!important;
  }
  #ppdn a:not(.on):hover,
  #ppdn button:not(.on):hover{
    background:transparent!important;
    color:#C8CCD4!important;
  }
}

/* v68.9.214b: last row of ANY player-page section (Deeper splits, Advanced,
   game log, and the other .pg3 cards) must be able to scroll fully clear of
   the filter FAB + phone dock + safe-area. #ppdn-clear / body padding only
   sit at the document end (after the footer). On a phone, .pg3 is one column
   and does not use an inner overflow scroller — the document scrolls — so
   scrolling to the end of a mid-page card (e.g. the last ROLE row) still
   left that row under #pvfab (top ~668 in a 800px frame) and #ppdn (top ~730).
   Extra padding-bottom on each section card lets that last row sit above the
   chrome. Same rule through 768px (FAB hides after 760; pad is harmless). */
@media (max-width:768px){
  body.hasdn .pg3 .card{
    padding-bottom:calc(14px + 168px + env(safe-area-inset-bottom, 0px));
  }
}
