:root {
    --primary: #3b61ab;
    --primary-darken: #28385e;
    --primary-lighten: #94a1cf;
    --default-space: .3rem;
    --primary-text-contrast: #fff;
    --neutral-light: #ebecec;
    --neutral-medium: #aeadad;
    --background-color-light: #fbfbff;
    --text-color-light: #171414;
    --border-radius: 4px;
    --font-size: 17px;
    --success: #61ab3c;
    --error: #ab3c61;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
}

body {
    line-height: 1.4;
    margin: 0 auto;
    text-rendering: optimizeSpeed;
    font-size: var(--font-size);
}

header {
    background: var(--neutral-light);
    margin: 0 auto;
    text-align: center;
    color: #fff;
    padding: 1rem;

    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    align-content: center;

    h1,
    img {
        display: block;
        flex-grow: 0;
        flex-shrink: 1;
        flex-basis: auto;
        align-self: auto;
        order: 0;
        color: #3b61ab;
        max-height: 20vh;
    }

    h1 {
        text-shadow: 2px 2px 3px #999;
    }
}

.notice {
    text-align: center;
    background: var(--neutral-light);
    line-height: 3rem;
    border-radius: var(--border-radius);
}

table {
    border-collapse: collapse;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    line-height: 1.1rem;

    overflow: hidden;
}

table,
th,
td {
    border: 1px solid var(--primary-darken);
}

td,
th {
    word-wrap: break-word;
    white-space: normal;
}

th {
    padding: calc(var(--default-space)*2);
    background-color: var(--primary-lighten);
    color: var(--text-color-light);
    font-size: 1.1rem;
    text-align: left;
}

td {
    padding: var(--default-space);
}

form {
    width: 75%;
    margin: 0 auto;

    [type="reset"],
    [type="submit"],
    button,
    .button {
        margin: var(--default-space) 0;
    }
}

/*@media (max-width: 1480px) {*/
@media (max-width: 768px) {
    form {
        width: 98%;
    }
}

fieldset {
    border: 1px solid var(--neutral-medium);
    border-radius: var(--border-radius);
    margin-bottom: calc(var(--default-space) *3);
}

legend {
    color: var(--primary);
}

label {
    display: block;
    margin: var(--default-space) 0;
    font-weight: 700;
}

input,
select {
    background-color: var(--background-color-light);
    color: var(--text-color-light);
    border: 1px solid var(--primary);
    border-radius: var(--border-radius);
    width: 100%;
    height: 2.5rem;
}

select {
    margin: 0;
}

[type="reset"],
[type="submit"],
button {
    padding: var(--default-space) calc(var(--default-space)*2);
    border-radius: var(--border-radius);
    text-decoration: none !important;
    text-decoration-thickness: 0;
    text-align: center;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    transition: .4s;
    line-height: normal;
    font-weight: bold;
}

[type="reset"]:hover,
[type="submit"]:hover,
button:hover {
    box-shadow: rgba(66, 9, 9, 0.25) 0px 4px 8px -2px, rgba(66, 9, 9, 0.08) 0px 0px 0px 1px;
}

[type="checkbox"],
[type="radio"] {
    width: var(--font-size);
    height: var(--font-size);
    vertical-align: text-top;
}

[type="submit"] {
    background-color: var(--success);
    border: 1px solid #7dcc20;
}

[type="submit"]:hover {
    background-color: #7dcc20;
    border: 1px solid #578e16;
    color: #000;
}

[type="reset"],
.btn-reset {
    background-color: var(--error);
    border: 1px solid #c43933;
    color: #fff;
}

[type="reset"]:hover,
.btn-reset {
    background-color: #c43933;
    border: 1px solid #cf605b;
}

.required {
    color: red;
    font-size: 1.3rem;
    font-weight: 700;
}

canvas {
    position: relative;
    margin: 1px 1px 1px 0;
    border: 1px solid #3a87ad;
    color: #000;
}

#saveSignature {
    display: none;
}

.flex {
    display: flex;
    gap: var(--default-space);

    div {
        position: relative;
        flex: 0 0 50%;
        max-width: 50%;
        margin: var(--default-space) 0;
    }
}

/*@media (max-width: 1480px) {*/
@media (max-width: 768px) {
    .flex {
        display: block;
    }

    div {
        max-width: 99%;
        min-width: 99%;
    }
}

.home {
    margin: 0 auto;
    text-align: center;
    max-width: 50vw;
}