html,
body {
    margin: 0;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
}

html {
    background-color: #dedede;
    height: 100%;
}

main,
header,
footer {
    background-color: transparent;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 25vh;
    max-height: 250px;
}

footer {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
    font-size: 0.85em;
}

main {
    position: fixed;
    top: 0;
    margin: 0;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

form {
    margin: 21vh auto 150px auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: stretch;
    gap: 0.8em;
    max-width: 800px;
    min-height: 20em;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 5px 10px 10px;
    background-color: white;
    box-shadow: 0 0 4px #666;
}

form>* {
    margin: 0;
    padding: 0 5px 0 0;
    display: none;
    flex: 1 0 100%;
    box-sizing: border-box;
}

form>div {
    display: flex;
    flex-direction: column;
    justify-content: end;
}

form>div>* {
    display: block;
}

.header-text {
    font-weight: normal;
}

label,
input[type="radio"],
input[type="checkbox"] {
    cursor: pointer;
    display: block;
}

label>input[type="checkbox"] {
    display: inline;
}

textarea {
    border: none;
    border-left: 1px solid grey;
    font-family: inherit;
    font-size: inherit;
    background-color: #f1f1f1;
    padding: 5px;
    resize: vertical;
}

textarea::placeholder {
    color: #bbb;
}

button {
    font-weight: bold;
    justify-self: start;
    margin-top: 10px;
    box-sizing: border-box;
    padding: 5px;
    font-size: inherit;
    border: 5px solid #eee;
    background-color: #eee;
    color: #555;
    transition: color 0.1s ease-in-out, border-color 0.1s ease-in-out;
    cursor: pointer;
}

button:hover {
    border-right-color: #ddd;
    border-left-color: #ddd;
    color: black;
}

select {
    font-size: 0.9em;
    -moz-appearance: none;
    -webkit-appearance: none;
    border: none;
    padding: 5px;
    background-color: #f1f1f1;
    width: 100%;
    cursor: pointer;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.3em;
    margin-left: -0.6em;
    margin-top: -0.3em;
    border-width: 0.6em;
    border-style: solid;
    border-color: #aaa transparent transparent transparent;
    pointer-events: none;
}

.date-select {
    display: flex;
    max-width: 15em;
}

.date-select>* {
    margin-right: 0.2em;
    flex: 3 0 3em;
}

.date-select>:last-child {
    margin-right: 0;
}

.error-required {
    border-left: 1px solid red;
}

.notice,
.error {
    width: 100%;
    justify-content: center;
    text-align: center;
}

@media screen and (min-width: 500px) {
    .many {
        column-count: 2;
    }
}

@media screen and (min-width: 750px) {
    .many {
        column-count: 3;
    }
}

h3 {
    margin-top: 1em;
}

h4 {
    margin-top: 1em;
    margin-bottom: 0.6em;
}

h4+p {
    font-size: 0.8em;
    margin-top: 0;
}


/* Table */

.input-table {
    display: grid;
    gap: 0.8em;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
}

.input-table>* {
    padding: 0.1em;
}

.table-header {
    border-bottom: 1px solid grey;
}

.table-1 {
    grid-template-columns: auto 1fr;
}

.table-2 {
    grid-template-columns: auto 1fr 1fr;
}

.table-3 {
    grid-template-columns: auto 1fr 1fr 1fr;
}

.table-4 {
    grid-template-columns: auto 1fr 1fr 1fr 1fr;
}

.table-5 {
    grid-template-columns: auto 1fr 1fr 1fr 1fr 1fr;
}

.table-6 {
    grid-template-columns: auto 1fr 1fr 1fr 1fr 1fr 1fr;
}

.error.browser-error {
    display: block;
    text-align: left;
}

@supports (display: grid) {
    form>* {
        display: initial;
    }
    .browser-error {
        display: none !important;
    }
}