.ad-space {
  min-height: 110px;
  margin-top: 45px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.ad-space > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .15em;
}

/* During play the ad becomes a compact banner over the otherwise unused
   bottom-centre area, similar to the familiar in-game banner placement. */
.game-active .ad-space {
  position: fixed;
  inset: auto auto max(12px, env(safe-area-inset-bottom)) 50%;
  z-index: 19;
  display: none;
  width: auto;
  max-width: calc(100vw - 24px);
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 4px 6px 6px;
  flex-direction: column;
  justify-content: center;
  transform: translateX(-50%);
  background: #f5f5edf2;
  border: 1px solid #ffffffa8;
  border-radius: 9px;
  box-shadow: 0 5px 24px #0004;
}
.game-active.gameplay-ad-visible .ad-space { display: flex; }
.game-active .ad-space > span { margin-bottom: 3px; }
.game-active .adsbygoogle { margin-inline: auto; }
@media (max-width:640px) {
  .game-active.gameplay-ad-visible:not(.guess-map-open) .ad-space {
    bottom:max(74px,calc(62px + env(safe-area-inset-bottom)));
    left:max(8px,env(safe-area-inset-left));
    max-width:320px;
    padding:3px 0;
    transform:none;
    border-radius:8px;
  }
  .game-active.gameplay-ad-visible.guess-map-open .ad-space { display:none; }
  .game-active .ad-space > span { display:none; }
  .game-active .skg_ingame_ad { width:320px !important; height:50px !important; }
}
@media (max-width:340px) {
  .game-active.gameplay-ad-visible .ad-space { display:none; }
}
