/* Keep every game effect inside its original viewport, even when the page
   scrolls to the banner. Layout containment also scopes fixed descendants. */
:root { --game-viewport-height: var(--viewport-height, 100vh); }
body { overflow-x: hidden; overflow-y: auto; }
.game-shell {
  position: relative;
  height: var(--viewport-height, 100vh);
  contain: layout paint;
  isolation: isolate;
}
/* Google's game-page guidance recommends at least 150px from the game. */
.ad-section { padding: 150px 16px 0; background: #19171f; }
body[data-banner-state='unfilled'] .ad-section,
body[data-banner-state='blocked'] .ad-section,
body[data-banner-state='disabled'] .ad-section { display: none; }
.ad-banner { width: min(970px, 100%); margin: 0 auto; }
.ad-label {
  margin: 0 0 10px;
  color: #b9b5c3;
  font: 11px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center;
}
#gacha-banner { display: block; width: 100%; height: 90px; }
.site-footer {
  padding: 28px 16px max(24px, env(safe-area-inset-bottom, 0px));
  color: #b9b5c3;
  font: 12px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center;
}
.site-footer a { text-underline-offset: 3px; }
.game-information {
  width: min(970px, calc(100% - 40px));
  margin: 0 auto;
  padding: 12px 0;
  color: #ece9f1;
  font: 15px/1.8 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.game-information h2 { font-size: clamp(24px, 4vw, 32px); line-height: 1.3; }
.game-information h3 { margin: 30px 0 8px; font-size: 20px; }
.game-information p { margin: 12px 0; }
.game-information ol { padding-left: 22px; }
.game-information li { margin: 12px 0; }
.game-information a { text-underline-offset: 3px; }
#privacy-choices { display: block; margin: 16px auto 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
#privacy-choices[hidden] { display: none; }
#site-information { background: #19171f; }
#site-information .dialog-header { color: var(--ink); }
@media (max-width: 700px), (max-width: 1100px) and (max-height: 500px) {
  html, body { overflow: hidden; overscroll-behavior: none; }
  body { position: fixed; inset: 0; height: var(--viewport-height, 100dvh); }
  .game-shell { height: var(--game-viewport-height); }
  /* Keep the requested slot visible while Google decides its fill status.
     Unfilled and blocked results release all reserved game space. */
  .ad-section { position: absolute; top: var(--game-viewport-height); left: 0; right: 0; padding: 150px 12px max(6px, env(safe-area-inset-bottom, 0px)); }
  .ad-label { margin-bottom: 6px; }
  #gacha-banner { height: 50px; }
  body:is([data-banner-state='pending'], [data-banner-state='filled']) { --game-viewport-height: calc(var(--viewport-height, 100dvh) - 150px - 72px - max(6px, env(safe-area-inset-bottom, 0px))); }
  #site-information { max-height: calc(var(--viewport-height, 100dvh) - var(--app-top) - var(--app-bottom) - 12px); }
}
/* A short landscape viewport cannot fit a playable game, the 150px separation
   and a banner together. Keep the game full height while a pending/filled ad
   is below it. The guide remains inside its explicit dialog. */
@media (max-height: 600px) and (max-width: 1100px) {
  html:has(body:is([data-banner-state='pending'], [data-banner-state='filled'])), body:is([data-banner-state='pending'], [data-banner-state='filled']) { overflow-y: auto; }
  body:is([data-banner-state='pending'], [data-banner-state='filled']) { position: relative; height: auto; min-height: var(--viewport-height, 100dvh); --game-viewport-height: var(--viewport-height, 100dvh); }
  body:is([data-banner-state='pending'], [data-banner-state='filled']) .ad-section { position: relative; top: auto; }
}
