/* JustScribes JSV 2.0.204 — Route-scoped rail continuity.
 * Never applies to Activity, Group Home, Rewards Bank, or full-screen game.
 * Prevent theme and plugin desktop shells from competing for rail width. */
@media (min-width:761px){
  /* Account controls and service-request pages inherit My Panel's profile rail. */
  html body.jsv-rail-continuity-global.jsv-x-standard{
    --jsx-rail:218px!important;
    overflow-x:clip!important;
  }
  html body.jsv-rail-continuity-global.jsv-x-standard > #jsv-x-rail.jsv-x-rail{
    display:flex!important;visibility:visible!important;opacity:1!important;
    position:fixed!important;flex-direction:column!important;
    top:max(76px,calc(var(--jsv-live-header-bottom,72px) + 10px))!important;
    bottom:12px!important;left:14px!important;right:auto!important;
    width:190px!important;max-width:190px!important;min-width:0!important;
    height:auto!important;max-height:none!important;margin:0!important;
    padding:13px 11px 16px!important;box-sizing:border-box!important;
    transform:none!important;overflow-y:auto!important;overflow-x:hidden!important;
    z-index:85!important;background:linear-gradient(180deg,#083a5f,#092f51 64%,#072842)!important;
    color:#fff!important;border:1px solid rgba(255,255,255,.17)!important;
    border-radius:18px!important;box-shadow:0 12px 28px rgba(5,29,49,.17)!important;
    scrollbar-width:none!important;
  }
  html body.jsv-rail-continuity-global.jsv-x-standard > #jsv-x-rail::-webkit-scrollbar{display:none!important}
  html body.jsv-rail-continuity-global.jsv-x-standard > .jsv-x-page{
    position:relative!important;float:none!important;left:auto!important;
    box-sizing:border-box!important;display:block!important;
    width:calc(100% - var(--jsx-rail) - var(--jsx-sponsor,0px))!important;
    max-width:none!important;margin-left:var(--jsx-rail)!important;
    margin-right:var(--jsx-sponsor,0px)!important;transform:none!important;
  }
  html body.jsv-rail-continuity-global.jsv-x-standard .jsv-x-content{
    box-sizing:border-box!important;min-width:0!important;width:100%!important;
    max-width:none!important;margin:0!important;padding:14px 11px 42px!important;
  }
  html body.jsv-rail-continuity-global.jsv-x-standard .jsv-x-content>main:not(.jsv-account-workspace-shell-247),
  html body.jsv-rail-continuity-global.jsv-x-standard .jsv-x-content>.jsf-context-shell{
    width:100%!important;max-width:none!important;min-width:0!important;
    box-sizing:border-box!important;margin:0!important;padding-left:0!important;padding-right:0!important;
  }
  html body.jsv-rail-continuity-global.jsv-x-standard #jsv-x-rail .jsv-profile-202-brand{
    display:flex!important;flex:0 0 auto!important;position:sticky!important;
    top:-13px!important;z-index:5!important;gap:10px!important;
    align-items:center!important;min-height:68px!important;
    padding:9px 3px 13px!important;margin:0 0 12px!important;
    background:#083a5f!important;border-bottom:1px solid rgba(255,255,255,.17)!important;
  }
  html body.jsv-rail-continuity-global #jsv-x-rail .jsv-profile-202-brand img{
    width:44px!important;max-width:44px!important;height:44px!important;object-fit:contain!important;
  }
  html body.jsv-rail-continuity-global #jsv-x-rail .jsv-profile-202-brand strong{
    color:white!important;display:block!important;font:700 21px/.95 Georgia,serif!important;
  }
  html body.jsv-rail-continuity-global #jsv-x-rail .jsv-ux-rail-head,
  html body.jsv-rail-continuity-global #jsv-x-rail .jsv-ux-person span,
  html body.jsv-rail-continuity-global #jsv-x-rail .jsv-ux-personal-nav a>span:last-child{display:flex!important}
  /* Account's own tool menu is INNER navigation and remains inside main. */
  /* The account settings workspace manages its own centered width.
     Keep single-rail rules on legacy account shells only. */
  html body.jsv-rail-continuity-global .jsf-account-shell:not(.jsv-account-workspace-shell-247),
  html body.jsv-rail-continuity-global .account-settings-grid{width:100%!important;max-width:none!important;min-width:0!important}
  html body.jsv-rail-continuity-global .account-settings-grid{
    display:grid!important;grid-template-columns:minmax(170px,208px) minmax(0,1fr)!important;
    gap:16px!important;align-items:start!important;
  }
  html body.jsv-rail-continuity-global .jsf-settings-rail{
    position:sticky!important;top:calc(var(--jsv-live-header-bottom,72px) + 12px)!important;
    min-width:0!important;max-width:100%!important;max-height:calc(100dvh - var(--jsv-live-header-bottom,72px) - 24px)!important;
    overflow-y:auto!important;scrollbar-width:none!important;
  }
  html body.jsv-rail-continuity-global .jsf-settings-rail::-webkit-scrollbar{display:none!important}
  html body.jsv-rail-continuity-global .jsf-account-main{min-width:0!important;max-width:none!important;width:100%!important;box-sizing:border-box!important}
  /* Use the quote page's EXISTING horizontal tabs; no second service rail. */
  html body.jsv-rail-continuity-global.jsf-service-requests-page .jsf-context-shell>.jsf-context-tools{
    display:none!important;
  }
  html body.jsv-rail-continuity-global.jsf-service-requests-page .jsf-context-shell{
    display:block!important;grid-template-columns:minmax(0,1fr)!important;
  }
  html body.jsv-rail-continuity-global.jsf-service-requests-page .jsf-context-shell>.jsf-context-main{
    width:100%!important;max-width:none!important;margin:0!important;grid-column:1!important;
  }
  html body.jsv-rail-continuity-global .jsv-x-content :is(input,textarea,select){max-width:100%!important;box-sizing:border-box!important}
  /* The plugin's Marketplace rail is the ONLY Marketplace rail in shop/seller flows. */
  html body.jsv-rail-continuity-marketplace:not(.jsv-section-204-fallback-active) .jsm-marketplace-workspace{
    display:grid!important;grid-template-columns:minmax(190px,218px) minmax(0,1fr)!important;
    gap:14px!important;align-items:start!important;width:100%!important;max-width:none!important;
    margin:0!important;
  }
  html body.jsv-rail-continuity-marketplace:not(.jsv-section-204-fallback-active) .jsm-marketplace-workspace>.jsm-mp-rail{
    display:block!important;visibility:visible!important;opacity:1!important;
    grid-column:1!important;grid-row:1!important;min-width:0!important;
    position:sticky!important;top:calc(var(--jsv-live-header-bottom,72px) + 8px)!important;
  }
  html body.jsv-rail-continuity-marketplace:not(.jsv-section-204-fallback-active) .jsm-marketplace-workspace>.jsm-mp-workspace-main{
    grid-column:2!important;grid-row:1!important;min-width:0!important;
    width:100%!important;max-width:none!important;
  }
  /* Marketplace fallback is used ONLY when plugin did not output .jsm-mp-rail.
     Disable the old takeover rules in that case and reserve real sidebar width. */
  html body.jsv-section-204-fallback-active.jsv-x-standard{--jsx-rail:226px!important}
  html body.jsv-section-204-fallback-active.jsv-x-standard > #jsv-x-rail.jsv-x-rail{
    display:flex!important;visibility:visible!important;opacity:1!important;
    position:fixed!important;top:calc(var(--jsv-live-header-bottom,72px) + 8px)!important;
    bottom:12px!important;left:8px!important;right:auto!important;
    width:210px!important;max-width:210px!important;height:auto!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    background:linear-gradient(180deg,#082744,#061d35)!important;
    padding:12px!important;border-radius:16px!important;z-index:85!important;
    scrollbar-width:none!important;
  }
  html body.jsv-section-204-fallback-active.jsv-x-standard > .jsv-x-page{
    margin-left:226px!important;margin-right:var(--jsx-sponsor,0px)!important;
    width:calc(100% - 226px - var(--jsx-sponsor,0px))!important;max-width:none!important;
  }
  html body.jsv-section-204-fallback-active.jsv-x-standard .jsv-x-content{
    width:100%!important;max-width:none!important;padding:12px!important;margin:0!important;
  }
  html body.jsv-section-204-fallback-active.jsv-x-standard .jsm-marketplace-workspace{
    display:block!important;max-width:none!important;width:100%!important;
    margin:0!important;padding:0!important;
  }
  html body.jsv-section-204-fallback-active.jsv-x-standard #jsv-x-rail .jsv-ux-rail-head,
  html body.jsv-section-204-fallback-active.jsv-x-standard #jsv-x-rail .jsv-ux-person,
  html body.jsv-section-204-fallback-active.jsv-x-standard #jsv-x-rail .jsv-ux-personal-nav,
  html body.jsv-section-204-fallback-active.jsv-x-standard #jsv-x-rail .jsv-profile-202-brand{display:none!important}
  html body.jsv-section-204-fallback-active #jsv-x-rail .jsv-section-204-mp-fallback{
    display:block!important;min-width:0!important;width:100%!important;
  }
}
@media(min-width:761px) and (max-width:1499px){
  html body.jsv-rail-continuity-global.jsv-x-standard{--jsx-rail:200px!important}
  html body.jsv-rail-continuity-global.jsv-x-standard > #jsv-x-rail.jsv-x-rail{
    width:176px!important;max-width:176px!important;left:12px!important;
  }
}
@media(min-width:761px) and (max-width:1200px){
  html body.jsv-rail-continuity-global.jsv-x-standard{--jsx-rail:89px!important}
  html body.jsv-rail-continuity-global.jsv-x-standard > #jsv-x-rail.jsv-x-rail{
    width:72px!important;max-width:72px!important;left:9px!important;
  }
  html body.jsv-rail-continuity-global .account-settings-grid{
    display:block!important;
  }
  html body.jsv-rail-continuity-global .jsf-settings-rail{position:static!important;width:100%!important;max-height:none!important}
  html body.jsv-rail-continuity-marketplace:not(.jsv-section-204-fallback-active) .jsm-marketplace-workspace{grid-template-columns:minmax(165px,190px) minmax(0,1fr)!important}
  html body.jsv-section-204-fallback-active.jsv-x-standard{--jsx-rail:194px!important}
  html body.jsv-section-204-fallback-active.jsv-x-standard > #jsv-x-rail.jsv-x-rail{width:180px!important;max-width:180px!important;left:7px!important}
  html body.jsv-section-204-fallback-active.jsv-x-standard > .jsv-x-page{margin-left:194px!important;width:calc(100% - 194px - var(--jsx-sponsor,0px))!important}
}
/* 761–900px belongs to the Marketplace plugin's compact, swipeable rail,
   not to the wider two-column desktop workspace. */
