[hidden] {
    display: none !important;
}

/* =========================================================
   登录 / 注册 · 小站风格
   ========================================================= */
.login-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% 18%, rgba(58, 123, 196, .2), transparent 34%),
        radial-gradient(circle at 86% 82%, rgba(132, 199, 254, .12), transparent 32%),
        #07111f;
    color: #eaf7ff;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at center, #000 0, transparent 72%);
    pointer-events: none;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 34px 22px;
}

.auth-card {
    display: grid;
    grid-template-columns: 41% 59%;
    overflow: hidden;
    width: min(1020px, 100%);
    min-height: 620px;
    border: 1px solid rgba(165, 221, 255, .16);
    border-radius: 26px;
    background: rgba(12, 24, 40, .7);
    box-shadow:
        0 40px 120px rgba(0, 0, 0, .48),
        0 0 0 1px rgba(255, 255, 255, .025) inset;
    backdrop-filter: blur(24px);
    animation: authIn .62s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes authIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* 左侧画 */
.auth-art {
    position: relative;
    min-height: 100%;
    background-image: url("../image/login-art.webp");
    background-position: center 25%;
    background-size: cover;
    isolation: isolate;
}

.auth-art-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(4, 11, 22, .2) 0%, rgba(4, 11, 22, .06) 34%, rgba(4, 11, 22, .86) 100%),
        linear-gradient(120deg, rgba(9, 26, 48, .55), rgba(30, 66, 110, .18));
    z-index: -1;
}

.auth-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 74%, rgba(132, 199, 254, .28), transparent 32%),
        radial-gradient(circle at 68% 30%, rgba(255, 255, 255, .08), transparent 28%);
    mix-blend-mode: screen;
    pointer-events: none;
}

