*,
*::before,
*::after {
    box-sizing: border-box;
    /* outline: 1px dotted magenta; */
}

:root {
    --background: 235, 221, 238;
    --color: 44, 54, 94;
}

body {
    margin: 0;
    padding: 1em;
    height: 100vh;
    height: 100svh;
    font-family: 'Inter', sans-serif;
    color: rgba(var(--color), 1);
    background-color: rgb(var(--background));
}

svg path,
svg circle {
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: 0.5s opacity ease;
}

.hidden {
    opacity: 0;
}

main {
    z-index: 1;
    height: 100%;
    width: 100%;
    display: grid;
    place-items: center;
    position: relative;
}

.post {
    display: flex;
    justify-content: center;
    align-items: center;
}

main > .container {
    display: grid;
    grid-template-columns: min-content 500px;
    gap: 1em;
    max-width: 850px;
}

aside {
    z-index: 1;
    max-width: 500px;
    width: 100%;
    display: flex;
    gap: 2em;
    flex-direction: column;
    justify-content: space-between;
}

.pop-out {
    z-index: -10;
    opacity: 0;
    position: absolute;
    inset: 0;
    display: grid;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    place-items: center;
    transition: opacity 0.2s ease;
}

.pop-out button {
    margin: 0 auto;
}

.pop-out .container {
    min-width: min(calc(100% - 2em), 275px);
    transition: opacity 0.2s ease 0.5s, transform 0.5s ease;
    text-align: center;
    background-color: rgb(var(--background));
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 1.75em;
    padding: 2.5em 2em;
    -webkit-box-shadow: 3px 4px 55px 1px rgba(var(--color), 0.23);
    -moz-box-shadow: 3px 4px 55px 1px rgba(var(--color), 0.23);
    box-shadow: 3px 4px 55px 1px rgba(var(--color), 0.23);
    transform: translateY(-20px);
    opacity: 0;
}

.pop-out.appear {
    z-index: 2;
    opacity: 1;
}

.pop-out.appear .container {
    transition: opacity 0.2s ease, transform 0.5s ease;
    transform: translateY(0px);
    opacity: 1;
}

.pop-out h1 {
    margin: 0;
}

.pop-out p {
    margin: 0;
    line-height: 2em;
    display: flex;
    flex-direction: column;
}

.pop-out strong {
    text-transform: uppercase;
    font-size: 1.2em;
    letter-spacing: 5px;
    padding-left: 5px;
}

.keyboard,
.word-bank {
    display: grid;
    grid-template-columns: repeat(auto-fit, 30px);
    grid-auto-rows: 35px;
    gap: 1em;
    justify-content: center;
}

.letter {
    display: flex;
    justify-content: center;
    padding: 0.5em 1em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(var(--color), 0.8);
    border: 1px solid currentColor;
    border-radius: 5px;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

button {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(var(--color), 0.8);
    background-color: rgb(var(--background));
    padding: 0.5em 1em;
    font-size: 1.2em;
    outline: none;
    border: 1px solid currentColor;
    border-radius: 5px;
}

.keyboard .letter,
button {
    transition: color 0.2s ease, background-color 0.2s ease;
}

button:hover,
.keyboard .letter:hover {
    background-color: rgba(var(--color), 0.8);
    color: rgba(var(--background), 1);
    cursor: pointer;
}

.keyboard .letter.disabled {
    color: rgba(var(--color), 0.2);
}

.keyboard .letter.disabled:hover {
    background-color: rgb(var(--background));
    color: rgba(var(--color), 0.2);
    cursor: default;
}

@media (max-width: 850px) {
    body {
        height: unset;
    }

    .post {
        height: 200px;
    }

    svg {
        height: 100%;
    }

    main > .container {
        grid-template-columns: 1fr;
        grid-template-rows: max-content max-content;
        width: 100%;
    }

    aside {
        justify-self: center;
    }
}
