@layer base {
  body {
    display: grid;
    grid-template-rows: auto 1fr auto 9em;

    &.public {
      grid-template-rows: auto 1fr auto;
    }
  }

  :where(#main) {
    inline-size: 100dvw;
    margin-inline: auto;
    max-inline-size: 100dvw;
    padding-inline: var(--main-padding);
    text-align: center;
  }

  :where(#footer) {
    max-inline-size: 100dvw;
  }

  :where(#header) {
    position: relative;
    z-index: var(--z-nav);
  }

  :is(#header, #footer) {
    @media print {
      display: none;
    }
  }
}