.auth-art-top {
    position: absolute;
    top: 26px;
    right: 26px;
    left: 26px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.auth-logo {
    color: #f4fbff;
    font-family: "思源宋体 SemiBold", "Songti SC", "STSong", "SimSun", serif;
    font-size: 20px;
    letter-spacing: .04em;
    text-decoration: none;
    text-shadow: 0 4px 20px rgba(0, 0, 0, .4);
}

.auth-art-top span {
    color: rgba(235, 248, 255, .5);
    font-family: var(--mono, monospace);
    font-size: 7px;
    letter-spacing: .18em;
}

.auth-art-copy {
    position: absolute;
    right: 30px;
    bottom: 34px;
    left: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.auth-art-copy p {
    margin: 0 0 8px;
    color: #f4fbff;
    font-family: "思源宋体 SemiBold", "Songti SC", "STSong", "SimSun", serif;
    font-size: 21px;
    letter-spacing: .02em;
    line-height: 1.6;
    text-shadow: 0 5px 24px rgba(0, 0, 0, .4);
}

.auth-art-copy span {
    color: rgba(235, 248, 255, .56);
    font-size: 10px;
    letter-spacing: .12em;
}

/* 右侧表单 */
.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px clamp(34px, 5vw, 70px);
    background:
        radial-gradient(circle at 90% 4%, rgba(132, 199, 254, .07), transparent 32%),
        rgba(9, 18, 31, .42);
}

.auth-eyebrow {
    margin: 0 0 12px;
    color: #87c7fe;
    font-family: var(--mono, monospace);
    font-size: 8px;
    letter-spacing: .2em;
}

.auth-panel-head h1 {
    margin: 0;
    color: #f2fbff;
    font-family: "思源宋体 SemiBold", "Songti SC", "STSong", "SimSun", serif;
    font-size: clamp(27px, 3.2vw, 36px);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: .01em;
}

.auth-subtitle {
    margin: 10px 0 0;
    color: rgba(222, 242, 255, .5);
    font-size: 12px;
    line-height: 1.8;
}

.auth-tabs {
    display: flex;
    gap: 26px;
    margin: 30px 0 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.auth-tab {
    position: relative;
    padding: 0 0 12px;
    border: 0;
    background: transparent;
    color: rgba(222, 242, 255, .42);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: color .25s;
}

.auth-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 99px;
    background: #87c7fe;
    opacity: 0;
    transform: scaleX(.35);
    transition: opacity .25s, transform .25s;
}

.auth-tab.is-active {
    color: #f4fbff;
}

.auth-tab.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
    margin-top: 24px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field > span:first-child {
    color: rgba(222, 242, 255, .46);
    font-size: 10px;
    letter-spacing: .06em;
}

.auth-field input {
    width: 100%;
    height: 44px;
    padding: 0 2px;
    border: 0;
    border-bottom: 1px solid rgba(165, 221, 255, .18);
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: #f4fbff;
    font-family: inherit;
    font-size: 13px;
    transition: border-color .25s, box-shadow .25s;
}

.auth-field input::placeholder {
    color: rgba(222, 242, 255, .24);
}

.auth-field input:focus {
    border-color: #87c7fe;
    box-shadow: 0 8px 18px -18px rgba(132, 199, 254, .9);
}

.auth-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-password-wrap input {
    padding-right: 46px;
}

.auth-eye {
    position: absolute;
    right: 0;
    bottom: 11px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: rgba(222, 242, 255, .38);
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
}

.auth-eye:hover {
    color: #87c7fe;
}

.auth-error,
.auth-status {
    margin: -2px 0 0;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.6;
}

.auth-error {
    border: 1px solid rgba(255, 120, 132, .22);
    background: rgba(120, 26, 42, .18);
    color: #ffb1ba;
}

.auth-status {
    border: 1px solid rgba(132, 199, 254, .18);
    background: rgba(37, 93, 150, .14);
    color: #bfe7ff;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 46px;
    margin-top: 5px;
    padding: 0 18px 0 20px;
    border: 1px solid rgba(190, 235, 255, .24);
    border-radius: 10px;
    background:
        linear-gradient(120deg, rgba(72, 150, 224, .92), rgba(132, 199, 254, .88));
    color: #061321;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(58, 145, 224, .25);
    transition: transform .25s, box-shadow .25s, filter .25s;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(58, 145, 224, .36);
    filter: brightness(1.06);
}

.auth-submit:disabled {
    opacity: .5;
    cursor: default;
}

.auth-submit-arrow {
    font-family: var(--mono, monospace);
    font-size: 16px;
    font-weight: 400;
}

.auth-note {
    margin: 16px 0 0;
    color: rgba(222, 242, 255, .32);
    font-size: 9px;
    line-height: 1.8;
}

.auth-alt {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 22px;
    color: rgba(222, 242, 255, .4);
    font-size: 11px;
}

.auth-alt button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #87c7fe;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}

.auth-back {
    display: inline-block;
    align-self: flex-start;
    margin-top: 22px;
    color: rgba(222, 242, 255, .32);
    font-size: 10px;
    text-decoration: none;
    transition: color .25s;
}

.auth-back:hover {
    color: #bfe7ff;
}

.auth-logged {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid rgba(132, 199, 254, .18);
    border-radius: 12px;
    background: rgba(37, 93, 150, .12);
}

.auth-logged p {
    margin: 0 0 10px;
    color: rgba(222, 242, 255, .7);
    font-size: 12px;
}

.auth-logged strong {
    color: #eaf7ff;
}

.auth-logged a {
    display: inline-block;
    margin-right: 14px;
    color: #87c7fe;
    font-size: 11px;
    text-decoration: none;
}

.auth-logged button {
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(222, 242, 255, .42);
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
}

.auth-logged button:hover {
    color: #ffb1ba;
}

@media screen and (max-width: 820px) {
    .auth-shell {
        padding: 16px;
    }

    .auth-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth-art {
        min-height: 190px;
        background-position: center 18%;
    }

    .auth-art-copy {
        right: 22px;
        bottom: 18px;
        left: 22px;
    }

    .auth-art-copy p {
        font-size: 18px;
    }

    .auth-art-top {
        top: 18px;
        right: 20px;
        left: 20px;
    }

    .auth-panel {
        padding: 30px 24px 34px;
    }

    .auth-tabs {
        margin-top: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card {
        animation: none;
    }

    .auth-submit,
    .auth-tab,
    .auth-field input {
        transition: none;
    }
}

/* 设计规范复查：触控热区、安全区、字级与 0.5px 边框 */
.auth-card,
.auth-field input {
    border-width: .5px;
}

.auth-panel-head h1 {
    text-wrap: balance;
}

.auth-eyebrow {
    font-size: 12px;
    letter-spacing: .12em;
}

.auth-art-top span {
    font-size: 12px;
    letter-spacing: .1em;
}

.auth-art-copy span {
    font-size: 12px;
}

.auth-field > span:first-child {
    font-size: 12px;
}

.auth-tab {
    min-height: 44px;
    padding: 0 0 11px;
    font-size: 14px;
}

.auth-field input {
    min-height: 46px;
    font-size: 14px;
}

.auth-password-wrap input {
    padding-right: 56px;
}

.auth-eye {
    right: -6px;
    bottom: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 40px;
    font-size: 12px;
}

.auth-submit {
    min-height: 48px;
    font-size: 13px;
}

.auth-note {
    font-size: 12px;
    line-height: 1.7;
}

.auth-alt {
    font-size: 12px;
}

.auth-alt button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 12px;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 12px;
}

.auth-logged p,
.auth-logged a,
.auth-logged button {
    font-size: 12px;
}

@media screen and (max-width: 820px) {
    .auth-shell {
        padding-top: calc(16px + env(safe-area-inset-top));
        padding-right: calc(16px + env(safe-area-inset-right));
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        padding-left: calc(16px + env(safe-area-inset-left));
    }

    .auth-field input {
        font-size: 16px;
    }

    .auth-submit {
        font-size: 14px;
    }
}

@media screen and (max-width: 820px) {
    .auth-eye {
        min-height: 44px;
    }
}

/* 左侧头像上传 + 注册/登录高度稳定 */
.auth-form {
    min-height: 330px;
}

.auth-card {
    min-height: 680px;
}

.auth-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 24px 120px;
    background:
        radial-gradient(circle at 50% 35%, rgba(132, 199, 254, .2), transparent 34%),
        linear-gradient(155deg, #0b1727 0%, #10253d 58%, #091321 100%);
    background-image: none;
}

.auth-art::after {
    background:
        radial-gradient(circle at 22% 74%, rgba(132, 199, 254, .16), transparent 32%),
        radial-gradient(circle at 68% 30%, rgba(255, 255, 255, .05), transparent 28%);
}

.avatar-studio {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: auto 0;
    text-align: center;
}

.avatar-preview {
    display: grid;
    place-items: center;
    width: 148px;
    height: 148px;
    padding: 0;
    overflow: hidden;
    border: .5px solid rgba(190, 235, 255, .34);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .32), inset 0 0 30px rgba(132, 199, 254, .1);
    color: #eaf7ff;
    cursor: pointer;
    transition: border-color .2s, transform .2s;
}

