/* V14 — authoritative home overlays. Loaded last on purpose. */

/* Navigation plaques: authenticated theme rules must not turn them back into text links. */
html[data-home-theme] body #root .game-home .np-shop-gateway,
html[data-home-theme] body #root .game-home .friends-orb,
html[data-home-theme] body #root .game-home .np-bp-gateway[data-placement="home"]{
  position:absolute!important;
  right:18px!important;
  left:auto!important;
  display:block!important;
  width:246px!important;
  height:72px!important;
  min-height:72px!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background-color:transparent!important;
  background-position:center!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
  box-shadow:none!important;
  clip-path:none!important;
  opacity:1!important;
  visibility:visible!important;
  overflow:hidden!important;
  transform:none!important;
  filter:brightness(.86) saturate(.92) drop-shadow(0 10px 18px #000c)!important;
  isolation:isolate!important;
}
html[data-home-theme] body #root .game-home .np-shop-gateway{top:72px!important}
html[data-home-theme] body #root .game-home .friends-orb{top:146px!important}
html[data-home-theme] body #root .game-home .np-bp-gateway[data-placement="home"]{top:220px!important;bottom:auto!important}

html[data-home-theme="mrak"] body #root .game-home .np-shop-gateway{background-image:url('/theme-assets/navigation/shop-plaque-mrak-v1.png')!important}
html[data-home-theme="mrak"] body #root .game-home .friends-orb{background-image:url('/theme-assets/navigation/friends-plaque-mrak-v1.png')!important}
html[data-home-theme="mrak"] body #root .game-home .np-bp-gateway[data-placement="home"]{background-image:url('/theme-assets/navigation/battle-pass-plaque-mrak-v1.png')!important}
html[data-home-theme="worlds"] body #root .game-home .np-shop-gateway{background-image:url('/theme-assets/navigation/shop-plaque-worlds-v1.png')!important}
html[data-home-theme="worlds"] body #root .game-home .friends-orb{background-image:url('/theme-assets/navigation/friends-plaque-worlds-v1.png')!important}
html[data-home-theme="worlds"] body #root .game-home .np-bp-gateway[data-placement="home"]{background-image:url('/theme-assets/navigation/battle-pass-plaque-worlds-v1.png')!important}
html[data-home-theme="kids"] body #root .game-home .np-shop-gateway{background-image:url('/theme-assets/navigation/shop-plaque-kids-v1.png')!important}
html[data-home-theme="kids"] body #root .game-home .friends-orb{background-image:url('/theme-assets/navigation/friends-plaque-kids-v1.png')!important}
html[data-home-theme="kids"] body #root .game-home .np-bp-gateway[data-placement="home"]{background-image:url('/theme-assets/navigation/battle-pass-plaque-kids-v1.png')!important}

html[data-home-theme] body #root .game-home :is(.np-shop-gateway,.friends-orb,.np-bp-gateway[data-placement="home"]):is(:hover,:focus-visible){
  transform:translateY(-2px) scale(1.015)!important;
  filter:brightness(1.12) saturate(1.06) drop-shadow(0 13px 25px #000e)!important;
  outline:0!important;
}
html[data-home-theme] body #root .game-home .np-bp-gateway[data-placement="home"]::before,
html[data-home-theme] body #root .game-home .np-bp-gateway[data-placement="home"]::after,
html[data-home-theme] body #root .game-home .np-bp-gateway[data-placement="home"] .np-bp-gateway-rune{display:none!important}
html[data-home-theme] body #root .game-home .friends-orb>*{opacity:0!important;visibility:hidden!important}

