.ice-cream-page #entirePage {
  position: relative;
  overflow-x: clip;
}

.ice-cream-page #page-header { min-height: 150px; }
.ice-cream-page #page-header .logo { top: 0; left: 0; z-index: 2; }

.ice-cream-main {
  position: relative;
  max-width: 1048px;
  margin: -60px auto 0;
  padding: 0 12px 12px;
}

.ice-cream-main .compPageTitle {
  position: relative;
  top: auto;
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.2;
}

#ice-cream-game {
  position: relative;
  font-family: Arial, sans-serif;
  color: #604a37;
  background: #f7efdf;
  border-radius: 12px;
  overflow: hidden;
}

/* Keep the scene measurable for sizing, but never paint partially loaded art. */
#ice-cream-game[data-load-state]:not([data-load-state="ready"]) > :not(#ice-cream-loader),
#ice-cream-game[data-load-state]:not([data-load-state="ready"]) > :not(#ice-cream-loader) * {
  visibility: hidden !important;
}
#ice-cream-game #layout-status { display: none; }
#ice-cream-loader {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: #f7efdf;
  color: #604a37;
  text-align: center;
  font-size: 22px;
}
#ice-cream-loader[hidden], #ice-cream-retry[hidden] { display: none; }
#ice-cream-loading-label { margin: 0; }
.ice-cream-spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #dce6cd;
  border-top-color: #4f805f;
  border-radius: 50%;
  animation: ice-cream-spin 1s linear infinite;
}
#ice-cream-retry {
  border: 0;
  border-radius: 10px;
  padding: 10px 24px;
  background: #4f805f;
  color: white;
  font: inherit;
  cursor: pointer;
}
#ice-cream-game[data-load-state="error"] .ice-cream-spinner { display: none; }
@keyframes ice-cream-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ice-cream-spinner { animation: none; }
}

#layout [data-element=panda_v1] { visibility: hidden !important; }
#ice-cream-mobile-nav { display: none; }

/* Reserve the first screen for the desktop game; the footer follows on scroll. */
.ice-cream-page:not(.ice-cream-mobile) #entirePage {
  min-height: 100vh;
  min-height: 100dvh;
}
.ice-cream-page:not(.ice-cream-mobile) #ice-cream-game {
  width: var(--ice-cream-fit-width, 100%);
  max-width: 100%;
  margin-inline: auto;
}
.ice-cream-page:not(.ice-cream-mobile) #footer { padding-bottom: 20px; }
.ice-cream-page:not(.ice-cream-mobile) #policiyAlert {
  position: relative;
  bottom: auto;
  height: auto;
  min-height: 70px;
  margin-top: 16px;
  text-align: start;
}

.ice-cream-mobile #ice-cream-mobile-nav { display: block; }
.ice-cream-mobile #page-header,
.ice-cream-mobile #blueHeadBg { display: none; }
.ice-cream-mobile .ice-cream-main {
  margin: 0 auto;
  padding: 8px 0 0;
}
.ice-cream-mobile .compPageTitle { font-size: 22px; }
.ice-cream-mobile #ice-cream-game { border-radius: 0; }
.ice-cream-mobile .m4k-mobile-menu {
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