.avatar-preview:hover,
.avatar-preview.is-dragover {
    border-color: var(--theme-color);
    transform: scale(1.03);
}

.avatar-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    color: rgba(234, 247, 255, .72);
    font-family: "思源宋体 SemiBold", "Songti SC", "STSong", "SimSun", serif;
    font-size: 46px;
    line-height: 1;
}

.avatar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-pick,
.avatar-default-next,
.avatar-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: .5px solid rgba(190, 235, 255, .26);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #dff4ff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.avatar-pick:hover,
.avatar-default-next:hover,
.avatar-remove:hover {
    border-color: var(--theme-color);
}

.avatar-remove {
    color: rgba(255, 255, 255, .52);
}

.avatar-note,
.avatar-review,
.avatar-login-note {
    margin: 0;
    color: rgba(222, 242, 255, .5);
    font-size: 12px;
    line-height: 1.7;
}

.avatar-review {
    color: #9fd7ff;
}

.avatar-login-note {
    display: none;
}

.auth-art:not(.is-register) .avatar-actions,
.auth-art:not(.is-register) .avatar-note,
.auth-art:not(.is-register) .avatar-review {
    display: none;
}

.auth-art:not(.is-register) .avatar-login-note {
    display: block;
}

.auth-art.is-register .auth-art-copy {
    opacity: .86;
}

