/* Keep the raw homepage DOM from flashing before the feature-card enhancer runs. */
#homeSection .challenge-section {
  display: none !important;
}

html:not(.home-features-ready) #homeSection .game-grid {
  visibility: hidden;
}

/* When a dedicated challenge page routes into a game, target the game section
   immediately so the static homepage cannot paint before the core app opens it. */
html:has(#gameSection:target) #homeSection {
  display: none !important;
}

.game-ad-slot {
  margin: 34px 0 18px;
  padding: 0;
}

.game-ad-label {
  display: block;
  margin: 0 0 8px 2px;
  color: rgba(255,255,255,.34);
  font-size: 9px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.game-ad-placeholder {
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(141,100,255,.055), transparent 52%),
    rgba(255,255,255,.018);
  color: rgba(255,255,255,.30);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

@media (max-width: 760px) {
  .game-ad-slot {
    margin: 28px 0 16px;
  }

  .game-ad-placeholder {
    min-height: 78px;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 10px;
  }
}
