/* Typing Racer 2.0 pages' own ad units (owner, 2026-11-29): History, Standings and the Garage. The units come from
   getAd() in functions/general.php ("racerBand", "racerRail", "racerStage"); this sheet gives each one an exact size
   per screen width. The box here is what AdSense is asked for: a unit this sheet hides (no room) has no width and is
   never requested, and one AdSense can't fill folds away. The same rules as /leaderboards.

   band   (History H1 under Today; Standings S1 above the Hall of Speed and S2 under it; Garage G2 under the items)
          728x90 from 860px wide, 320x50 from 340px, none below
   rail   (History, Standings) right of the 1100px card: 160x600 from 1480px, 300x600 from 1760px. Sticky, under
          AdSense's rules for sticky ads: 300px wide or less, desktop only (a mouse, not touch), the whole ad in view
          (only where the window is 820px tall or more), and the only sticky ad on the page. It sticks 64px down,
          under the site menu when that slides in, and only inside its track, which is as tall as the card.
   stage  (Garage G3) a 728x90 at the top of the car stage, over the road above the car, from 1000px wide. It sits in
          the strip of the stage that slides away as the stage shrinks (--gx-shrink, my-garage.php), so it is in view
          when the garage opens and scrolls away like the page; it is never pinned (a pinned ad has to be 300px or
          narrower and wholly in view, and the pinned part of the stage is too short for that). */
.rcAd{margin:0; padding:0; box-sizing:border-box; flex:none;}

/* band */
.rcAdRow{display:flex; justify-content:center; margin:16px 0 18px;}
.rcAdBand{display:none;}
@media only screen and (min-width:340px){
	.rcAdBand, .rcAdBand .adsbygoogle{display:block; width:320px; height:50px;}
}
@media only screen and (min-width:860px){
	.rcAdBand, .rcAdBand .adsbygoogle{width:728px; height:90px;}
}
.rcAdRow:has(ins[data-ad-status="unfilled"]){display:none;}
/* the garage on a phone turned sideways (500px tall or less): the items are a column on the right (my-garage.php),
   so G2 goes under them, at the small size */
@media only screen and (max-height:500px) and (min-width:560px){
	#garage > .rcAdRow{grid-column:2; margin:0 0 14px;}
	#garage .rcAdBand, #garage .rcAdBand .adsbygoogle{width:320px; height:50px;}
}

/* rail */
.rcRailTrack{display:none;}
@media only screen and (min-width:1480px){
	.rcHasRail{position:relative; min-height:600px;}		/* a short card still has room for the rail, so it never hangs over the footer */
	.rcRailTrack{display:block; position:absolute; top:0; bottom:0; left:calc(100% + 20px); width:160px; margin:0;}
	.rcAdRail, .rcAdRail .adsbygoogle{display:block; width:160px; height:600px;}
}
@media only screen and (min-width:1760px){
	.rcRailTrack, .rcAdRail, .rcAdRail .adsbygoogle{width:300px;}
}
@media only screen and (min-width:1480px) and (min-height:820px) and (hover:hover) and (pointer:fine){
	.rcAdRail{position:sticky; top:64px;}
}
.rcAdRail:has(ins[data-ad-status="unfilled"]){visibility:hidden;}

/* stage */
.rcAdStage{display:none;}
@media only screen and (min-width:1000px) and (min-height:501px){		/* (500px tall or less the stage is a column at the side, my-garage.php) */
	#gxStage .rcAdStage{display:block; position:absolute; z-index:4; left:calc(50% - 364px); top:4px; width:728px; height:90px;}
	#gxStage .rcAdStage .adsbygoogle{display:block; width:728px; height:90px;}
	#gxStage:has(> .rcAdStage) .gxGhost{visibility:hidden;}		/* the car's name, drawn big and faint behind the road: the ad would sit half over it */
	#gxStage:has(> .rcAdStage ins[data-ad-status="unfilled"]) .gxGhost{visibility:visible;}
}
#gxStage .rcAdStage:has(ins[data-ad-status="unfilled"]){display:none;}
