
:root {
    --pm-auth-teal: #0d5b5a;
    --pm-auth-teal-dark: #064646;
    --pm-auth-aqua: #0fa095;
    --pm-auth-cream: #f5f0e7;
    --pm-auth-paper: #fffdf8;
    --pm-auth-ink: #1f2937;
    --pm-auth-muted: #667085;
    --pm-auth-border: rgba(13, 91, 90, 0.16);
    --pm-auth-gold: #d6a64e;
    --pm-auth-shadow: 0 26px 75px rgba(31, 41, 55, 0.14);
    --pm-auth-soft-shadow: 0 16px 44px rgba(31, 41, 55, 0.08);
}

.pm-auth-body {
    min-height: 100svh;
    background:
        radial-gradient(circle at 10% 4%, rgba(214, 166, 78, 0.16), transparent 22rem),
        radial-gradient(circle at 94% 12%, rgba(13, 91, 90, 0.09), transparent 30rem),
        linear-gradient(180deg, #fbf7ef 0%, #f7f0e5 52%, #fbf8f0 100%);
    color: var(--pm-auth-ink);
    overflow-x: hidden;
}

.pm-auth-body main {
    width: 100%;
}

.pm-auth-body .site-bg-orb {
    display: none;
}

.pm-auth-shell {
    min-height: 100svh;
    width: min(100% - 44px, 1220px);
    margin: 0 auto;
    padding: clamp(18px, 3.4vh, 34px) 0;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: clamp(14px, 2.6vh, 28px);
    position: relative;
}

.pm-auth-shell::before,
.pm-auth-shell::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.48;
}

.pm-auth-shell::before {
    width: 440px;
    height: 440px;
    right: -160px;
    top: 120px;
    background:
        radial-gradient(circle at 35% 25%, rgba(214, 166, 78, 0.26), transparent 18%),
        radial-gradient(circle at 65% 55%, rgba(13, 91, 90, 0.12), transparent 40%);
}

.pm-auth-shell::after {
    left: -110px;
    bottom: -110px;
    width: 380px;
    height: 260px;
    background:
        radial-gradient(ellipse at 40% 65%, rgba(13, 91, 90, 0.15), transparent 48%),
        radial-gradient(ellipse at 65% 45%, rgba(214, 166, 78, 0.12), transparent 42%);
}

.pm-auth-topbar,
.pm-auth-card-wrap,
.pm-auth-mobile-nav {
    position: relative;
    z-index: 1;
}

.pm-auth-topbar {
    min-height: clamp(54px, 8vh, 74px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.pm-auth-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.pm-auth-logo img {
    width: clamp(142px, 15vw, 178px);
    max-height: 72px;
    object-fit: contain;
    display: block;
}

.pm-auth-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #314155;
    font-weight: 650;
}

.pm-auth-top-actions p {
    margin: 0;
}

.pm-auth-outline-link {
    min-height: 42px;
    padding: 0 22px;
    border: 1px solid rgba(13, 91, 90, 0.45);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pm-auth-teal);
    font-weight: 800;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.62);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.pm-auth-outline-link:hover,
.pm-auth-outline-link:focus-visible {
    transform: translateY(-1px);
    background: #fff;
    box-shadow: 0 12px 24px rgba(13, 91, 90, 0.1);
}

.pm-auth-menu-button {
    display: none;
    width: 48px;
    height: 48px;
    border: 0;
    background: transparent;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    cursor: pointer;
}

.pm-auth-menu-button span {
    width: 32px;
    height: 4px;
    border-radius: 999px;
    background: #1f2937;
    transition: transform 180ms ease, opacity 180ms ease;
}

.pm-auth-menu-button.is-open span:first-child {
    transform: translateY(11px) rotate(45deg);
}

.pm-auth-menu-button.is-open span:nth-child(2) {
    opacity: 0;
}

.pm-auth-menu-button.is-open span:last-child {
    transform: translateY(-11px) rotate(-45deg);
}

.pm-auth-mobile-nav {
    display: none;
    border: 1px solid var(--pm-auth-border);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    box-shadow: var(--pm-auth-soft-shadow);
    padding: 12px;
}

.pm-auth-mobile-nav a {
    display: block;
    padding: 11px 14px;
    color: var(--pm-auth-ink);
    font-weight: 750;
    text-decoration: none;
    border-radius: 12px;
}

.pm-auth-mobile-nav a:hover {
    background: rgba(13, 91, 90, 0.08);
}

.pm-auth-mobile-locale {
    padding: 8px 10px 4px;
}