@media screen and (max-width: 820px) {
    .auth-card {
        min-height: 0;
    }

    .auth-art {
        min-height: 260px;
        padding: 54px 20px 72px;
    }

    .avatar-preview {
        width: 104px;
        height: 104px;
    }

    .avatar-fallback {
        font-size: 34px;
    }

    .avatar-note,
    .avatar-review,
    .avatar-login-note {
        font-size: 12px;
    }
}

/* 头像裁切：拖动圆圈选择范围 */
.avatar-studio {
    min-height: 258px;
    justify-content: center;
}

.avatar-preview img {
    background: #0b1727;
}

.avatar-crop {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.avatar-crop[hidden] {
    display: none !important;
}

.avatar-crop-stage {
    position: relative;
    width: 240px;
    height: 240px;
    overflow: hidden;
    border: .5px solid rgba(190, 235, 255, .3);
    border-radius: 12px;
    background: #08111d;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
}

.avatar-crop-stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.avatar-crop-ring {
    position: absolute;
    top: 45px;
    left: 45px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 50%;
    box-shadow: 0 0 0 999px rgba(3, 9, 16, .58);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.avatar-crop-ring:active {
    cursor: grabbing;
}

.avatar-crop-ring span {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .34);
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    line-height: 1.4;
    pointer-events: none;
}

.avatar-crop-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-crop-cancel,
.avatar-crop-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: .5px solid rgba(190, 235, 255, .26);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #dff4ff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.avatar-crop-confirm {
    border-color: rgba(132, 199, 254, .68);
    background: var(--theme-color);
    color: #07111f;
}

.avatar-crop-cancel:hover,
.avatar-crop-confirm:hover {
    filter: brightness(1.08);
}

.avatar-studio.is-cropping .avatar-preview,
.avatar-studio.is-cropping .avatar-actions,
.avatar-studio.is-cropping .avatar-note,
.avatar-studio.is-cropping .avatar-review,
.avatar-studio.is-cropping .avatar-login-note {
    display: none;
}

.avatar-studio.is-cropping .avatar-crop {
    display: flex;
}

@media screen and (max-width: 820px) {
    .avatar-studio {
        min-height: 300px;
    }

    .avatar-crop-stage {
        width: 220px;
        height: 220px;
    }

    .avatar-crop-ring {
        top: 40px;
        left: 40px;
        width: 140px;
        height: 140px;
    }
}

/* 初始头像框 */
.avatar-frame-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.avatar-frame-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 44px;
    padding: 0 9px;
    border: .5px solid rgba(190, 235, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    color: rgba(222, 242, 255, .56);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, color .2s;
}

.avatar-frame-option:hover {
    border-color: rgba(190, 235, 255, .4);
    color: rgba(222, 242, 255, .86);
}

.avatar-frame-option.is-active {
    border-color: rgba(132, 199, 254, .72);
    background: rgba(132, 199, 254, .12);
    color: #eaf7ff;
}

