.ad-banner { max-width: 1360px; margin: 0 auto; padding: 26px clamp(22px, 4vw, 56px) 10px; display: flex; justify-content: center; }
.ad-slot { width: max-content; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
[data-ad-region][hidden], .ad-slot[hidden] { display: none !important; }
.ad-slot__label { color: #66766e; font: 500 11px/1.3 "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
.ad-slot iframe { max-width: 100%; display: block; border: 1px solid #cbd4cd; background: #f0f0e9; color-scheme: light; }
.ad-inline { min-height: 300px; padding: 20px; display: grid; place-items: center; border: 1px solid #cbd4cd; background: #ebeee9; }
.ad-rail { min-width: 0; align-self: start; position: sticky; top: 24px; }
.games-section.with-ad-rail { display: grid; grid-template-columns: minmax(0, 1fr) 160px; column-gap: clamp(24px, 3vw, 44px); }
.games-section.with-ad-rail > .section-heading { grid-column: 1 / -1; }
.games-section.with-ad-rail > .game-list { min-width: 0; grid-column: 1; }
.games-section.with-ad-rail > .ad-rail { grid-column: 2; grid-row: 2; }
.legal-aside .ad-rail { margin-top: 42px; }
.legal-copy .ad-inline { margin-top: 42px; margin-bottom: 26px; }

/* Game screens keep their full viewport; the ad shelf follows the game. */
html:has(body.has-game-ads), body.has-game-ads { height: auto !important; min-height: 100% !important; overflow-x: hidden !important; overflow-y: auto !important; }
html:has(body.has-game-ads) { position: static !important; inset: auto !important; width: 100% !important; }
body.has-game-ads { position: static !important; inset: auto !important; overscroll-behavior-y: auto !important; }
body.has-game-ads #app, body.has-game-ads > main.game { position: relative !important; inset: auto !important; width: 100% !important; height: 100dvh !important; min-height: 100dvh !important; }
body.has-game-ads #app { overflow: hidden !important; }
.ad-game-section { position: relative; z-index: 100; padding: 48px 24px 64px; display: flex; flex-direction: column; align-items: center; gap: 38px; background: #1d292b; color: #e7e2d3; }
.ad-game-section__title { width: min(100%, 900px); margin: 0; padding-bottom: 12px; border-bottom: 1px solid #62716e; color: #d0d7ce; font: 500 13px/1.5 "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
.ad-game-section__pair { width: min(100%, 900px); display: flex; align-items: flex-start; justify-content: center; gap: clamp(28px, 8vw, 100px); }
.ad-game-section .ad-slot__label { color: #c5cfc7; }
.ad-game-section iframe { border-color: #71817b; }

@media (max-width: 767px) {
  .ad-banner { padding: 18px 0 2px; }
  .ad-inline { min-height: 292px; padding: 14px 0; }
  .legal-copy .ad-inline { margin-inline: -2px; }
  .ad-game-section { padding: 38px 0 52px; gap: 28px; }
  .ad-game-section__title { width: min(100% - 32px, 320px); }
  .ad-game-section__pair { width: 100%; }
}