.pm-auth-card-wrap {
    display: grid;
    place-items: center;
    min-height: 0;
}

.pm-auth-panel {
    width: 100%;
    max-height: calc(100svh - 112px);
    border: 1px solid rgba(13, 91, 90, 0.16);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--pm-auth-shadow);
    overflow: hidden;
    display: grid;
    backdrop-filter: blur(10px);
    animation: pmAuthEnter 520ms ease both;
}

.pm-auth-login-panel {
    grid-template-columns: minmax(420px, 0.94fr) minmax(430px, 1.06fr);
    min-height: min(720px, calc(100svh - 116px));
}

.pm-auth-register-panel {
    grid-template-columns: minmax(590px, 1.02fr) minmax(390px, 0.98fr);
    min-height: min(720px, calc(100svh - 116px));
}

.pm-auth-form-side {
    padding: clamp(26px, 4.8vh, 52px) clamp(28px, 4vw, 58px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 253, 247, 0.9));
    min-width: 0;
}

.pm-auth-login-panel .pm-auth-form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pm-auth-register-panel .pm-auth-form-side {
    padding: clamp(18px, 2.8vh, 34px) clamp(28px, 4vw, 52px);
}

.pm-auth-form-head {
    text-align: left;
}

.pm-auth-register-panel .pm-auth-form-head {
    text-align: center;
}

.pm-auth-kicker {
    margin: 0 0 8px;
    color: var(--pm-auth-teal);
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.77rem;
}

.pm-auth-mark {
    width: 60px;
    height: 60px;
    display: inline-grid;
    place-items: center;
    margin: 0 auto 10px;
    border-radius: 999px;
    border: 1px solid rgba(13, 91, 90, 0.14);
    background: #fffdf8;
    color: var(--pm-auth-teal);
    box-shadow: var(--pm-auth-soft-shadow);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.pm-auth-form-head h1 {
    margin: 0;
    color: #172234;
    font-size: clamp(2rem, 4.1vw, 3.18rem);
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.pm-auth-register-panel .pm-auth-form-head h1 {
    font-size: clamp(1.78rem, 3.2vw, 2.55rem);
}

.pm-auth-lead {
    max-width: 460px;
    margin: 14px 0 0;
    color: #5a6880;
    font-size: clamp(0.98rem, 1.2vw, 1.13rem);
    line-height: 1.7;
}

.pm-auth-register-panel .pm-auth-lead {
    margin: 10px auto 0;
    max-width: 540px;
    line-height: 1.5;
}

.pm-auth-alert {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    background: rgba(254, 226, 226, 0.72);
    color: #991b1b;
    font-weight: 750;
}

.pm-auth-form {
    margin-top: clamp(18px, 2.6vh, 28px);
    display: grid;
    gap: 14px;
}

.pm-auth-register-form {
    margin-top: 14px;
    gap: 11px;
}

.pm-auth-register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px 14px;
}

.pm-auth-field {
    display: grid;
    gap: 8px;
    color: #172234;
    font-weight: 780;
}

.pm-auth-field > span:first-child {
    font-size: 0.94rem;
}

.pm-auth-input-wrap {
    min-height: 52px;
    border: 1px solid rgba(31, 41, 55, 0.17);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.pm-auth-register-panel .pm-auth-input-wrap {
    min-height: 46px;
    border-radius: 12px;
}

.pm-auth-input-wrap:focus-within {
    border-color: rgba(13, 91, 90, 0.55);
    box-shadow: 0 0 0 4px rgba(13, 91, 90, 0.08);
    background: #fff;
}

.pm-auth-input-icon {
    display: grid;
    place-items: center;
    color: var(--pm-auth-teal);
}

.pm-auth-input-icon svg,
.pm-auth-password-toggle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.pm-auth-input-wrap input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-weight: 600;
    padding: 0 12px 0 0;
}

.pm-auth-input-wrap input::placeholder {
    color: #9aa3b2;
    font-weight: 520;
}

.pm-auth-password-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #667085;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.pm-auth-password-toggle.is-active {
    color: var(--pm-auth-teal);
}