.frame-swatch {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.frame-swatch[data-frame="none"] {
    border: .5px solid rgba(255, 255, 255, .28);
}

.frame-swatch[data-frame="ring"] {
    border: 2px solid #cfeaff;
    box-shadow: 0 0 0 2px rgba(207, 234, 255, .18);
}

.frame-swatch[data-frame="spark"] {
    border: 2px solid transparent;
    background:
        linear-gradient(#10253d, #10253d) padding-box,
        conic-gradient(from 20deg, #8ed1ff, #f7b2d9, #8ed1ff) border-box;
    box-shadow: 0 0 0 2px rgba(142, 209, 255, .16);
}

.avatar-frame-note {
    margin: 0;
    color: rgba(222, 242, 255, .38);
    font-size: 12px;
    line-height: 1.5;
}

.avatar-frame {
    position: relative;
    display: grid;
    place-items: center;
    width: 176px;
    height: 176px;
    flex: 0 0 176px;
}

.avatar-frame .avatar-preview {
    position: relative;
    z-index: 1;
}

.avatar-frame[data-frame="ring"]::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 2px solid rgba(214, 240, 255, .86);
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(142, 209, 255, .3), inset 0 0 8px rgba(255, 255, 255, .14);
    pointer-events: none;
}

.avatar-frame[data-frame="ring"]::after {
    content: "";
    position: absolute;
    inset: 1px;
    border: 1px solid rgba(214, 240, 255, .22);
    border-radius: 50%;
    pointer-events: none;
}

.avatar-frame[data-frame="spark"]::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: conic-gradient(from 20deg, #8ed1ff, #f7b2d9, #8ed1ff, #8ed1ff);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    filter: drop-shadow(0 0 8px rgba(142, 209, 255, .55));
    pointer-events: none;
}

.avatar-frame[data-frame="spark"]::after {
    content: "✦";
    position: absolute;
    top: 5px;
    right: 9px;
    color: #f7d8ee;
    font-size: 16px;
    line-height: 1;
    text-shadow: 0 0 10px rgba(247, 178, 217, .9);
    pointer-events: none;
}

.avatar-studio.is-cropping .avatar-frame {
    display: none;
}

.avatar-crop-hint {
    margin: 0;
    color: rgba(222, 242, 255, .46);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.avatar-crop-resize {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 22px;
    height: 22px;
    border: 2px solid #eaf7ff;
    border-radius: 50%;
    background: var(--theme-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    cursor: nwse-resize;
    touch-action: none;
    z-index: 3;
}

.avatar-studio.is-cropping .avatar-frame {
    display: none !important;
}

.avatar-studio.is-cropping .avatar-preview {
    display: none;
}

@media screen and (max-width: 820px) {
    .avatar-frame {
        width: 148px;
        height: 148px;
        flex-basis: 148px;
    }

    .avatar-frame .avatar-preview {
        width: 124px;
        height: 124px;
    }

    .avatar-frame-option {
        padding: 0 7px;
        gap: 4px;
        font-size: 11px;
    }

    .frame-swatch {
        width: 18px;
        height: 18px;
    }
}

.avatar-crop-ring[data-frame="ring"] {
    border-color: rgba(214, 240, 255, .96);
    box-shadow:
        0 0 0 999px rgba(3, 9, 16, .58),
        0 0 0 5px rgba(207, 234, 255, .2),
        0 0 24px rgba(142, 209, 255, .5);
}

.avatar-crop-ring[data-frame="spark"] {
    border-color: #8ed1ff;
    box-shadow:
        0 0 0 999px rgba(3, 9, 16, .58),
        0 0 0 3px rgba(247, 178, 217, .6),
        0 0 26px rgba(142, 209, 255, .55);
}

.avatar-crop-ring[data-frame="spark"]::after {
    content: "✦";
    position: absolute;
    top: -14px;
    right: 3px;
    color: #f7d8ee;
    font-size: 17px;
    line-height: 1;
    text-shadow: 0 0 10px rgba(247, 178, 217, .9);
    pointer-events: none;
}

/* 登录页：与首页共用的背景和导航 */
.login-page {
    background: #07111f;
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background: url("../image/bg-1920.webp") center / cover no-repeat;
    transform: scale(1.02);
}

.login-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 10, 18, .02), rgba(4, 10, 18, .08));
}

html.dark .login-bg::after {
    background: linear-gradient(180deg, rgba(5, 13, 24, .55), rgba(5, 13, 24, .74));
}

.login-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 64px;
    padding: 10px max(24px, calc((100vw - 1100px) / 2));
    border-bottom: .5px solid var(--black-a-5);
    background: var(--container-1);
    backdrop-filter: blur(18px);
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    color: var(--txt-b-pure);
    font-family: "思源宋体 SemiBold", "Songti SC", "STSong", "SimSun", serif;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
}

