:root {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #292638;
    background: #4b0ad1;
    color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 3px solid #8a68c7;
    outline-offset: 3px;
}
[hidden] { display: none !important; }

.page {
    min-height: 100vh;
    padding: 38px 20px 45px;
}
.card {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: #f8f9fa;
    border: 1px solid #ffffff40;
    border-radius: 22px;
    box-shadow: 0 12px 50px #26056718;
    padding: 29px 30px;
}
.card.login { margin-top: 70px; padding: 34px 30px; }
.header { margin-bottom: 25px; text-align: center; }
.login .header { margin-bottom: 30px; }
.wordmark {
    display: inline-block;
    color: #dc3545;
    font: 30px Impact, "Arial Narrow", sans-serif;
    letter-spacing: 1.2px;
    transform: scaleX(.88);
}
.details .wordmark { font-size: 34px; }
h1 { margin: 9px 0 0; font-size: 21px; font-weight: 650; letter-spacing: -.6px; }
.details h1 { font-size: 25px; font-weight: 700; }
.header p { margin: 9px 0 0; color: #615a6b; font-size: 13px; line-height: 1.7; }
.summary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 13px;
    margin-top: 14px;
    color: #51495e;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.validity, .region-tag {
    display: inline-block;
    border-radius: 20px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 650;
}
.validity, .region-tag.local { background: #edf6ef; color: #286141; }
.validity.expiring, .region-tag { background: #fff4df; color: #80520d; }
.back-form { position: absolute; top: 18px; left: 16px; }
.back, .copy {
    min-height: 40px;
    padding: 8px;
    border: 0;
    border-radius: 6px;
    color: #604976;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
}
.back:hover, .copy:hover { background: #eee7f7; }
.back span, .primary span { padding-inline: 3px; }
label, .label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.login label { font-size: 12px; }
.text-input, .credential, .region {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d4ccdf;
    background: #fff;
    color: #27212f;
    border-radius: 9px;
}
.text-input { padding: 12px 14px; font-size: 16px; }
.login .text-input { border-color: #ced4da; }
.text-input::placeholder { color: #76717b; }
.primary {
    width: 100%;
    min-height: 46px;
    margin-top: 22px;
    padding: 12px 17px;
    border: 0;
    border-radius: 9px;
    background: #0d6efd;
    color: white;
    font-size: 15px;
    font-weight: 600;
}
.primary:hover { background: #0b5ed7; }
.notice, .code-result {
    margin: 0 0 19px;
    padding: 12px 14px;
    border: 1px solid #edc6cb;
    border-radius: 9px;
    color: #8b3142;
    background: #fff0f1;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.explanation { margin: 0 0 18px; font-size: 14px; line-height: 1.7; color: #615a6b; }
.fields { display: grid; gap: 17px; }
.profile-note { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: #8b3142; }
.region, .credential { display: flex; align-items: center; gap: 8px; }
.region { justify-content: space-between; flex-wrap: wrap; padding: 8px 13px; }
.credential { padding: 0 5px 0 13px; }
.credential input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 16px;
    text-overflow: ellipsis;
}
.credential:focus-within { outline: 2px solid #8a68c7; }
.credential input:focus-visible { outline: 0; }
.code-result { margin: 16px 0 0; background: #edf6ef; border-color: #cde4d5; color: #286141; }
.code-result a { color: #215938; font-weight: 650; }
.credential .code { font-size: 21px; font-weight: 700; letter-spacing: .12em; }
.copy-status { margin: 12px 0 0; color: #51495e; font-size: 13px; }
.copy-status:empty { margin: 0; }

@media (max-width: 540px) {
    .page { padding: 20px 14px 30px; }
    .card, .card.login { padding: 26px 22px 22px; border-radius: 18px; }
    .card.login { margin-top: 35px; }
    .wordmark { font-size: 28px; }
    .back-form { left: 8px; top: 16px; }
}
