.shg-subject-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.18) 0%, transparent 30%),
        radial-gradient(circle at 82% 14%, rgba(251, 191, 36, 0.16) 0%, transparent 28%),
        linear-gradient(180deg, rgba(4, 10, 21, 0.9) 0%, rgba(2, 7, 16, 0.96) 100%);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    color: #f8fbff;
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

html.shg-subject-auth-pending body > *:not(.shg-subject-auth-overlay),
html.shg-subject-auth-blocked body > *:not(.shg-subject-auth-overlay) {
    visibility: hidden !important;
}

html.shg-subject-auth-pending .shg-subject-auth-overlay,
html.shg-subject-auth-blocked .shg-subject-auth-overlay {
    display: flex;
}

.shg-subject-auth-card {
    position: relative;
    width: min(100%, 520px);
    padding: 30px 28px 24px;
    border-radius: 30px;
    background: linear-gradient(160deg, rgba(8, 17, 31, 0.98), rgba(8, 18, 36, 0.95) 52%, rgba(4, 12, 24, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.46);
    overflow: hidden;
}

.shg-subject-auth-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(34px);
    pointer-events: none;
}

.shg-subject-auth-glow-a {
    top: -70px;
    right: -30px;
    width: 200px;
    height: 200px;
    background: rgba(56, 189, 248, 0.18);
}

.shg-subject-auth-glow-b {
    left: -80px;
    bottom: -100px;
    width: 240px;
    height: 240px;
    background: rgba(251, 191, 36, 0.14);
}

.shg-subject-auth-visual {
    position: relative;
    width: 116px;
    height: 116px;
    margin: 0 auto 14px;
}

.shg-subject-auth-orbit,
.shg-subject-auth-core-ring,
.shg-subject-auth-core {
    position: absolute;
    border-radius: 999px;
}

.shg-subject-auth-orbit-a {
    inset: 0;
    border: 1px solid rgba(56, 189, 248, 0.34);
    animation: shgSubjectGateSpin 4.8s linear infinite;
}

.shg-subject-auth-orbit-b {
    inset: 11px;
    border: 1px dashed rgba(251, 191, 36, 0.32);
    animation: shgSubjectGateSpinReverse 3.4s linear infinite;
}

.shg-subject-auth-core-ring {
    inset: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
}

.shg-subject-auth-core {
    inset: 40px;
    background: linear-gradient(135deg, #38bdf8 0%, #fbbf24 100%);
    box-shadow: 0 0 26px rgba(56, 189, 248, 0.26);
    animation: shgSubjectGatePulse 1.8s ease-in-out infinite;
}

.shg-subject-auth-eyebrow {
    position: relative;
    margin: 0;
    text-align: center;
    color: rgba(226, 232, 240, 0.7);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.shg-subject-auth-meta-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.shg-subject-auth-meta,
.shg-subject-auth-phase {
    min-height: 32px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.shg-subject-auth-meta {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.86);
}

.shg-subject-auth-phase {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.18);
    color: #bae6fd;
}

html.shg-subject-auth-blocked .shg-subject-auth-phase {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.18);
    color: #fde68a;
}

.shg-subject-auth-title {
    position: relative;
    margin: 18px 0 0;
    text-align: center;
    font-size: clamp(30px, 4vw, 36px);
    font-weight: 900;
    line-height: 1.12;
    color: #f8fbff;
}

.shg-subject-auth-desc {
    position: relative;
    margin: 14px auto 0;
    max-width: 380px;
    text-align: center;
    color: rgba(226, 232, 240, 0.82);
    font-size: 14px;
    line-height: 1.8;
}

.shg-subject-auth-progress {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.shg-subject-auth-progress span {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(226, 232, 240, 0.58);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.shg-subject-auth-progress .is-done {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.22);
    color: #86efac;
}

.shg-subject-auth-progress .is-active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.24);
    color: #bae6fd;
    box-shadow: 0 10px 24px rgba(56, 189, 248, 0.1);
}

html.shg-subject-auth-blocked .shg-subject-auth-progress .is-active {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.22);
    color: #fde68a;
    box-shadow: 0 10px 24px rgba(251, 191, 36, 0.1);
}

.shg-subject-auth-actions {
    position: relative;
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.shg-subject-auth-button {
    flex: 1;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.shg-subject-auth-button:hover {
    transform: translateY(-1px);
}

.shg-subject-auth-button-primary {
    background: linear-gradient(135deg, #f8c96c 0%, #f59e0b 100%);
    color: #152033;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
}

.shg-subject-auth-button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.84);
}

.shg-subject-auth-button-secondary:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

@keyframes shgSubjectGateSpin {
    to { transform: rotate(360deg); }
}

@keyframes shgSubjectGateSpinReverse {
    to { transform: rotate(-360deg); }
}

@keyframes shgSubjectGatePulse {
    0%, 100% {
        transform: scale(0.94);
        box-shadow: 0 0 26px rgba(56, 189, 248, 0.26);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 36px rgba(251, 191, 36, 0.24);
    }
}

@media (max-width: 560px) {
    .shg-subject-auth-card {
        padding: 26px 20px 20px;
        border-radius: 24px;
    }

    .shg-subject-auth-title {
        font-size: 28px;
    }

    .shg-subject-auth-progress,
    .shg-subject-auth-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .shg-subject-auth-button {
        width: 100%;
    }
}
