/**
 * Sky mode — hide merged Stitch legacy chrome that fights mockup v2.
 * Load after screen CSS bundles.
 */
body.poxy-sky-app-active {
  background: var(--bg) !important;
  color: var(--text) !important;
}

body.poxy-sky-app-active.dark-club,
body.poxy-sky-app-active.ranks-tab-active {
  background: var(--bg) !important;
}

body.poxy-sky-app-active #huntPage,
body.poxy-sky-app-active #huntPage .poxy-stitch-dash,
body.poxy-sky-app-active #huntPage .st-spa-viewport,
body.poxy-sky-app-active .st-spa-panel {
  background: transparent !important;
  background-image: none !important;
  animation: none !important;
}

/* Collections — mockup drop grid only, no rarity tier stack / PX leaderboard aside */
body.poxy-sky-app-active #stPanelTierList .rarity-page-layout {
  display: none !important;
}

body.poxy-sky-app-active #stPanelTierList .rarity-page {
  padding: 0 !important;
  max-width: none !important;
}

/* Community — Sky feed shell, not POXY CLUB lock screen */
body.poxy-sky-app-active #stPanelClub #clubPage {
  display: none !important;
}

body.poxy-sky-app-active #stPanelClub .poxy-club-page.visible {
  display: none !important;
}

/* Levels — hide legacy global ranks podium if ranks tab is opened */
body.poxy-sky-app-active #stPanelRanks .ranks-hero,
body.poxy-sky-app-active #stPanelRanks .ranks-podium-wrap,
body.poxy-sky-app-active #stPanelRanks .ranks-body-grid,
body.poxy-sky-app-active #stPanelRanks .ranks-page-toggle,
body.poxy-sky-app-active #stPanelRanks #pxSkyLvlHead {
  display: none !important;
}

body.poxy-sky-app-active #stPanelLevels {
  background: transparent !important;
}

/* Legacy topbar chrome (if any stray nodes remain) */
body.poxy-sky-app-active #pxSkyTopbar .st-xp-hud,
body.poxy-sky-app-active #pxSkyTopbar .st-wallet-capsule,
body.poxy-sky-app-active #pxSkyTopbar #stNavSupport,
body.poxy-sky-app-active #pxSkyTopbar #stNavGrid {
  display: none !important;
}

/* Neutralize pink Stitch surfaces inside Sky stage */
body.poxy-sky-app-active .poxy-stitch-dash {
  background: transparent !important;
  background-image: none !important;
}

body.poxy-sky-app-active .rarity-page,
body.poxy-sky-app-active .ranks-page,
body.poxy-sky-app-active .poxy-club-page {
  font-family: var(--px-font, var(--font)) !important;
}

/* Secondary SPA panels copied from pre-Sky pages */
body.poxy-sky-app-active #stPanelExplore,
body.poxy-sky-app-active #stPanelGens,
body.poxy-sky-app-active #stPanelFriends,
body.poxy-sky-app-active #stPanelNews {
  background: transparent !important;
}

body.poxy-sky-app-active .poxy-explore-page,
body.poxy-sky-app-active .poxy-news-page,
body.poxy-sky-app-active .poxy-gens-page,
body.poxy-sky-app-active .poxy-friends-page {
  background: transparent !important;
  color: var(--text) !important;
  font-family: var(--px-font, var(--font)) !important;
}

body.poxy-sky-app-active #stPanelExplore {
  background: transparent !important;
}

/* Profile / settings — hide Stitch ambient blobs */
body.poxy-sky-app-active .idhub-blob,
body.poxy-sky-app-active .poxy-profile-ambient,
body.poxy-sky-app-active .nl-glow {
  display: none !important;
}

body.poxy-sky-app-active #profilePage.visible,
body.poxy-sky-app-active #settingsPage.visible {
  background: transparent !important;
  color: var(--text) !important;
}

/* Kill global Stitch accent leaks in Sky mode */
body.poxy-sky-app-active [style*="#050506"] {
  /* inline legacy hooks in unmigrated panels */
}

body.poxy-sky-app-active #stPanelDashboard .st-main {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.poxy-sky-app-active #stPanelDashboard .st-bottom,
body.poxy-sky-app-active #stPanelDashboard .px-legacy-dash {
  display: none !important;
}

body.poxy-sky-app-active #huntPage .st-spa-viewport,
body.poxy-sky-app-active #huntPage .poxy-stitch-dash {
  padding: 0 !important;
  margin: 0 !important;
}

body.poxy-sky-app-active #pxSkyStage > .page.visible {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Collection route — hunt dashboard must not reserve viewport height (loads after runtime.css) */
body.poxy-sky-app-active.poxy-sky-collection-active #huntPage,
body.poxy-sky-app-active.poxy-sky-collection-active #pxSkyStage > #huntPage {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.poxy-sky-app-active.poxy-sky-collection-active #pxSkyStage {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  padding-top: 0 !important;
}

body.poxy-sky-app-active.poxy-sky-collection-active #pxSkyMain {
  overflow: auto !important;
}

body.poxy-sky-app-active.poxy-sky-collection-active #collectionPage.visible {
  display: block !important;
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-top: 0 !important;
  min-height: 0 !important;
}

body.poxy-sky-app-active.poxy-sky-collection-active #pxSkyStage > .page:not(#collectionPage),
body.poxy-sky-app-active.poxy-sky-collection-active #pxSkyStage > #clubPage,
body.poxy-sky-app-active.poxy-sky-collection-active #pxSkyStage > .club-page {
  display: none !important;
}

/* Profile / Settings — hunt dashboard must not reserve height above page */
body.poxy-sky-app-active.poxy-sky-profile-active #huntPage,
body.poxy-sky-app-active.poxy-sky-profile-active #pxSkyStage > #huntPage,
body.poxy-sky-app-active.poxy-sky-settings-active #huntPage,
body.poxy-sky-app-active.poxy-sky-settings-active #pxSkyStage > #huntPage,
body.poxy-sky-app-active #pxSkyStage:has(#profilePage.visible) > #huntPage,
body.poxy-sky-app-active #pxSkyStage:has(#settingsPage.visible) > #huntPage {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.poxy-sky-app-active.poxy-sky-profile-active #pxSkyStage,
body.poxy-sky-app-active.poxy-sky-settings-active #pxSkyStage,
body.poxy-sky-app-active #pxSkyStage:has(#profilePage.visible),
body.poxy-sky-app-active #pxSkyStage:has(#settingsPage.visible) {
  min-height: 0 !important;
  height: auto !important;
  padding-top: 0 !important;
}

body.poxy-sky-app-active.poxy-sky-profile-active #pxSkyMain,
body.poxy-sky-app-active.poxy-sky-settings-active #pxSkyMain {
  overflow: auto !important;
}

body.poxy-sky-app-active.poxy-sky-profile-active #profilePage.visible,
body.poxy-sky-app-active.poxy-sky-settings-active #settingsPage.visible,
body.poxy-sky-app-active #profilePage.visible,
body.poxy-sky-app-active #settingsPage.visible {
  position: relative !important;
  top: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.poxy-sky-app-active #userBar,
body.poxy-sky-app-active #userBar.psd-user-active {
  display: none !important;
}

/* Load last — wins over legacy modal CSS loaded above */

body.poxy-sky-app-active .material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}