.login-links {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
    margin-right: 18px;
}

.login-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--black-a-60);
    font-size: 12px;
    text-decoration: none;
    transition: color .2s;
}

.login-links a:hover {
    color: var(--theme-color);
}

.dn-toggle-login {
    flex: 0 0 auto;
    width: 74px;
    height: 44px;
    --dn-scale: .082;
}

.auth-shell {
    min-height: 100vh;
    padding-top: calc(88px + env(safe-area-inset-top));
}

@media screen and (max-width: 900px) {
    .login-nav {
        padding-right: 16px;
        padding-left: 16px;
    }

    .login-links {
        gap: 16px;
        margin-right: 6px;
    }

    .login-brand {
        font-size: 14px;
    }
}

@media screen and (max-width: 640px) {
    .login-links {
        display: none;
    }

    .login-brand {
        font-size: 14px;
    }

    .login-nav {
        min-height: 58px;
    }

    .auth-shell {
        padding-top: calc(76px + env(safe-area-inset-top));
    }
}

.avatar-mobile-link {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: .5px solid rgba(190, 235, 255, .26);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #dff4ff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

@media screen and (max-width: 640px) {
    .avatar-mobile-link {
        display: inline-flex;
    }
}

@media screen and (max-width: 640px) {
    .auth-login-page .auth-art {
        min-height: 228px;
        padding: 52px 20px 18px;
    }

    .auth-login-page .auth-art-copy {
        display: none;
    }

    .auth-login-page .avatar-studio {
        min-height: 0;
        gap: 8px;
    }

    .auth-login-page .avatar-frame-options,
    .auth-login-page .avatar-frame-note,
    .auth-login-page .avatar-note,
    .auth-login-page .avatar-review,
    .auth-login-page .avatar-pick,
    .auth-login-page .avatar-crop,
    .auth-login-page .avatar-login-note {
        display: none !important;
    }

    .auth-login-page .avatar-frame {
        width: 128px;
        height: 128px;
        flex-basis: 128px;
    }

    .auth-login-page .avatar-frame .avatar-preview {
        width: 110px;
        height: 110px;
    }

    .auth-login-page .avatar-actions {
        display: flex;
    }

    .auth-login-page .avatar-remove {
        display: none !important;
    }

    .auth-login-page .avatar-mobile-link {
        display: inline-flex;
    }
}

.auth-hint {
    margin: 12px 0 0;
    color: rgba(234, 247, 255, .62);
    font-size: 12px;
    line-height: 1.7;
}

.auth-card {
    transition: grid-template-columns .35s ease;
}

.auth-card.is-cropping {
    grid-template-columns: 52% 48%;
}

.auth-card.is-cropping .auth-art {
    padding-right: 18px;
    padding-left: 18px;
}

@media screen and (max-width: 820px) {
    .auth-card.is-cropping {
        grid-template-columns: 1fr;
    }

    .auth-login-page .auth-art.is-cropping {
        min-height: 560px;
        padding: 58px 16px 20px;
    }

    .auth-login-page .avatar-studio.is-cropping .avatar-frame-options {
        display: flex !important;
    }

    .auth-login-page .avatar-studio.is-cropping .avatar-frame-note {
        display: block !important;
    }

    .auth-login-page .avatar-studio.is-cropping .avatar-crop {
        display: flex !important;
    }

    .auth-login-page .avatar-studio.is-cropping .avatar-note,
    .auth-login-page .avatar-studio.is-cropping .avatar-review,
    .auth-login-page .avatar-studio.is-cropping .avatar-login-note {
        display: none !important;
    }

    .auth-login-page .auth-art.is-cropping .auth-art-copy {
        display: none;
    }
}

.avatar-default-next {
    color: rgba(222, 242, 255, .72);
}

.avatar-error {
    margin: 10px 0 0;
    color: #ffb3bd;
    font-size: 12px;
    line-height: 1.65;
    text-align: center;
}

.auth-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 3000;
    max-width: min(320px, calc(100% - 40px));
    padding: 12px 18px;
    border: .5px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    background: rgba(7, 17, 31, .94);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .35);
    color: #ffd7dc;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(16px);
}