@media(min-width:761px) and (max-width:900px){
  html body.jsv-rail-continuity-marketplace:not(.jsv-section-204-fallback-active) .jsm-marketplace-workspace{
    display:block!important;grid-template-columns:none!important;
  }
  html body.jsv-rail-continuity-marketplace:not(.jsv-section-204-fallback-active) .jsm-marketplace-workspace>.jsm-mp-rail{
    display:block!important;position:sticky!important;top:var(--jsv-live-header-bottom,72px)!important;
    height:auto!important;min-height:0!important;width:100%!important;max-width:none!important;
    margin:0 0 8px!important;
  }
  html body.jsv-rail-continuity-marketplace:not(.jsv-section-204-fallback-active) .jsm-marketplace-workspace>.jsm-mp-workspace-main{
    display:block!important;width:100%!important;max-width:none!important;
  }
}
/* Phone: unchanged global More drawer and bottom tabs. Local Marketplace rail
   becomes a native horizontal nav; do not display two permanent left rails. */
@media(max-width:760px){
  html body.jsv-rail-continuity-global.jsv-x-standard > .jsv-x-page,
  html body.jsv-section-204-fallback-active.jsv-x-standard > .jsv-x-page{
    margin:0!important;max-width:none!important;width:100%!important;
  }
  html body.jsv-rail-continuity-global .account-settings-grid{display:block!important;width:100%!important}
  html body.jsv-section-204-fallback-active > #jsv-x-rail{display:none!important}
  html body.jsv-rail-continuity-marketplace .jsm-marketplace-workspace>.jsm-mp-rail{
    display:block!important;visibility:visible!important;
  }
}
/* When there is no native Marketplace rail, the fallback becomes a swipeable
   menu inside the page on phones; the global mobile bottom navigation remains. */