.pm-auth-form-row,
.pm-auth-form-language {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pm-auth-form-language {
    padding: 8px 10px;
    border: 1px solid rgba(13, 91, 90, 0.12);
    border-radius: 14px;
    background: rgba(255, 253, 248, 0.72);
    color: #475467;
    font-weight: 750;
}

.pm-auth-register-form .pm-auth-form-language {
    padding: 6px 10px;
}

.pm-auth-form-language .pm-locale-switcher {
    min-width: 168px;
}

.pm-auth-form-language select,
.pm-auth-top-actions select,
.pm-auth-mobile-locale select {
    min-height: 38px;
    border: 1px solid rgba(13, 91, 90, 0.18);
    border-radius: 999px;
    background: #fffdf8;
    color: var(--pm-auth-teal);
    padding: 0 34px 0 13px;
    font-weight: 800;
    outline: none;
}

.pm-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #475467;
    font-weight: 680;
}

.pm-auth-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pm-auth-check span {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1px solid rgba(31, 41, 55, 0.25);
    background: #fff;
    flex: 0 0 auto;
    position: relative;
}

.pm-auth-check input:checked + span {
    background: var(--pm-auth-teal);
    border-color: var(--pm-auth-teal);
}

.pm-auth-check input:checked + span::after {
    content: "✓";
    position: absolute;
    inset: 0;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 900;
    display: grid;
    place-items: center;
}

.pm-auth-text-link,
.pm-auth-bottom-link a,
.pm-auth-terms a {
    color: var(--pm-auth-teal);
    font-weight: 850;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.pm-auth-submit {
    min-height: 58px;
    border: 0;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 38%),
        linear-gradient(135deg, #075051 0%, #087b78 100%);
    color: #fff;
    font-size: 1.08rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    box-shadow: 0 18px 34px rgba(13, 91, 90, 0.24);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.pm-auth-register-panel .pm-auth-submit {
    min-height: 50px;
    margin-top: 2px;
}

.pm-auth-submit:hover,
.pm-auth-submit:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 22px 42px rgba(13, 91, 90, 0.28);
}

.pm-auth-submit span {
    font-size: 1.7rem;
    line-height: 1;
}

.pm-auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    color: #98a2b3;
    font-weight: 700;
}

.pm-auth-divider::before,
.pm-auth-divider::after {
    content: "";
    height: 1px;
    background: rgba(31, 41, 55, 0.16);
}

.pm-auth-google {
    min-height: 52px;
    border: 1px solid rgba(13, 91, 90, 0.45);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--pm-auth-teal);
    font-size: 1rem;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
}

.pm-auth-google span {
    color: #ea4335;
    font-size: 1.45rem;
    font-weight: 900;
}

.pm-auth-bottom-link {
    margin: 0;
    text-align: center;
    color: #475467;
    font-size: 1rem;
}

.pm-auth-register-bottom {
    margin-top: 0;
}

.pm-auth-choice-group {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
}

.pm-auth-choice-group legend {
    padding: 0;
    color: #172234;
    font-size: 0.93rem;
    font-weight: 860;
}

.pm-auth-choice-group legend span {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    margin-left: 4px;
    border: 1px solid rgba(31, 41, 55, 0.24);
    border-radius: 999px;
    color: #667085;
    font-size: 0.85rem;
}

.pm-auth-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.pm-auth-choice-grid label {
    position: relative;
}

.pm-auth-choice-grid input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pm-auth-choice-grid span {
    min-height: 72px;
    border: 1px solid rgba(31, 41, 55, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 10px;
    text-align: center;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.pm-auth-choice-grid strong {
    color: #172234;
    font-size: 0.98rem;
}

.pm-auth-choice-grid em {
    color: var(--pm-auth-teal);
    font-style: normal;
    font-weight: 800;
}

.pm-auth-choice-grid input:checked + span {
    border-color: var(--pm-auth-teal);
    box-shadow: 0 0 0 3px rgba(13, 91, 90, 0.1);
    background: #fffdf8;
}

.pm-auth-terms {
    align-items: flex-start;
    line-height: 1.45;
    font-size: 0.91rem;
}

.pm-auth-art-side {
    position: relative;
    overflow: hidden;
    min-width: 0;
    background:
        radial-gradient(circle at 24% 22%, rgba(248, 211, 144, 0.72), transparent 9%),
        linear-gradient(180deg, rgba(255, 253, 247, 0.66), rgba(244, 238, 225, 0.9));
}

.pm-auth-art-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 46%, rgba(13, 91, 90, 0.13), transparent 28%),
        linear-gradient(140deg, transparent 0 56%, rgba(13, 91, 90, 0.08) 56% 100%);
}

.pm-auth-art-side::after {
    content: "";
    position: absolute;
    left: -8%;
    right: -8%;
    bottom: -10%;
    height: 39%;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(13, 91, 90, 0.18), transparent 63%),
        linear-gradient(180deg, transparent 0%, rgba(13, 91, 90, 0.09) 100%);
    border-radius: 50% 50% 0 0;
}