/* One real profile card: the canvas owns every child and clips all old absolute geometry. */
html[data-home-theme] body #root .game-home .account-parchment{
  overflow:hidden!important;
  contain:layout paint!important;
  box-sizing:border-box!important;
  isolation:isolate!important;
}
html[data-home-theme] body #root .game-home .account-parchment>.panel-content.profile-card{
  position:absolute!important;
  inset:8% 10% 7%!important;
  display:flex!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  padding:0!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-direction:column!important;
  gap:3px!important;
  overflow:hidden!important;
  color:inherit!important;
  background:transparent!important;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
  text-align:center!important;
}
html[data-home-theme] body #root .game-home .account-parchment>.panel-content.profile-card>*{
  position:static!important;
  inset:auto!important;
  min-width:0!important;
  max-width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
  transform:none!important;
}
html[data-home-theme] body #root .game-home .account-parchment .avatar-medallion{
  width:76px!important;height:76px!important;min-height:76px!important;flex:0 0 76px!important;margin-bottom:3px!important
}
html[data-home-theme] body #root .game-home .account-parchment :is(.profile-name,.profile-title,.profile-type){
  display:block!important;width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important
}
html[data-home-theme] body #root .game-home .account-parchment .profile-name{margin:1px 0!important;font-size:1rem!important;line-height:1.05!important}
html[data-home-theme] body #root .game-home .account-parchment .profile-title{margin:0 0 2px!important;font-size:0.78rem!important;line-height:1.15!important}
html[data-home-theme] body #root .game-home .account-parchment .profile-type{margin:1px 0!important;font-size:0.78rem!important;line-height:1.1!important}
html[data-home-theme] body #root .game-home .account-parchment .profile-player-id{display:none!important}
html[data-home-theme] body #root .game-home .account-parchment .profile-xp{
  position:relative!important;display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:14px!important;min-height:14px!important;margin:4px 0!important;border:1px solid #5b3c20!important;border-radius:2px!important;padding:0!important;flex:0 0 14px!important;background:#140d08!important;overflow:hidden!important
}
html[data-home-theme] body #root .game-home .account-parchment>.panel-content.profile-card>.profile-xp,
html[data-home-theme] body #root .game-home .account-parchment>.panel-content.profile-card>.profile-stats{width:100%!important;min-width:0!important;max-width:100%!important;margin-left:0!important;margin-right:0!important}
html[data-home-theme] body #root .game-home .account-parchment>.panel-content.profile-card>.profile-xp{position:relative!important}
html[data-home-theme] body #root .game-home .account-parchment>.panel-content.profile-card>:is(.profile-name,.profile-title,.profile-type,.profile-open-link){position:static!important;width:100%!important;margin-left:0!important;margin-right:0!important;text-align:center!important}
html[data-home-theme] body #root .game-home .account-parchment .profile-xp>i{position:absolute!important;inset:1px auto 1px 1px!important;height:auto!important;max-width:calc(100% - 2px)!important}
html[data-home-theme] body #root .game-home .account-parchment .profile-xp>span{position:absolute!important;inset:0!important;display:grid!important;width:100%!important;height:100%!important;margin:0!important;place-items:center!important;font-size:.44rem!important;line-height:1!important}
html[data-home-theme] body #root .game-home .account-parchment .profile-stats{
  position:static!important;display:grid!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:3px 0!important;border:0!important;padding:0!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:2px 8px!important;overflow:hidden!important
}
html[data-home-theme] body #root .game-home .account-parchment .profile-stats>div{
  position:static!important;display:flex!important;width:auto!important;min-width:0!important;min-height:19px!important;margin:0!important;border-top:1px solid currentColor!important;border-bottom:0!important;padding:1px 0!important;align-items:center!important;justify-content:space-between!important;gap:4px!important;opacity:.82!important
}
html[data-home-theme] body #root .game-home .account-parchment .profile-stats :is(dt,dd){position:static!important;display:block!important;min-width:0!important;width:auto!important;margin:0!important;font-size:0.74rem!important;line-height:1!important;white-space:nowrap!important}
html[data-home-theme] body #root .game-home .account-parchment .profile-stats dd{font-weight:900!important;opacity:1!important}
html[data-home-theme] body #root .game-home .account-parchment .profile-open-link{margin-top:auto!important;font-size:0.74rem!important}

/* Live captions stay readable while the original friend-button contents remain hidden. */
html[data-home-theme] body #root .game-home .np-shop-gateway>*,
html[data-home-theme] body #root .game-home .friends-orb::before,
html[data-home-theme] body #root .game-home .friends-orb::after,
html[data-home-theme] body #root .game-home .np-bp-gateway[data-placement="home"]>*{opacity:1!important;visibility:visible!important}
html[data-home-theme] body #root .game-home .friends-orb>*{opacity:0!important;visibility:hidden!important}

/* Classic parchment and alternate-theme frames. */
html[data-home-theme="classic"] body #root .game-home .account-parchment{
  top:34%!important;right:4.5%!important;left:auto!important;width:24%!important;height:50%!important;min-height:0!important;
  border:0!important;border-radius:0!important;background:transparent url('/theme-assets/classic-layers/profile-canvas-v1.png') center/100% 100% no-repeat!important;
  box-shadow:none!important;filter:drop-shadow(0 14px 22px #000c)!important;clip-path:none!important
}
html[data-home-theme="classic"] body #root .game-home .account-parchment>.panel-content.profile-card{inset:10% 13% 9%!important}
html[data-home-theme="classic"] body #root .game-home .account-parchment .profile-card{color:#2b180c!important;text-shadow:0 1px #f2d49a66!important}