.auth-toast[hidden] {
    display: none !important;
}

@media screen and (max-width: 640px) {
    .avatar-error {
        display: none !important;
    }
}

/* 白天模式：登录 / 注册页也使用浅色卡片 */
html:not(.dark) body.login-page .auth-card {
    border-color: rgba(165, 205, 230, .45);
    background: rgba(249, 252, 255, .92);
    box-shadow: 0 30px 90px rgba(68, 105, 135, .2);
}

html:not(.dark) body.login-page .auth-art {
    background-image:
        linear-gradient(180deg, rgba(247, 252, 255, .58), rgba(235, 246, 253, .72)),
        url("../image/login-art.webp");
}

html:not(.dark) body.login-page .auth-art-shade {
    background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(235, 246, 253, .32));
}

html:not(.dark) body.login-page .auth-art-top,
html:not(.dark) body.login-page .auth-logo {
    color: #24455e;
    text-shadow: none;
}

html:not(.dark) body.login-page .auth-art-copy p {
    color: #24455e;
    text-shadow: none;
}

html:not(.dark) body.login-page .auth-art-copy span {
    color: rgba(42, 70, 90, .58);
}

html:not(.dark) body.login-page .auth-panel {
    background: rgba(255, 255, 255, .52);
}

html:not(.dark) body.login-page .auth-panel-head h1 {
    color: #17384d;
}

html:not(.dark) body.login-page .auth-eyebrow {
    color: #2d85b2;
}

html:not(.dark) body.login-page .auth-subtitle {
    color: rgba(42, 70, 90, .66);
}

html:not(.dark) body.login-page .auth-tabs {
    border-bottom-color: rgba(55, 105, 135, .18);
}

html:not(.dark) body.login-page .auth-tab {
    color: rgba(42, 70, 90, .55);
}

html:not(.dark) body.login-page .auth-tab.is-active {
    color: #17384d;
}

html:not(.dark) body.login-page .auth-field > span:first-child {
    color: rgba(42, 70, 90, .6);
}

html:not(.dark) body.login-page .auth-field input {
    color: #17384d !important;
    -webkit-text-fill-color: #17384d !important;
    border-bottom-color: rgba(55, 105, 135, .25);
}

html:not(.dark) body.login-page .auth-field input::placeholder {
    color: rgba(42, 70, 90, .42) !important;
    -webkit-text-fill-color: rgba(42, 70, 90, .42) !important;
}

html:not(.dark) body.login-page .auth-submit {
    border-color: #3f91bd;
    background: #84c7fe;
    color: #07111f;
}

html:not(.dark) body.login-page .auth-alt,
html:not(.dark) body.login-page .auth-alt button {
    color: rgba(42, 70, 90, .62);
}

html:not(.dark) body.login-page .avatar-frame-option {
    border-color: rgba(55, 105, 135, .22);
    background: rgba(255, 255, 255, .5);
    color: #31556e;
}

html:not(.dark) body.login-page .avatar-frame-option.is-active {
    border-color: #3f91bd;
    background: rgba(132, 199, 254, .28);
    color: #17384d;
}

html:not(.dark) body.login-page .avatar-frame-note,
html:not(.dark) body.login-page .avatar-note,
html:not(.dark) body.login-page .avatar-review {
    color: rgba(48, 79, 102, .7);
}

html:not(.dark) body.login-page .auth-back {
    color: rgba(42, 70, 90, .55);
}

/* 白天模式密码显示/隐藏文字 */
html:not(.dark) .auth-eye {
    color: #1d3a4d;
}

html:not(.dark) .auth-eye:hover {
    color: #2d85b2;
}
