#overlay {
    background: rgba(255,255,255,.9);
    position: fixed;
    height: 100%;
    width: 100%;
    text-align: center;
    z-index: 6;
    overflow: auto;
}

.modal {
    display: none;
    background: #fff;
    border: 2px solid #555;
    padding: 5px 25px;
    text-align: left;
    margin: 25px;
    position: relative;
    max-width: 800px;
    z-index: 7;
}
#overlay.about .modal.about,
#overlay.support .modal.support,
#overlay.tutorial-icons .modal.tutorial-icons,
#overlay.preferences .modal.preferences { display: inline-block }

button.modal-top-control {
    position: absolute;
    top: 5px;
    right: 5px;
}
button.modal-top-control:hover { opacity: .6 }

.modal h2 {
    font-size: 1.1em;
    border-bottom: 1px solid #555;
    font-weight: bold;
    margin-bottom: .5em;
    letter-spacing: 0.2px;
    color: #555;
}

.modal em {
    font-style: normal;
    font-variant: small-caps;
}

.support img { 
    margin-top: 5px;
    padding: 2px;
}
.support .method-container { display: flex }
.support .col {
    flex: 1;
    display: grid;
}

.preferences-container {
    margin-bottom: 1em; /* just like p */
}
.preferences-header {
    display: flex;
    font-size: 15px;
    background-color: #777;
    color: white;
    white-space: nowrap;
    padding: 5px;
    flex: 10;
    user-select: none;
}
.preferences-header .preferences-filler { flex: 9 }
.preferences-header label { 
    cursor: pointer;
    display: inline-block;
    padding-right: 5px;
}
.preferences-header input {
    width: 18px;
    height: 18px;
    vertical-align: sub;
    margin-right: 5px;
    cursor: pointer;
}
.preferences-description {
    padding: 0 15px;
    border: 1px solid #777;
    height: 0;
    visibility: hidden;
}
.preferences-container.unfolded .preferences-description {
    height: auto;
    visibility: visible;
}

.modal-bottom-control { text-align: right }

/* modal specific */
#minresult-value { width: 40px }
#minresult-reset svg { padding: 0 }
ul.faq {
    margin: 0;
    padding-left: 20px;
}
ul.faq li:nth-child(even) {
    list-style-type: circle;
    padding-bottom: 1em;
    padding-top: .25em;
}