/* V15: the visible parchment frame has transparent margins inside the PNG. */
html[data-home-theme="classic"] body #root .game-home .account-parchment>.panel-content.profile-card{
  top:11%!important;right:18%!important;bottom:12%!important;left:18%!important;width:auto!important;height:auto!important
}
html[data-home-theme="classic"] body #root .game-home .account-parchment>.panel-content.profile-card>.profile-xp,
html[data-home-theme="classic"] body #root .game-home .account-parchment>.panel-content.profile-card>.profile-stats{width:100%!important;max-width:100%!important}
html[data-home-theme="classic"] body #root .game-home .np-bp-gateway[data-placement="home"]{top:238px!important}

html[data-home-theme]:not([data-home-theme="classic"]) body #root .game-home .account-parchment{
  top:31%!important;right:22px!important;bottom:auto!important;left:auto!important;width:clamp(286px,24vw,360px)!important;height:clamp(390px,53vh,510px)!important;min-height:0!important;
  border:1px solid var(--page-line,#765434)!important;border-radius:8px!important;clip-path:none!important;
  box-shadow:0 22px 55px #000d,inset 0 0 0 3px #0008,inset 0 0 55px #0008!important
}
html[data-home-theme="mrak"] body #root .game-home .account-parchment{border-color:#8d362e!important;background:radial-gradient(circle at 50% 12%,#6c251f24,transparent 33%),linear-gradient(145deg,#1b1715f7,#070606fa)!important}
html[data-home-theme="worlds"] body #root .game-home .account-parchment{border-color:#6fb9bd!important;background:radial-gradient(circle at 50% 10%,#74d6df28,transparent 36%),linear-gradient(145deg,#173d48f5,#06171efa)!important}
html[data-home-theme="kids"] body #root .game-home .account-parchment{border:2px solid #f4c25e!important;border-radius:22px!important;color:#fff1cf!important;background:radial-gradient(circle at 50% 8%,#f8cb6645,transparent 38%),linear-gradient(145deg,#4f3769f5,#202447fa)!important}

@media (max-width:1100px) and (min-width:761px){
  html[data-home-theme] body #root .game-home :is(.np-shop-gateway,.friends-orb,.np-bp-gateway[data-placement="home"]){right:9px!important;width:216px!important;height:64px!important;min-height:64px!important}
  html[data-home-theme] body #root .game-home .np-shop-gateway{top:62px!important}
  html[data-home-theme] body #root .game-home .friends-orb{top:128px!important}
  html[data-home-theme] body #root .game-home .np-bp-gateway[data-placement="home"]{top:194px!important}
  html[data-home-theme="classic"] body #root .game-home .account-parchment{right:2%!important;width:31%!important;height:47%!important}
  html[data-home-theme]:not([data-home-theme="classic"]) body #root .game-home .account-parchment{top:35%!important;right:14px!important;width:min(40vw,340px)!important;height:48vh!important}
}

@media (max-width:760px){
  html[data-home-theme] body #root .game-home .np-shop-gateway,
  html[data-home-theme] body #root .game-home .friends-orb,
  html[data-home-theme] body #root .game-home .np-bp-gateway[data-placement="home"]{--nav-cell:calc((100vw - 28px)/3);top:174px!important;width:var(--nav-cell)!important;height:42px!important;min-height:42px!important;right:auto!important}
  html[data-home-theme] body #root .game-home .np-shop-gateway{left:7px!important}
  html[data-home-theme] body #root .game-home .friends-orb{left:calc(14px + var(--nav-cell))!important}
  html[data-home-theme] body #root .game-home .np-bp-gateway[data-placement="home"]{left:calc(21px + var(--nav-cell)*2)!important}
  html[data-home-theme] body #root .game-home .account-parchment{top:51%!important;right:2%!important;bottom:auto!important;left:auto!important;width:55%!important;height:40%!important;min-height:0!important}
  html[data-home-theme] body #root .game-home .account-parchment>.panel-content.profile-card{inset:8% 10% 7%!important;gap:1px!important}
  html[data-home-theme] body #root .game-home .account-parchment .avatar-medallion{width:50px!important;height:50px!important;min-height:50px!important;flex-basis:50px!important}
  html[data-home-theme] body #root .game-home .account-parchment .profile-name{font-size:.76rem!important}
  html[data-home-theme] body #root .game-home .account-parchment .profile-title{font-size:0.70rem!important}
  html[data-home-theme] body #root .game-home .account-parchment .profile-stats :is(dt,dd){font-size:0.70rem!important}
}

/* V15: keep the classic desktop plaques separated at tablet/laptop widths. */
@media (max-width:1100px) and (min-width:761px){
  html[data-home-theme="classic"] body #root .game-home .np-shop-gateway{top:58px!important}
  html[data-home-theme="classic"] body #root .game-home .friends-orb{top:134px!important}
  html[data-home-theme="classic"] body #root .game-home .np-bp-gateway[data-placement="home"]{top:210px!important}
}
