.greeting {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 var(--gutter) var(--page-bottom);
}

/* Phones: the greeting starts at the usual distance below the top, like every other page (not centred in the
   screen, which would put it at an arbitrary height off the grid) */
@media screen and (max-width: 760px) {
    .greeting {
        box-sizing: border-box;  /* the padding counts towards the height */
        padding-top: 0;
    }
}

/* Greeting and animation on a panel, like the projects on the portfolio page */
.greeting_card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    margin-top: var(--page-top);
    padding: var(--panel-inset);
    box-sizing: border-box;
}

/* "Moin": the page title, from the type scale in general.css */
.greeting_card h1 {
    margin-bottom: var(--space-title);
}

@media screen and (max-width: 760px) {
    .greeting_card {
        margin-top: var(--page-top);
    }
}

/* The animation is 383px wide: on small phones it shrinks with the screen, on short
   landscape screens it shrinks with the height */
.greeting img {
    max-width: 100%;
    max-height: calc(100vh - var(--nav-height) - 200px);
    max-height: calc(100svh - var(--nav-height) - 200px);
    width: auto;
    height: auto;
}

/* build: snap - generated by build_snap.py from index.html: the sizes snapped to the 16px grid (see general.css, "Snapped to the grid"). Do not edit between these lines: run the script again after changing the page. */
@media screen and (width < 601px) {
    @container page (321px <= width < 353px) {
        main > div:nth-child(1) > div:nth-child(1) { --snap-width: 320px; }
    }
    @container page (353px <= width < 385px) {
        main > div:nth-child(1) > div:nth-child(1) { --snap-width: 352px; }
    }
    @container page (385px <= width < 417px) {
        main > div:nth-child(1) > div:nth-child(1) { --snap-width: 384px; }
    }
    @container page (417px <= width) {
        main > div:nth-child(1) > div:nth-child(1) { --snap-width: 416px; }
    }
    @container page (width < 321px) {
        main > div:nth-child(1) > div:nth-child(1) { --snap-width: 288px; }
    }
}
@media screen and (1000px <= width) {
    main > div:nth-child(1) > div:nth-child(1) { --snap-width: 448px; }
}
@media screen and (601px <= width < 761px) {
    main > div:nth-child(1) > div:nth-child(1) { --snap-width: 448px; }
}
@media screen and (761px <= width < 1000px) {
    main > div:nth-child(1) > div:nth-child(1) { --snap-width: 448px; }
}
/* /build: snap */
