/* ============================================================
   Parcel Empire — Phase 10.2
   Loading-screen matched header + top statistics overhaul
   ============================================================ */

body.pe-v10-header .gameTopbar,
body.pe-v10-header .statsHud{
  box-sizing:border-box!important;
}

body.pe-v10-header .gameTopbar{
  overflow:visible!important;
  z-index:1210!important;
}

body.pe-v10-header .brandChip.pePlayerCard{
  position:relative!important;
  isolation:isolate;
  overflow:hidden!important;
  display:grid!important;
  grid-template-columns:58px minmax(0,1fr)!important;
  grid-template-rows:auto auto 18px!important;
  grid-template-areas:
    "logo title"
    "logo tag"
    "logo level"!important;
  gap:1px 10px!important;
  align-items:center!important;
  min-width:0!important;
  border:2px solid var(--pe10-gold-border)!important;
  background:
    radial-gradient(circle at 17% 50%,rgba(46,209,255,.28),transparent 28%),
    linear-gradient(145deg,#0b57b7 0%,#07347f 48%,#041d50 100%)!important;
  box-shadow:
    0 13px 32px rgba(0,8,34,.56),
    0 0 0 2px rgba(29,180,255,.16),
    inset 0 2px 0 rgba(255,255,255,.16)!important;
}
body.pe-v10-header .brandChip.pePlayerCard::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(110deg,transparent 22%,rgba(255,255,255,.14) 42%,transparent 58%);
  transform:translateX(-110%);
  animation:pe10HeaderShine 6.5s ease-in-out infinite;
}
body.pe-v10-header .brandChip.pePlayerCard::after{
  content:"";
  position:absolute;
  right:-18px;
  top:-24px;
  width:96px;
  height:96px;
  border-radius:50%;
  border:1px solid rgba(97,218,255,.22);
  box-shadow:0 0 34px rgba(20,178,255,.18);
  pointer-events:none;
}

