:root {
    color-scheme: light;
    font-family: "Yu Gothic", "Meiryo", sans-serif;
}

body {
    margin: 0;
    background: #f5f7fa;
    color: #172033;
}

main {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    box-sizing: border-box;
}

.card {
    width: min(420px, 100%);
    background: white;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    padding: 28px;
    box-sizing: border-box;
    box-shadow: 0 8px 30px #14213d18;
}

.card-wide {
    width: min(520px, 100%);
}

h1 {
    margin: 0 0 8px;
    font-size: 1.55rem;
}

.note {
    margin: 0 0 22px;
    color: #526072;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    font-weight: 700;
    font-size: .9rem;
}

input {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #aeb8c7;
    border-radius: 6px;
    font: inherit;
}

input:focus,
button:focus,
.primary-link:focus {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

button {
    width: 100%;
    min-height: 44px;
    margin-top: 22px;
    padding: 11px;
    border: 0;
    border-radius: 6px;
    background: #2457d6;
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.error {
    margin: 16px 0 0;
    padding: 10px;
    border-radius: 6px;
    background: #fff0f0;
    color: #8b1111;
}

.separator {
    margin: 18px 0 4px;
    text-align: center;
    color: #526072;
}

.qr-code {
    display: block;
    width: 228px;
    height: 228px;
    margin: 18px auto;
    image-rendering: pixelated;
}

.registration-key {
    margin: 18px 0;
}

.registration-key dt {
    font-weight: 700;
}

.registration-key dd {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
    font-family: ui-monospace, "Cascadia Mono", monospace;
}

.recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.recovery-codes li {
    padding: 10px;
    border: 1px solid #aeb8c7;
    border-radius: 6px;
    text-align: center;
}

.primary-link {
    display: block;
    min-height: 44px;
    box-sizing: border-box;
    padding: 11px;
    border-radius: 6px;
    background: #2457d6;
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 520px) {
    .recovery-codes {
        grid-template-columns: 1fr;
    }
}

.success {
    margin: 16px 0 0;
    padding: 10px;
    border-radius: 6px;
    background: #e4f7e9;
    color: #1f6330;
}