.pm-auth-sun {
    position: absolute;
    width: 92px;
    height: 92px;
    top: 70px;
    left: 70px;
    border-radius: 999px;
    background: linear-gradient(145deg, #f8d58f, #ffe8b9);
    opacity: 0.85;
}

.pm-auth-bamboo {
    position: absolute;
    right: 38px;
    top: 34px;
    width: 150px;
    height: 420px;
    opacity: 0.42;
    background:
        linear-gradient(88deg, transparent 0 46%, rgba(13, 91, 90, 0.65) 47% 51%, transparent 52% 100%),
        radial-gradient(ellipse at 68% 8%, rgba(13, 91, 90, 0.45), transparent 22%),
        radial-gradient(ellipse at 32% 23%, rgba(13, 91, 90, 0.45), transparent 20%),
        radial-gradient(ellipse at 72% 38%, rgba(13, 91, 90, 0.45), transparent 20%),
        radial-gradient(ellipse at 34% 54%, rgba(13, 91, 90, 0.45), transparent 20%);
    transform: rotate(-8deg);
}

.pm-auth-cloud {
    position: absolute;
    width: 112px;
    height: 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    filter: blur(0.2px);
}

.pm-auth-cloud-one {
    left: 36%;
    top: 110px;
}

.pm-auth-cloud-two {
    left: 8%;
    top: 180px;
    transform: scale(0.82);
}

.pm-auth-art-hanzi {
    position: absolute;
    top: 165px;
    left: 90px;
    color: #20313c;
    font-size: clamp(4rem, 7vw, 6rem);
    font-weight: 600;
    letter-spacing: 0.12em;
    z-index: 2;
}

.pm-auth-login-art > p {
    position: absolute;
    top: 300px;
    left: 160px;
    margin: 0;
    color: #253647;
    font-size: 1.3rem;
    font-weight: 800;
    z-index: 2;
}

.pm-auth-login-art > strong {
    position: absolute;
    top: 335px;
    left: 168px;
    color: var(--pm-auth-teal);
    font-size: 1.16rem;
    z-index: 2;
}

.pm-auth-dashboard-preview {
    position: absolute;
    left: 70px;
    bottom: 120px;
    width: 230px;
    min-height: 148px;
    padding: 18px;
    z-index: 3;
    border-radius: 22px;
    border: 1px solid rgba(13, 91, 90, 0.14);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--pm-auth-soft-shadow);
    transform: rotate(-5deg);
}

.pm-auth-dashboard-preview span {
    color: #172234;
    font-weight: 900;
}

