/* ── Ad banners (opt-in) ─────────────────────────────────────────────────────
   Containers ship hidden; modules/ads.js adds body.ads-on ONLY when a real
   AdSense config is present (never in dev/offline/tests). Dimensions are
   reserved up-front so the ad fill causes no layout shift. */

#ad-footer,
#ad-rail {
  display: none;
}

/* Horizontal banner under the #main row (desktop) / end of flow (mobile). */
body.ads-on #ad-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 90px;
  overflow: hidden;
  border-top: 1px solid var(--border);
}

/* Vertical rail in the left margin of the game column — wide screens only. */
body.ads-on #ad-rail {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: none;
  width: 160px;
  min-width: 160px;
  padding-top: 28px;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

@media (max-width: 1279px) {
  body.ads-on #ad-rail { display: none; }
}

@media (max-width: 720px) {
  body.ads-on #ad-footer { height: 60px; }
}
