/* Ads on the Krillion games (see krillads.js). --ad-b is how much of the bottom of the window Google's banner covers. */
:root { --ad-b: 0px; }

/* The columns down both sides that belong to the ads. Everything a player reads or clicks stays between them, home, in play
   and on the results: use --rail for it. 0px on windows too small for side rails (Google wants 1200x650). */
:root { --rail: 0px; }
@media (min-width: 1200px) and (min-height: 650px) { :root { --rail: min(330px, calc((100vw - 840px) / 2)); } }
/* A page with <html class="no-rails"> keeps the bottom banner but never gives the sides to ads (krillads.js tells Google too) */
html.no-rails { --rail: 0px; }
html.no-rails .rail-guard { display: none; }

/* The scenes are full screen, so to Google every page looked full to the edges and no side rail ever fitted. krillads.js marks
   them as fine to overlap, and this strip, invisible and behind every button, is what keeps the rails out of the middle.
   Rails sit right against it, so it has to be wide for them to be far out. */
.rail-guard { position: fixed; top: 0; bottom: 0; left: var(--rail); right: var(--rail); z-index: 1; }
.rail-guard.in-stage { z-index: 0; }
@media (max-width: 1199px) { .rail-guard { display: none; } }

/* Google also puts a banner at the very end of the page: above the scene, and gone with the article while playing */
body > .google-auto-placed { position: relative; z-index: 15; }

/* The Everythingle tile: top middle on every Krillion game, the same size everywhere. --nav-b is where it ends, for screens
   that need to start below it. */
:root { --nav-w: clamp(150px, 14vw, 220px); --nav-b: calc(14px + var(--nav-w) * .0729 + 22px); }
@media (max-width: 720px) { :root { --nav-w: 140px; --nav-b: calc(10px + 140px * .0729 + 16px); } }
html body #siteNav:not(.site-logo), html body .kc-home { position: fixed; top: 14px; left: 0; right: 0; width: var(--nav-w); margin: 0 auto; padding: 11px 13px; box-sizing: border-box; }
@media (max-width: 720px) { html body #siteNav:not(.site-logo), html body .kc-home { top: 10px; padding: 8px 10px; } }
/* pages on ../home-button.css keep its own small tile in the page flow, already centred, below laptop width */
@media (min-width: 1001px) { html body #siteNav.site-logo { position: fixed; top: 14px; left: 0; right: 0; width: var(--nav-w); margin: 0 auto; padding: 11px 13px; box-sizing: border-box; } }
