/* Zamunda.Games — common content rails.
 * Keep the original header's 80rem outer box / 1rem gutters as the reference.
 * Scope to the theme's outer shells; never resize nested cards or game iframes.
 */
:root {
    --zg-content-max: 78rem;
    --zg-content-gutter: 1rem;
    --zg-shell-max: calc(var(--zg-content-max) + 2 * var(--zg-content-gutter));
}

/* Shells that carry their own gutters: navigation, standard page/hero,
 * categories on the homepage, normal game pages, footer and Motion Arcade.
 */
.zg-site-nav > .max-w-7xl,
main > .max-w-7xl.px-4,
main > section > .max-w-7xl.px-4,
footer > .max-w-7xl.px-4,
.zg-ma-section > .zg-ma-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--zg-shell-max);
    margin-inline: auto;
    padding-inline: var(--zg-content-gutter);
}

/* Catalogue sections already have gutters on the section itself.
 * Remove the second set of gutters on the homepage leaderboard strip.
 */
main > section.px-4:has(> .max-w-7xl),
main > .zg-home-lb-section {
    padding-inline: var(--zg-content-gutter);
}
main > section.px-4 > .max-w-7xl,
main > .zg-home-lb-section > .max-w-7xl.px-4 {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--zg-content-max);
    margin-inline: auto;
    padding-inline: 0;
}

/* Both Global and Motion Arcade leaderboards use an unpadded shell. */
.zg-lb-page .zg-lb-shell {
    box-sizing: border-box;
    width: min(var(--zg-content-max), calc(100% - 2 * var(--zg-content-gutter)));
    margin-inline: auto;
}