@media(max-width:760px){
 html body.jsv-section-204-fallback-active .jsv-x-content>.jsv-section-204-mp-fallback{
   display:block!important;position:sticky!important;top:var(--jsv-live-header-bottom,60px)!important;
   z-index:94!important;background:#082744!important;color:white!important;
   width:100%!important;max-width:none!important;min-width:0!important;
   margin:0 0 10px!important;border-radius:0 0 12px 12px!important;
 }
 html body.jsv-section-204-fallback-active .jsv-x-content>.jsv-section-204-mp-fallback .jsv-section-204-mp-title,
 html body.jsv-section-204-fallback-active .jsv-x-content>.jsv-section-204-mp-fallback .jsv-section-204-return{display:none!important}
 html body.jsv-section-204-fallback-active .jsv-x-content>.jsv-section-204-mp-fallback nav{
   display:flex!important;gap:6px!important;overflow-x:auto!important;white-space:nowrap!important;
   padding:9px!important;scrollbar-width:none!important;
 }
 html body.jsv-section-204-fallback-active .jsv-x-content>.jsv-section-204-mp-fallback nav a{
   display:inline-flex!important;gap:6px!important;align-items:center!important;
   min-height:42px!important;padding:8px 12px!important;border-radius:8px!important;
   color:white!important;text-decoration:none!important;background:#ffffff19!important;
   font:700 12px system-ui,sans-serif!important;
 }
 html body.jsv-section-204-fallback-active .jsv-x-content>.jsv-section-204-mp-fallback nav a[aria-current=page]{color:#15344e!important;background:#f4c542!important}
}
/* Fallback native Marketplace menu: simple, functional links; no duplicate shell. */
#jsv-x-rail .jsv-section-204-mp-fallback[hidden]{display:none!important}
#jsv-x-rail .jsv-section-204-mp-fallback .jsv-section-204-mp-title{
  display:grid;gap:4px;padding:11px 8px 15px;margin:0 0 10px;border-bottom:1px solid #ffffff23;
}
#jsv-x-rail .jsv-section-204-mp-fallback .jsv-section-204-mp-title b{font:700 20px Georgia,serif;color:#fff}
#jsv-x-rail .jsv-section-204-mp-fallback .jsv-section-204-mp-title small{font:500 11px system-ui,sans-serif;color:#cbdce8}
#jsv-x-rail .jsv-section-204-mp-fallback nav{display:grid!important;gap:3px!important}
#jsv-x-rail .jsv-section-204-mp-fallback nav a{
  display:flex;align-items:center;gap:9px;min-height:42px;
  padding:8px 9px;border-radius:9px;color:#fff!important;
  background:transparent;text-decoration:none!important;
  font:650 12px/1.3 system-ui,sans-serif!important;
}
#jsv-x-rail .jsv-section-204-mp-fallback nav a:hover{background:#ffffff20!important}
#jsv-x-rail .jsv-section-204-mp-fallback nav a[aria-current="page"]{background:#f4c542!important;color:#12314f!important}
#jsv-x-rail .jsv-section-204-mp-fallback nav a span{width:20px;flex:none;text-align:center}
#jsv-x-rail .jsv-section-204-mp-fallback .jsv-section-204-return{
  display:block;margin-top:16px;padding:12px 8px;border-top:1px solid #ffffff23;
  color:#c5e5ff!important;font:650 12px system-ui,sans-serif!important;
}