.pm-auth-progress-circle {
    width: 66px;
    height: 66px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    margin: 12px 0;
    color: var(--pm-auth-teal);
    font-weight: 900;
    background:
        radial-gradient(circle at center, #fff 0 55%, transparent 57%),
        conic-gradient(var(--pm-auth-teal) 0 42%, rgba(13, 91, 90, 0.13) 42% 100%);
}

.pm-auth-phone-card {
    position: absolute;
    right: 70px;
    bottom: 88px;
    width: 148px;
    height: 220px;
    z-index: 4;
    border-radius: 28px;
    padding: 16px;
    border: 1px solid rgba(13, 91, 90, 0.14);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 28px 58px rgba(31, 41, 55, 0.16);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    transform: rotate(7deg);
}

.pm-auth-phone-card small {
    justify-self: end;
    color: #667085;
    font-weight: 800;
}

.pm-auth-phone-card b {
    color: #172234;
    font-size: 2.1rem;
}

.pm-auth-phone-card span,
.pm-auth-phone-card em {
    color: #344054;
    font-style: normal;
    font-weight: 750;
}

.pm-auth-study-tools {
    position: absolute;
    left: 112px;
    bottom: 38px;
    display: grid;
    gap: 8px;
    z-index: 3;
    transform: rotate(-6deg);
}

.pm-auth-study-tools span {
    min-width: 170px;
    padding: 10px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0b5c5a, #0f7e79);
    color: #f7ddb2;
    font-weight: 860;
}

.pm-auth-pagoda {
    position: absolute;
    left: 86px;
    top: 250px;
    width: 250px;
    height: 190px;
    z-index: 2;
    opacity: 0.72;
    background:
        linear-gradient(180deg, transparent 0 24%, rgba(13, 91, 90, 0.78) 25% 31%, transparent 32% 100%),
        linear-gradient(110deg, transparent 0 33%, rgba(13, 91, 90, 0.82) 34% 42%, transparent 43% 100%),
        linear-gradient(70deg, transparent 0 58%, rgba(13, 91, 90, 0.82) 59% 67%, transparent 68% 100%),
        linear-gradient(180deg, transparent 0 60%, rgba(13, 91, 90, 0.36) 61% 100%);
    clip-path: polygon(50% 0, 78% 23%, 67% 23%, 82% 42%, 67% 42%, 67% 100%, 33% 100%, 33% 42%, 18% 42%, 33% 23%, 22% 23%);
}

.pm-auth-vertical-text {
    position: absolute;
    right: 172px;
    top: 180px;
    writing-mode: vertical-rl;
    color: rgba(13, 91, 90, 0.35);
    font-size: 1.55rem;
    letter-spacing: 0.16em;
    z-index: 3;
}

.pm-auth-book-stack {
    position: absolute;
    right: 78px;
    bottom: 150px;
    z-index: 3;
    display: grid;
    gap: 8px;
    transform: rotate(-8deg);
}

.pm-auth-book-stack span {
    min-width: 160px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #0b5c5a, #0f7e79);
    color: #f8ddb1;
    border-radius: 14px;
    font-weight: 900;
    box-shadow: var(--pm-auth-soft-shadow);
}

.pm-auth-open-book {
    position: absolute;
    right: 155px;
    bottom: 46px;
    z-index: 3;
    width: 170px;
    height: 112px;
    border-radius: 50% 50% 20px 20px;
    background: linear-gradient(90deg, #fffaf0 0 50%, #f7ecd8 50% 100%);
    box-shadow: var(--pm-auth-soft-shadow);
    display: grid;
    place-items: center;
    color: #4b5563;
    transform: rotate(-6deg);
}

.pm-auth-open-book b {
    font-size: 2.4rem;
    line-height: 1;
}

.pm-auth-open-book small {
    margin-top: -30px;
    color: #667085;
    font-weight: 800;
}

@keyframes pmAuthEnter {
    from {
        transform: translateY(18px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (min-width: 1000px) {
    .pm-auth-body {
        overflow-y: hidden;
    }
}

@media (max-width: 1090px) {
    .pm-auth-login-panel,
    .pm-auth-register-panel {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .pm-auth-art-side {
        display: none;
    }

    .pm-auth-register-panel {
        max-width: 760px;
    }

    .pm-auth-body {
        overflow-y: auto;
    }

    .pm-auth-shell {
        min-height: 100svh;
        grid-template-rows: auto auto 1fr;
    }
}

@media (max-width: 760px) {
    .pm-auth-shell {
        width: min(100% - 28px, 720px);
        padding: 22px 0 24px;
        gap: 16px;
    }

    .pm-auth-topbar {
        align-items: flex-start;
    }

    .pm-auth-logo img {
        width: 168px;
    }

    .pm-auth-top-actions {
        display: none;
    }

    .pm-auth-menu-button {
        display: inline-flex;
    }

    .pm-auth-mobile-nav.is-open {
        display: block;
    }

    .pm-auth-panel {
        border-radius: 28px;
        max-height: none;
    }

    .pm-auth-form-side,
    .pm-auth-register-panel .pm-auth-form-side {
        padding: 28px 22px;
    }

    .pm-auth-form-head h1,
    .pm-auth-register-panel .pm-auth-form-head h1 {
        font-size: clamp(2rem, 10vw, 3.1rem);
    }

    .pm-auth-register-panel .pm-auth-form-head {
        text-align: left;
    }

    .pm-auth-mark {
        display: none;
    }

    .pm-auth-lead,
    .pm-auth-register-panel .pm-auth-lead {
        margin-left: 0;
        margin-right: 0;
    }

    .pm-auth-register-grid {
        grid-template-columns: 1fr;
    }

    .pm-auth-choice-grid {
        grid-template-columns: 1fr;
    }

    .pm-auth-form-language,
    .pm-auth-form-row {
        align-items: stretch;
        flex-direction: column;
    }

    .pm-auth-form-language .pm-locale-switcher {
        width: 100%;
        min-width: 0;
    }

    .pm-auth-form-language select,
    .pm-auth-mobile-locale select {
        width: 100%;
    }

    .pm-auth-submit {
        min-height: 56px;
    }
}

@media (max-width: 480px) {
    .pm-auth-shell {
        width: min(100% - 18px, 420px);
        padding-top: 16px;
    }

    .pm-auth-logo img {
        width: 150px;
    }

    .pm-auth-form-side,
    .pm-auth-register-panel .pm-auth-form-side {
        padding: 24px 18px;
    }

    .pm-auth-input-wrap {
        min-height: 50px;
    }

    .pm-auth-field > span:first-child {
        font-size: 0.9rem;
    }

    .pm-auth-form {
        gap: 12px;
    }
}


/* ==========================================================================
   v2.5 Auth viewport fit hotfix
   - Desktop fits inside one viewport without bottom clipping.
   - Mobile never clips content; it uses natural scroll when the screen is small.
   ========================================================================== */

@media (min-width: 1100px) {
    .pm-auth-body {
        height: 100svh;
        min-height: 100svh;
        overflow: hidden;
    }

    .pm-auth-shell {
        height: 100svh;
        min-height: 0;
        width: min(100% - 48px, 1260px);
        padding: clamp(10px, 1.8vh, 18px) 0 clamp(12px, 1.8vh, 18px);
        grid-template-rows: clamp(46px, 7vh, 62px) minmax(0, 1fr);
        gap: clamp(8px, 1.8vh, 14px);
    }

    .pm-auth-topbar {
        min-height: 0;
        height: 100%;
    }

    .pm-auth-logo img {
        width: clamp(118px, 10vw, 156px);
        max-height: 52px;
    }

    .pm-auth-top-actions {
        gap: 10px;
        font-size: 0.93rem;
    }

    .pm-auth-outline-link {
        min-height: 38px;
        padding-inline: 18px;
        border-radius: 12px;
    }

    .pm-auth-top-actions select,
    .pm-auth-form-language select,
    .pm-auth-mobile-locale select {
        min-height: 36px;
    }

    .pm-auth-card-wrap {
        height: 100%;
        min-height: 0;
    }

    .pm-auth-panel {
        height: 100%;
        min-height: 0;
        max-height: none;
        border-radius: clamp(20px, 2vw, 28px);
    }

    .pm-auth-login-panel {
        grid-template-columns: minmax(410px, 0.9fr) minmax(460px, 1.1fr);
    }

    .pm-auth-register-panel {
        grid-template-columns: minmax(620px, 1.08fr) minmax(360px, 0.92fr);
    }

    .pm-auth-form-side,
    .pm-auth-register-panel .pm-auth-form-side {
        min-height: 0;
        overflow: hidden;
        padding: clamp(18px, 3vh, 34px) clamp(30px, 4vw, 56px);
    }

    .pm-auth-login-panel .pm-auth-form-side,
    .pm-auth-register-panel .pm-auth-form-side {
        justify-content: center;
    }

    .pm-auth-kicker {
        margin-bottom: 6px;
        font-size: 0.72rem;
    }

    .pm-auth-mark {
        width: 48px;
        height: 48px;
        margin-bottom: 6px;
        font-size: 1.62rem;
    }

    .pm-auth-form-head h1 {
        font-size: clamp(2.15rem, 3.3vw, 3.4rem);
        line-height: 1.02;
    }

    .pm-auth-register-panel .pm-auth-form-head h1 {
        font-size: clamp(1.62rem, 2.35vw, 2.2rem);
        letter-spacing: -0.045em;
    }

    .pm-auth-lead {
        margin-top: 8px;
        font-size: clamp(0.88rem, 1vw, 1.02rem);
        line-height: 1.48;
    }

    .pm-auth-register-panel .pm-auth-lead {
        margin-top: 6px;
        line-height: 1.38;
    }

    .pm-auth-alert {
        margin: 10px 0;
        padding: 9px 12px;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    .pm-auth-form {
        margin-top: clamp(12px, 1.8vh, 18px);
        gap: clamp(8px, 1.4vh, 12px);
    }

    .pm-auth-register-form {
        margin-top: 10px;
        gap: 8px;
    }

    .pm-auth-register-grid {
        gap: 8px 12px;
    }

    .pm-auth-field {
        gap: 5px;
    }

    .pm-auth-field > span:first-child,
    .pm-auth-choice-group legend {
        font-size: 0.86rem;
    }

    .pm-auth-input-wrap {
        min-height: clamp(42px, 5.4vh, 50px);
        border-radius: 12px;
        grid-template-columns: 40px 1fr auto;
    }

    .pm-auth-register-panel .pm-auth-input-wrap {
        min-height: clamp(38px, 4.8vh, 44px);
    }

    .pm-auth-input-icon svg,
    .pm-auth-password-toggle svg {
        width: 19px;
        height: 19px;
    }

    .pm-auth-password-toggle {
        width: 40px;
        height: 40px;
    }

    .pm-auth-form-language {
        padding: 6px 10px;
        border-radius: 12px;
    }

    .pm-auth-register-form .pm-auth-form-language {
        padding: 5px 9px;
    }

    .pm-auth-check span {
        width: 19px;
        height: 19px;
        border-radius: 6px;
    }

    .pm-auth-form-row {
        font-size: 0.91rem;
    }

    .pm-auth-submit {
        min-height: clamp(46px, 6vh, 54px);
        border-radius: 13px;
        font-size: 1rem;
        gap: 14px;
    }

    .pm-auth-register-panel .pm-auth-submit {
        min-height: clamp(42px, 5.3vh, 48px);
    }

    .pm-auth-submit span {
        font-size: 1.45rem;
    }

    .pm-auth-divider {
        gap: 12px;
        font-size: 0.9rem;
    }

    .pm-auth-google {
        min-height: clamp(42px, 5.4vh, 48px);
        border-radius: 13px;
        font-size: 0.96rem;
    }

    .pm-auth-bottom-link {
        font-size: 0.93rem;
    }

    .pm-auth-choice-group {
        gap: 6px;
    }

    .pm-auth-choice-grid {
        gap: 8px;
    }

    .pm-auth-choice-grid span {
        min-height: clamp(50px, 6.5vh, 64px);
        padding: 7px 8px;
        border-radius: 13px;
    }

    .pm-auth-choice-grid strong {
        font-size: 0.9rem;
    }

    .pm-auth-choice-grid em {
        font-size: 0.86rem;
    }

    .pm-auth-terms {
        font-size: 0.84rem;
        line-height: 1.32;
    }

    .pm-auth-sun {
        width: clamp(58px, 7vw, 84px);
        height: clamp(58px, 7vw, 84px);
        top: clamp(32px, 8vh, 70px);
        left: clamp(42px, 7vw, 76px);
    }

    .pm-auth-bamboo {
        height: min(350px, 54vh);
        right: 34px;
        top: 26px;
    }

    .pm-auth-art-hanzi {
        top: clamp(86px, 19vh, 150px);
        left: clamp(62px, 9vw, 108px);
        font-size: clamp(4rem, 6.7vw, 6rem);
    }

    .pm-auth-login-art > p {
        top: clamp(205px, 34vh, 270px);
        left: clamp(120px, 13vw, 168px);
        font-size: 1.15rem;
    }

    .pm-auth-login-art > strong {
        top: clamp(235px, 39vh, 305px);
        left: clamp(128px, 13.5vw, 176px);
        font-size: 1.04rem;
    }

    .pm-auth-dashboard-preview {
        left: clamp(42px, 6vw, 74px);
        bottom: clamp(60px, 13vh, 112px);
        width: clamp(180px, 17vw, 230px);
        min-height: 126px;
        padding: 14px;
    }

    .pm-auth-phone-card {
        right: clamp(44px, 6vw, 72px);
        bottom: clamp(44px, 9vh, 82px);
        width: clamp(120px, 12vw, 148px);
        height: clamp(172px, 27vh, 220px);
        padding: 12px;
    }

    .pm-auth-study-tools {
        left: clamp(52px, 9vw, 112px);
        bottom: clamp(22px, 5vh, 40px);
    }

    .pm-auth-study-tools span {
        min-width: 132px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .pm-auth-pagoda {
        left: clamp(46px, 7vw, 88px);
        top: clamp(150px, 28vh, 235px);
        width: clamp(160px, 18vw, 245px);
        height: clamp(126px, 20vh, 182px);
    }

    .pm-auth-vertical-text {
        top: clamp(96px, 19vh, 165px);
        right: clamp(98px, 15vw, 178px);
        font-size: clamp(1rem, 1.8vw, 1.5rem);
    }

    .pm-auth-book-stack {
        right: clamp(40px, 6vw, 84px);
        bottom: clamp(104px, 20vh, 160px);
    }

    .pm-auth-book-stack span {
        min-width: 132px;
        padding: 9px 14px;
        font-size: 0.88rem;
    }

    .pm-auth-open-book {
        right: clamp(88px, 13vw, 164px);
        bottom: clamp(32px, 7vh, 54px);
        width: clamp(122px, 15vw, 170px);
        height: clamp(84px, 13vh, 112px);
    }
}

/* Very short desktop and laptop screens: keep the whole form visible. */
@media (min-width: 1100px) and (max-height: 760px) {
    .pm-auth-shell {
        width: min(100% - 34px, 1220px);
        padding-block: 8px;
        grid-template-rows: 44px minmax(0, 1fr);
        gap: 7px;
    }

    .pm-auth-logo img {
        width: 118px;
        max-height: 40px;
    }

    .pm-auth-top-actions p {
        display: none;
    }

    .pm-auth-outline-link {
        min-height: 34px;
        padding-inline: 14px;
    }

    .pm-auth-top-actions select,
    .pm-auth-form-language select {
        min-height: 32px;
    }

    .pm-auth-form-side,
    .pm-auth-register-panel .pm-auth-form-side {
        padding: 12px 28px;
    }

    .pm-auth-kicker,
    .pm-auth-mark {
        display: none;
    }

    .pm-auth-form-head h1 {
        font-size: 2.35rem;
    }

    .pm-auth-register-panel .pm-auth-form-head h1 {
        font-size: 1.65rem;
    }

    .pm-auth-lead {
        display: none;
    }

    .pm-auth-form,
    .pm-auth-register-form {
        margin-top: 8px;
        gap: 7px;
    }

    .pm-auth-field {
        gap: 4px;
    }

    .pm-auth-field > span:first-child,
    .pm-auth-choice-group legend {
        font-size: 0.8rem;
    }

    .pm-auth-input-wrap,
    .pm-auth-register-panel .pm-auth-input-wrap {
        min-height: 38px;
    }

    .pm-auth-form-language {
        padding: 4px 8px;
        font-size: 0.84rem;
    }

    .pm-auth-form-row {
        font-size: 0.82rem;
    }

    .pm-auth-submit,
    .pm-auth-register-panel .pm-auth-submit,
    .pm-auth-google {
        min-height: 38px;
        font-size: 0.92rem;
    }

    .pm-auth-divider {
        display: none;
    }

    .pm-auth-bottom-link {
        font-size: 0.85rem;
    }

    .pm-auth-choice-grid span {
        min-height: 42px;
        padding: 5px 6px;
    }

    .pm-auth-choice-grid strong,
    .pm-auth-choice-grid em {
        font-size: 0.8rem;
    }

    .pm-auth-terms {
        font-size: 0.78rem;
    }
}

/* Tablet and mobile: never hide overflowing form content. */
@media (max-width: 1099px) {
    .pm-auth-body {
        height: auto;
        min-height: 100svh;
        overflow-y: auto;
    }

    .pm-auth-shell {
        min-height: 100svh;
        height: auto;
    }

    .pm-auth-panel {
        overflow: visible;
    }

    .pm-auth-form-side,
    .pm-auth-register-panel .pm-auth-form-side {
        overflow: visible;
    }
}

@media (max-width: 760px) {
    .pm-auth-shell {
        width: min(100% - 24px, 560px);
        padding: 18px 0 22px;
        gap: 14px;
    }

    .pm-auth-topbar {
        min-height: 54px;
        align-items: center;
    }

    .pm-auth-logo img {
        width: clamp(132px, 45vw, 174px);
    }

    .pm-auth-panel {
        border-radius: 24px;
        box-shadow: 0 18px 48px rgba(31, 41, 55, 0.1);
    }

    .pm-auth-form-side,
    .pm-auth-register-panel .pm-auth-form-side {
        padding: clamp(22px, 6vw, 32px) clamp(16px, 5vw, 26px);
    }

    .pm-auth-form-head h1,
    .pm-auth-register-panel .pm-auth-form-head h1 {
        font-size: clamp(2rem, 9vw, 3.25rem);
        line-height: 1.06;
    }

    .pm-auth-lead,
    .pm-auth-register-panel .pm-auth-lead {
        font-size: clamp(0.98rem, 4vw, 1.16rem);
        line-height: 1.55;
    }

    .pm-auth-input-wrap {
        min-height: 54px;
    }

    .pm-auth-submit {
        min-height: 56px;
    }

    .pm-auth-register-grid {
        grid-template-columns: 1fr;
    }

    .pm-auth-choice-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pm-auth-choice-grid span {
        min-height: 70px;
    }
}

@media (max-width: 520px) {
    .pm-auth-choice-grid {
        grid-template-columns: 1fr;
    }

    .pm-auth-form-language,
    .pm-auth-form-row {
        align-items: stretch;
        flex-direction: column;
    }

    .pm-auth-form-language .pm-locale-switcher,
    .pm-auth-form-language select,
    .pm-auth-mobile-locale select {
        width: 100%;
        min-width: 0;
    }
}
