html {
    height: 100%;
}

body {
    height: 100%;
    margin: 0;
    background: #252527;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

main {
    padding: 50px 20px;
    text-align: center;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1f2024;
    padding: 20px;
    margin-top: auto;
    text-align: center;
}

footer p {
    margin: 0;
    margin-bottom: 1px;
}

a {
    color: #d0af57;
}

section#character_grid {
    display: flex;
    flex-direction: column;
    grid-gap: 20px;
    flex-wrap: wrap;
}

.grid {
    display: flex;
    grid-gap: 10px 20px;
    flex-wrap: wrap;
    margin-right: 40px;
}

.character {
    overflow: hidden;
    width: 128px;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.5);
    cursor: pointer;
    clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
    margin-right: -40px;
    transform: scale(1);
    transition: transform 200ms ease-out;
}

.character:hover {
    transform: scale(1.1);
}

.character img {
    pointer-events: none;
}

.five {
    background: linear-gradient(180deg, #d0af57, #674515)
}

.four {
    background: linear-gradient(180deg, #9475b7, #443159)
}

dialog#sheet {
    width: 90vw;
    height: 90vh;
    max-width: max-content;
    max-height: 860px;
    border: none;
    border-radius: 10px;
    background: #252527;
    box-shadow: 0px 10px 55px 0px rgba(0,0,0,0.5);
}

#sheet_container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
}

#sheet_container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

dialog#sheet form {
    width: 100%;
    height: 100%;
    display: block;
}

dialog#sheet button[type=submit] {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: white;
    color: black;
    cursor: pointer;
    border-radius: 30px;
    font-weight: 600;
    border: 4px solid white;
}

dialog#sheet button[type=submit]:hover {
    background: red;
    color: white;
    border-color: red;
}

.grid_wrapper {
    max-width: 1000px;
    margin: 0 auto;
}