body.pe-v10-header .brandChip.pePlayerCard>img{
  grid-area:logo!important;
  width:56px!important;
  height:56px!important;
  min-width:56px!important;
  max-width:56px!important;
  margin:0!important;
  padding:4px!important;
  object-fit:contain!important;
  border:1px solid rgba(255,226,111,.72)!important;
  border-radius:18px!important;
  background:radial-gradient(circle,#0c62c5,#020d2c 72%)!important;
  box-shadow:0 0 24px rgba(44,207,255,.38),inset 0 1px 0 rgba(255,255,255,.24)!important;
}
body.pe-v10-header .brandChip.pePlayerCard>span{
  grid-area:title!important;
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  min-width:0!important;
  margin:0!important;
  color:#fff!important;
  font-family:"Arial Black",Inter,system-ui,sans-serif!important;
  font-size:18px!important;
  line-height:.96!important;
  letter-spacing:-.055em!important;
  text-transform:uppercase!important;
  text-shadow:0 3px 0 rgba(0,25,71,.78),0 0 16px rgba(44,200,255,.38)!important;
}
body.pe-v10-header .brandChip.pePlayerCard>span .pe10Parcel{color:#ffe05a}
body.pe-v10-header .brandChip.pePlayerCard>span .pe10Empire{color:#69dcff}
body.pe-v10-header .brandChip.pePlayerCard>span em{
  color:#ffd23c!important;
  font-style:normal!important;
  font-size:17px!important;
  filter:drop-shadow(0 0 8px rgba(255,207,58,.55));
}
body.pe-v10-header .pe10BrandTagline{
  grid-area:tag;
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  color:#c7eaff;
  font-size:8px;
  font-weight:850;
  letter-spacing:.11em;
  text-transform:uppercase;
  opacity:.9;
}

body.pe-v10-header .brandChip.pePlayerCard .levelHud,
body.pe-v10-header .levelHud{
  grid-area:level!important;
  position:relative!important;
  inset:auto!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  grid-template-areas:"badge bar text"!important;
  align-items:center!important;
  gap:6px!important;
  width:100%!important;
  height:18px!important;
  min-height:18px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.pe-v10-header .levelBadge{
  grid-area:badge!important;
  min-width:auto!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#ffe061!important;
  font-size:8px!important;
  line-height:1!important;
  letter-spacing:.03em!important;
  white-space:nowrap!important;
}
body.pe-v10-header .xpTrack{
  grid-area:bar!important;
  width:100%!important;
  height:5px!important;
  min-width:0!important;
  border:1px solid rgba(135,224,255,.3)!important;
  border-radius:999px!important;
  overflow:hidden!important;
  background:rgba(1,12,38,.68)!important;
}
body.pe-v10-header .xpTrack i{
  display:block!important;
  height:100%!important;
  border-radius:inherit!important;
  background:linear-gradient(90deg,#26cfff,#77eaff,#ffd643)!important;
  box-shadow:0 0 10px rgba(55,210,255,.58)!important;
}
body.pe-v10-header .levelHud small{
  grid-area:text!important;
  color:#d3efff!important;
  font-size:7px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
body.pe-v10-header .gameTopbar .topChips{display:none!important}

body.pe-v10-header .statsHud{
  z-index:1205!important;
  overflow:visible!important;
}
body.pe-v10-header .statsHud>.statCard{
  position:relative!important;
  isolation:isolate;
  overflow:hidden!important;
  min-width:0!important;
  margin:0!important;
  border:1px solid rgba(86,213,255,.32)!important;
  background:
    radial-gradient(circle at 15% 20%,rgba(var(--pe10-stat-rgb,53,205,255),.18),transparent 36%),
    linear-gradient(160deg,rgba(9,54,112,.96),rgba(3,22,57,.98))!important;
  box-shadow:0 12px 30px rgba(0,8,34,.48),inset 0 1px 0 rgba(255,255,255,.08)!important;
  transition:transform .16s ease,border-color .16s ease,filter .16s ease!important;
}
body.pe-v10-header .statsHud>.statCard::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:3px;
  background:linear-gradient(90deg,transparent,var(--pe10-stat,#36d6ff),transparent);
  box-shadow:0 0 13px var(--pe10-stat,#36d6ff);
  opacity:.86;
}
body.pe-v10-header .statsHud>.statCard:active{transform:scale(.98)!important}
body.pe-v10-header .statsHud>.statCard .pe10StatIcon{
  display:grid;
  place-items:center;
  flex:0 0 auto;
  width:26px;
  height:26px;
  border:1px solid rgba(var(--pe10-stat-rgb,53,205,255),.34);
  border-radius:9px;
  background:rgba(var(--pe10-stat-rgb,53,205,255),.12);
  color:var(--pe10-stat,#36d6ff);
  font-size:14px;
  line-height:1;
  box-shadow:0 0 12px rgba(var(--pe10-stat-rgb,53,205,255),.15);
}
body.pe-v10-header .statsHud>.statCard span:not(.pe10StatIcon){
  color:#bcdcf0!important;
  font-size:8px!important;
  font-weight:900!important;
  letter-spacing:.09em!important;
  line-height:1!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
}
body.pe-v10-header .statsHud>.statCard strong{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  color:#fff!important;
  font-size:18px!important;
  line-height:1.05!important;
  font-variant-numeric:tabular-nums!important;
  text-overflow:ellipsis!important;
  text-shadow:0 2px 10px rgba(var(--pe10-stat-rgb,53,205,255),.24)!important;
  white-space:nowrap!important;
}
body.pe-v10-header .statsHud>.statCard.pe10-rent{--pe10-stat:#43e8ff;--pe10-stat-rgb:67,232,255}
body.pe-v10-header .statsHud>.statCard.pe10-bucks{--pe10-stat:#ffd447;--pe10-stat-rgb:255,212,71}
body.pe-v10-header .statsHud>.statCard.pe10-parcels{--pe10-stat:#78e940;--pe10-stat-rgb:120,233,64}
body.pe-v10-header .statsHud>.statCard.pe10-boost{--pe10-stat:#b990ff;--pe10-stat-rgb:185,144,255}
body.pe-v10-header .statsHud>.statCard.pe10-gps{--pe10-stat:#44f5ba;--pe10-stat-rgb:68,245,186}

body.pe-v10-header .statsHud>.peGpsStatCard{
  border-color:rgba(255,208,65,.5)!important;
  background:
    radial-gradient(circle at 18% 28%,rgba(42,239,185,.22),transparent 34%),
    linear-gradient(155deg,#0a4a84,#062958 70%)!important;
  box-shadow:0 12px 30px rgba(0,8,34,.5),0 0 0 1px rgba(255,208,65,.14) inset!important;
}
body.pe-v10-header .pe10LiveDot{
  position:absolute;
  right:10px;
  top:10px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#36f4a5;
  box-shadow:0 0 0 4px rgba(54,244,165,.11),0 0 14px #36f4a5;
  animation:pe10GpsPulse 2s ease-in-out infinite;
}

@keyframes pe10HeaderShine{0%,70%{transform:translateX(-110%)}88%,100%{transform:translateX(120%)}}
@keyframes pe10GpsPulse{50%{opacity:.45;transform:scale(.78)}}

/* Desktop / laptop HUD */
@media (min-width:1101px){
  :root{--pe96-map-top:108px}
  body.pe-v10-header .gameTopbar{
    top:14px!important;
    left:18px!important;
    width:272px!important;
    height:76px!important;
  }
  body.pe-v10-header .brandChip.pePlayerCard{
    width:100%!important;
    height:76px!important;
    padding:9px 12px!important;
    border-radius:22px!important;
  }
  body.pe-v10-header .statsHud{
    top:14px!important;
    left:304px!important;
    right:390px!important;
    width:auto!important;
    height:76px!important;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:9px!important;
    padding:0!important;
  }
  body.pe-v10-header .statsHud>.statCard{
    position:relative!important;
    inset:auto!important;
    width:auto!important;
    height:76px!important;
    padding:10px 10px!important;
    display:grid!important;
    grid-template-columns:28px minmax(0,1fr)!important;
    grid-template-rows:18px 1fr!important;
    grid-template-areas:"icon label" "icon value"!important;
    align-items:center!important;
    gap:0 8px!important;
    border-radius:19px!important;
  }
  body.pe-v10-header .statsHud>.statCard .pe10StatIcon{grid-area:icon}
  body.pe-v10-header .statsHud>.statCard span:not(.pe10StatIcon){grid-area:label;text-align:left!important}
  body.pe-v10-header .statsHud>.statCard strong{grid-area:value;text-align:left!important}
  body.pe-v10-header .statsHud>.peGpsStatCard{position:relative!important;top:auto!important;right:auto!important}
}


@media (min-width:1101px) and (max-width:1380px){
  body.pe-v10-header .gameTopbar{width:248px!important}
  body.pe-v10-header .statsHud{left:278px!important;right:350px!important;gap:7px!important}
  body.pe-v10-header .statsHud>.statCard{padding-inline:7px!important;grid-template-columns:24px minmax(0,1fr)!important;gap:0 5px!important}
  body.pe-v10-header .statsHud>.statCard .pe10StatIcon{width:23px;height:23px;font-size:12px}
  body.pe-v10-header .statsHud>.statCard strong{font-size:15px!important}
  body.pe-v10-header .statsHud>.statCard span:not(.pe10StatIcon){font-size:6.8px!important}
}

/* Tablet and mobile: two compact rows, no horizontal overflow. */
@media (max-width:1100px){
  :root{
    --pe99-header-h:164px;
    --pe96-map-top:calc(164px + env(safe-area-inset-top,0px));
  }
  body.pe-v10-header .gameTopbar{
    position:fixed!important;
    top:calc(7px + env(safe-area-inset-top,0px))!important;
    left:8px!important;
    right:auto!important;
    width:calc(100vw - min(40vw,158px) - 24px)!important;
    min-width:0!important;
    max-width:222px!important;
    height:69px!important;
    margin:0!important;
  }
  body.pe-v10-header .brandChip.pePlayerCard{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:69px!important;
    padding:6px 9px!important;
    grid-template-columns:50px minmax(0,1fr)!important;
    border-radius:20px!important;
  }
  body.pe-v10-header .brandChip.pePlayerCard>img{
    width:49px!important;
    min-width:49px!important;
    max-width:49px!important;
    height:49px!important;
    border-radius:15px!important;
  }
  body.pe-v10-header .brandChip.pePlayerCard>span{font-size:clamp(12px,3.6vw,16px)!important}
  body.pe-v10-header .pe10BrandTagline{font-size:6.4px!important;letter-spacing:.06em!important}
  body.pe-v10-header .levelBadge{font-size:6.5px!important}
  body.pe-v10-header .levelHud small{font-size:6px!important}

  body.pe-v10-header .statsHud{
    position:fixed!important;
    top:calc(84px + env(safe-area-inset-top,0px))!important;
    left:8px!important;
    right:8px!important;
    width:auto!important;
    height:71px!important;
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
    padding:0!important;
    overflow:visible!important;
  }
  body.pe-v10-header .statsHud>.statCard:not(.peGpsStatCard){
    position:relative!important;
    inset:auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:69px!important;
    padding:6px 4px!important;
    display:grid!important;
    grid-template-rows:24px 12px 1fr!important;
    justify-items:center!important;
    align-items:center!important;
    gap:1px!important;
    border-radius:17px!important;
  }
  body.pe-v10-header .statsHud>.statCard .pe10StatIcon{
    width:23px!important;
    height:23px!important;
    border-radius:8px!important;
    font-size:12px!important;
  }
  body.pe-v10-header .statsHud>.statCard span:not(.pe10StatIcon){
    max-width:100%!important;
    overflow:hidden!important;
    font-size:6.5px!important;
    text-overflow:ellipsis!important;
  }
  body.pe-v10-header .statsHud>.statCard strong{
    max-width:100%!important;
    font-size:clamp(12px,3.4vw,16px)!important;
    text-align:center!important;
  }
  body.pe-v10-header .statsHud>.peGpsStatCard{
    position:fixed!important;
    top:calc(7px + env(safe-area-inset-top,0px))!important;
    right:8px!important;
    left:auto!important;
    width:min(40vw,158px)!important;
    min-width:132px!important;
    height:69px!important;
    padding:8px 10px!important;
    display:grid!important;
    grid-template-columns:28px minmax(0,1fr)!important;
    grid-template-rows:18px 1fr!important;
    grid-template-areas:"icon label" "icon value"!important;
    align-items:center!important;
    gap:0 7px!important;
    border-radius:20px!important;
  }
  body.pe-v10-header .statsHud>.peGpsStatCard .pe10StatIcon{grid-area:icon}
  body.pe-v10-header .statsHud>.peGpsStatCard span:not(.pe10StatIcon){grid-area:label;text-align:left!important;font-size:7px!important}
  body.pe-v10-header .statsHud>.peGpsStatCard strong{grid-area:value;text-align:left!important;font-size:19px!important}
  body.pe-v10-header .statsHud>.peGpsStatCard .pe10LiveDot{right:8px;top:8px}

  body.pe-v10-header[data-pe-page="map"] #map,
  body.pe-v10-header[data-pe-page="map"] .worldShade,
  body.pe-v10-header[data-pe-page="map"] .scanGlow,
  body.pe-v10-header[data-pe-page="buy"] #map,
  body.pe-v10-header[data-pe-page="buy"] .worldShade,
  body.pe-v10-header[data-pe-page="buy"] .scanGlow{
    top:calc(164px + env(safe-area-inset-top,0px))!important;
  }
}

@media (max-width:390px){
  body.pe-v10-header .gameTopbar{
    width:calc(100vw - 146px - 22px)!important;
  }
  body.pe-v10-header .statsHud>.peGpsStatCard{
    width:146px!important;
    min-width:146px!important;
  }
  body.pe-v10-header .brandChip.pePlayerCard{
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:1px 7px!important;
    padding-inline:7px!important;
  }
  body.pe-v10-header .brandChip.pePlayerCard>img{
    width:43px!important;
    min-width:43px!important;
    max-width:43px!important;
    height:43px!important;
  }
  body.pe-v10-header .brandChip.pePlayerCard>span{font-size:11.5px!important}
  body.pe-v10-header .pe10BrandTagline{font-size:5.8px!important}
  body.pe-v10-header .statsHud{gap:4px!important}
  body.pe-v10-header .statsHud>.statCard:not(.peGpsStatCard){padding-inline:2px!important}
}

@media (max-width:350px){
  :root{--pe99-header-h:158px}
  body.pe-v10-header .gameTopbar{width:calc(100vw - 136px - 20px)!important;height:65px!important}
  body.pe-v10-header .brandChip.pePlayerCard{height:65px!important}
  body.pe-v10-header .statsHud>.peGpsStatCard{width:136px!important;min-width:136px!important;height:65px!important}
  body.pe-v10-header .statsHud{top:calc(79px + env(safe-area-inset-top,0px))!important;height:68px!important}
  body.pe-v10-header .statsHud>.statCard:not(.peGpsStatCard){height:66px!important}
  body.pe-v10-header[data-pe-page="map"] #map,
  body.pe-v10-header[data-pe-page="map"] .worldShade,
  body.pe-v10-header[data-pe-page="map"] .scanGlow,
  body.pe-v10-header[data-pe-page="buy"] #map,
  body.pe-v10-header[data-pe-page="buy"] .worldShade,
  body.pe-v10-header[data-pe-page="buy"] .scanGlow{top:calc(158px + env(safe-area-inset-top,0px))!important}
}

@media (orientation:landscape) and (max-height:560px) and (max-width:1100px){
  body.pe-v10-header .gameTopbar{height:58px!important;width:190px!important}
  body.pe-v10-header .brandChip.pePlayerCard{height:58px!important;grid-template-columns:43px 1fr!important}
  body.pe-v10-header .brandChip.pePlayerCard>img{width:42px!important;min-width:42px!important;height:42px!important}
  body.pe-v10-header .statsHud{top:calc(7px + env(safe-area-inset-top,0px))!important;left:208px!important;right:8px!important;height:58px!important;grid-template-columns:repeat(5,minmax(72px,1fr))!important}
  body.pe-v10-header .statsHud>.statCard:not(.peGpsStatCard),
  body.pe-v10-header .statsHud>.peGpsStatCard{position:relative!important;inset:auto!important;width:auto!important;min-width:0!important;height:58px!important;border-radius:14px!important}
  body.pe-v10-header .statsHud>.peGpsStatCard{display:grid!important}
  body.pe-v10-header .statsHud>.statCard strong{font-size:12px!important}
  body.pe-v10-header[data-pe-page="map"] #map,
  body.pe-v10-header[data-pe-page="map"] .worldShade,
  body.pe-v10-header[data-pe-page="map"] .scanGlow,
  body.pe-v10-header[data-pe-page="buy"] #map,
  body.pe-v10-header[data-pe-page="buy"] .worldShade,
  body.pe-v10-header[data-pe-page="buy"] .scanGlow{top:calc(72px + env(safe-area-inset-top,0px))!important}
}

@media (prefers-reduced-motion:reduce){
  body.pe-v10-header .brandChip.pePlayerCard::before,
  body.pe-v10-header .pe10LiveDot{animation:none!important}
}
