:root {
    color-scheme: light dark;
    font-family: system-ui, sans-serif;
    line-height: 1.5;
}

body {
    max-width: 32rem;
    margin: 2rem auto;
    padding: 0 1rem;
}

h2 {
    font-size: 1.1rem;
    margin-top: 2rem;
}

button, input {
    font: inherit;
}

button {
    padding: .25rem .75rem;
    cursor: pointer;
}

.row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    margin: .5rem 0;
}

.row label {
    width: 1.75rem;
}

.row label:first-child {
    text-align: right;
}

.row input {
    width: 2.5rem;
    padding: .2rem;
    text-align: center;
}

[id^="cast"] {
    margin: 0 0 1rem;
    font-size: .9rem;
    text-align: center;
}

#clear {
    display: block;
    margin: 0 auto;
}

#warn {
    color: #d33;
}

@media (prefers-color-scheme: dark) {
    :root {
        background: #242424;
        color: #ddd;
    }

    #warn {
        color: #f66;
    }
}

#out {
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: .3rem .5rem;
    text-align: left;
    border-bottom: 1px solid #8884;
}

#ask-options button {
    margin: 0 .5rem .5rem 0;
}

#final {
    font-size: 1.25rem;
}

summary {
    cursor: pointer;
}
