html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    background: #080503;
    color: #f8e8bd;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

body.mir6-auth-body {
    min-height: 100dvh;
    overflow: hidden;
    background-image:
        linear-gradient(180deg, rgba(10, 5, 2, .08), rgba(8, 5, 3, .92)),
        url("../images/game/bzsch5/bg.jpg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
}

.mir6-auth-shell {
    position: relative;
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(112px, calc(24px + env(safe-area-inset-bottom)));
}

.mir6-auth-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 52% 19%, rgba(255, 229, 160, .26), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, .68), transparent 28%, transparent 72%, rgba(0, 0, 0, .62));
    pointer-events: none;
}

.mir6-auth-modal {
    position: relative;
    width: min(430px, calc(100vw - 32px));
    border: 1px solid rgba(255, 219, 146, .46);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(39, 28, 20, .92), rgba(12, 9, 8, .92)),
        rgba(15, 10, 7, .92);
    box-shadow:
        0 22px 60px rgba(0, 0, 0, .55),
        inset 0 1px 0 rgba(255, 246, 206, .2);
    overflow: hidden;
    isolation: isolate;
}

.mir6-auth-modal::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(90deg, transparent, rgba(255, 217, 130, .16), transparent),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 10px);
    pointer-events: none;
}

.mir6-auth-header {
    position: relative;
    padding: 24px 24px 14px;
    text-align: center;
}

.mir6-auth-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 10px;
    border: 1px solid rgba(245, 197, 105, .42);
    border-radius: 999px;
    color: #e8c983;
    font-size: 12px;
    letter-spacing: .08em;
    background: rgba(0, 0, 0, .24);
}

.mir6-auth-title {
    margin: 10px 0 0;
    color: #fff5d6;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 0 22px rgba(255, 145, 43, .3);
}

.mir6-auth-subtitle {
    margin: 8px auto 0;
    max-width: 28em;
    color: rgba(245, 224, 184, .74);
    font-size: 13px;
    line-height: 1.55;
}

.mir6-auth-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 20px 16px;
}

.mir6-auth-tab {
    display: grid;
    place-items: center;
    height: 38px;
    border: 1px solid rgba(255, 213, 127, .28);
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 241, 210, .72);
    font-size: 14px;
    font-weight: 700;
}

.mir6-auth-tab.is-active {
    border-color: rgba(255, 211, 113, .72);
    background: linear-gradient(180deg, #f6bd63, #c97426);
    color: #311609;
    box-shadow: 0 7px 18px rgba(219, 116, 32, .25), inset 0 1px 0 rgba(255, 255, 255, .42);
}

.mir6-auth-form {
    position: relative;
    padding: 0 20px 22px;
}

.mir6-field {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    min-height: 50px;
    margin-top: 12px;
    border: 1px solid rgba(255, 224, 164, .28);
    border-radius: 12px;
    background: rgba(0, 0, 0, .34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.mir6-field-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 50px;
    color: #f1c574;
    font-size: 17px;
    font-weight: 800;
}

.mir6-field input {
    width: 100%;
    height: 50px;
    border: 0;
    outline: 0;
    padding: 0 14px 0 0;
    background: transparent;
    color: #fff8e4;
    font: inherit;
    font-size: 16px;
}

.mir6-field input::placeholder {
    color: rgba(245, 224, 184, .44);
}

.mir6-auth-primary {
    width: 100%;
    height: 48px;
    margin-top: 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffd47a, #d98025 72%, #a94d15);
    color: #2e1204;
    font: inherit;
    font-size: 17px;
    font-weight: 900;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .28);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .58);
}

.mir6-auth-primary:active {
    transform: translateY(1px);
}

.mir6-auth-note {
    margin: 14px 2px 0;
    color: rgba(245, 224, 184, .64);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.mir6-auth-agreement,
.mir6-auth-check {
    position: relative;
    margin: 10px 2px 0;
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
}

.mir6-auth-agreement-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    letter-spacing: 0;
}

.mir6-auth-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    text-align: left;
}

.mir6-auth-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #d98025;
}

.mir6-auth-agreement button,
.mir6-auth-check button {
    -webkit-appearance: none;
    appearance: none;
    display: inline;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    vertical-align: baseline;
    text-decoration: underline;
    text-decoration-color: rgba(255, 215, 140, .62);
    text-underline-offset: 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
}

.mir6-auth-agreement button:active,
.mir6-auth-check button:active {
    color: #ffd47a;
}

.mir6-copyright {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 5;
    width: min(760px, calc(100vw - 12px));
    transform: translateX(-50%);
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .9);
    font-size: 10px;
    line-height: 1.42;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 8px rgba(0, 0, 0, .52);
}

.mir6-legal-line {
    display: block;
    white-space: nowrap;
    letter-spacing: 0;
}

.mir6-legal-gap {
    display: inline-block;
    width: 30px;
}

.mir6-dialog-open {
    overflow: hidden;
}

.mir6-agreement-dialog {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, .56);
}

.mir6-agreement-dialog[hidden] {
    display: none;
}

.mir6-agreement-panel {
    position: relative;
    width: min(430px, calc(100vw - 32px));
    max-height: min(72dvh, 560px);
    border: 1px solid rgba(255, 219, 146, .48);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(32, 24, 18, .96), rgba(10, 8, 7, .98)),
        rgba(12, 9, 8, .98);
    color: #fff4d6;
    box-shadow: 0 22px 60px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255, 246, 206, .18);
    overflow: hidden;
}

.mir6-agreement-close {
    position: absolute;
    top: 8px;
    right: 9px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 222, 158, .3);
    border-radius: 50%;
    background: rgba(0, 0, 0, .22);
    color: #fff5d6;
    font-size: 24px;
    line-height: 1;
}

.mir6-agreement-content {
    max-height: min(72dvh, 560px);
    overflow: auto;
    padding: 24px 22px 22px;
    -webkit-overflow-scrolling: touch;
}

.mir6-agreement-content h2 {
    margin: 0 42px 14px 0;
    color: #ffffff;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .72);
}

.mir6-agreement-content p {
    margin: 0 0 10px;
    color: rgba(255, 241, 214, .78);
    font-size: 12px;
    line-height: 1.75;
}

@media (max-width: 420px) {
    .mir6-auth-shell {
        align-items: end;
        padding: 12px 12px max(112px, calc(18px + env(safe-area-inset-bottom)));
    }

    .mir6-auth-modal {
        width: 100%;
        border-radius: 14px;
    }

    .mir6-auth-header {
        padding: 20px 18px 12px;
    }

    .mir6-auth-title {
        font-size: 25px;
    }

    .mir6-auth-form,
    .mir6-auth-tabs {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mir6-auth-agreement-login {
        font-size: 10px;
        gap: 2px;
    }

    .mir6-auth-check {
        font-size: 10px;
    }

    .mir6-copyright {
        bottom: max(8px, env(safe-area-inset-bottom));
        font-size: 8px;
        line-height: 1.36;
    }

    .mir6-legal-gap {
        width: 12px;
    }
}

@media (max-width: 340px) {
    .mir6-auth-agreement-login,
    .mir6-auth-check {
        font-size: 9px;
    }

    .mir6-copyright {
        font-size: 7px;
    }

    .mir6-legal-gap {
        width: 8px;
    }
}

@media (orientation: landscape) and (max-height: 540px) {
    body.mir6-auth-body {
        overflow: auto;
    }

    .mir6-auth-shell {
        min-height: 560px;
    }

    .mir6-copyright {
        position: absolute;
    }
}
