
* {
    box-sizing: border-box;
}
body {
    display: flex;
    flex-flow: row wrap;
    margin: 0 auto;
    padding: 0;
    width: 11in;
    gap: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
main#sign {
    width: 11in;
    height: 8.5in;
    position: relative;
}
#background {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}
#image-region {
    width: auto;
    height: auto;
    list-style-type: none;
    padding: 0;
    text-align: center;
    position: absolute;
    z-index: 9;
}

#image-region .row {
    width: 100%;
}

.row-2 {
    display: inline-block;
}

#image-region .row:empty {
    display: none;
}

#image-region span {
    display: block;
    float: left;
    margin: 0;
    max-height: 100%;
    max-width: 100%;
    height: 100%;
    position: relative;
    z-index: 0;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}

#image-region.children-1 span {
    width: 100%;
}
#image-region.children-2 span {
    width: 50%;
}
#image-region.children-3 span {
    width: 33%;
}
#image-region.children-4 span,
#image-region.children-5 span,
#image-region.children-6 span,
#image-region.children-7 span,
#image-region.children-8 span {
    width: 25%;
}

#image-region.children-5 .row-2 span {
    width: 100%;
}
#image-region.children-6 .row-2 span {
    width: 50%;
}
#image-region.children-7 .row-2 span {
    width: 33%;
}
#image-region.children-8 .row-2 span {
    width: 25%;
}


#image-menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-flow: row wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
#image-menu li {
    width: 10rem;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer
}
#image-menu li:hover {
    border: 1px dashed;
}
#image-menu li[data-chosen='true'] {
    border: 1px dashed;
    position: relative;
    z-index: 0;
}
#image-menu li[data-chosen='true']:after {
    content: '✓';
    position: absolute;
    display: block;
    z-index: 9;
    width: 2rem;
    height: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    font-size: 1.5rem;
    border: 1px solid;
    top: .5rem;
    left: .5rem;
}
#image-menu li img {
    width: 100%;
    height: auto;
}

#image-menu.children-8 li[data-chosen="false"] {
    cursor: not-allowed;
    opacity: .5;
}

@page {
    margin: 0;
    padding: 0;
    size: 11in 8.5in;
}
aside {
    padding: 1rem;
    border: 1px solid;
    border-radius: 2px;
}
fieldset {
    padding: 1rem;
    border: 1px solid;
    border-radius: 2px;
}
button {
    border: 1px solid;
    padding: 0.5rem;
    border-radius: 2px;
    font: inherit;
    background: none;
    cursor: pointer;
    margin: 0;
}

.instruction {
    display: block;
    margin-bottom: 1rem;
}
.instruction .number {
    padding-right: .5rem;
    display: inline-block;
    font-weight: bold;
}
@media print {
    body {
        display: block;
    }
    aside {
        display: none;
    }
    main#sign {
        width: 11in;
        height: 8.5in;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
    }
}

@media screen {
    body {
        padding-bottom: 1rem;
    }
    main#sign {
        box-shadow: 0.5rem 0.5rem 1rem rgba(0, 0, 0, .5);
    }
}