:root {
    --cream-canvas: #f3ecdf;
    --cream-paper: #fffdf7;
    --cream-soft: #fbf7ee;
    --ink: #243550;
    --ink-muted: #65738a;
    --line: #243550;
    --blue: #4c97ff;
    --blue-dark: #3373cc;
    --yellow: #ffcf3f;
    --yellow-soft: #fff1b8;
    --coral: #e96b5f;
    --sage: #76a98e;
    --shadow: 7px 7px 0 rgba(36, 53, 80, 0.16);
    --shadow-small: 4px 4px 0 rgba(36, 53, 80, 0.14);
}

.account-page,
.account-page * {
    box-sizing: border-box;
}

.account-page {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
    background-color: var(--cream-canvas);
    background-image: radial-gradient(rgba(36, 53, 80, 0.09) 1px, transparent 1.25px);
    background-size: 18px 18px;
}

.login-page,
.register-page {
    display: block;
    padding: 0;
    overflow-x: hidden;
}

.account-page .particles {
    display: none;
}

.account-page .bg-decoration {
    position: fixed;
    z-index: 0;
    opacity: 1;
    filter: none;
    border: 2px solid var(--line);
    border-radius: 28px;
    animation: none;
    pointer-events: none;
}

.account-page .bg-decoration-1 {
    top: -96px;
    right: -75px;
    width: 260px;
    height: 210px;
    background: var(--yellow);
    transform: rotate(12deg);
}

.account-page .bg-decoration-2 {
    bottom: -90px;
    left: -80px;
    width: 230px;
    height: 190px;
    background: #b8dcff;
    transform: rotate(-10deg);
}

.account-page .bg-decoration-3 {
    top: 24%;
    left: 5%;
    width: 74px;
    height: 74px;
    background: #f5a39a;
    border-radius: 50%;
}

.account-page .back-link {
    position: fixed;
    top: 24px;
    left: 28px;
    z-index: 20;
    display: inline-flex;
    gap: 9px;
    align-items: center;
    padding: 10px 14px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: var(--cream-paper);
    border: 2px solid var(--line);
    border-radius: 10px;
    box-shadow: 3px 3px 0 rgba(36, 53, 80, 0.14);
    backdrop-filter: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.account-page .back-link:hover {
    color: var(--ink);
    background: var(--yellow-soft);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(36, 53, 80, 0.14);
}

.auth-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(300px, 0.82fr) minmax(390px, 1fr);
    width: min(100% - 40px, 1020px);
    min-height: 650px;
    margin: 68px auto 32px;
    overflow: hidden;
    background: var(--cream-paper);
    border: 2px solid var(--line);
    border-radius: 24px;
    box-shadow: 10px 10px 0 rgba(36, 53, 80, 0.16);
}

.auth-shell-register {
    width: min(100% - 40px, 1120px);
    min-height: 720px;
}

.auth-story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 48px;
    background-color: var(--yellow-soft);
    background-image: radial-gradient(rgba(36, 53, 80, 0.11) 1px, transparent 1.25px);
    background-size: 17px 17px;
    border-right: 2px solid var(--line);
}

.auth-story::before,
.auth-story::after {
    position: absolute;
    border: 2px solid var(--line);
    content: "";
}

.auth-story::before {
    top: 30px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: #f5a39a;
    border-radius: 50%;
}

.auth-story::after {
    right: -19px;
    bottom: 68px;
    width: 34px;
    height: 34px;
    background: var(--blue);
    border-radius: 9px;
    transform: rotate(12deg);
}

.story-badge,
.welcome-kicker,
.eyebrow {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    width: fit-content;
    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.story-badge {
    padding: 7px 10px;
    background: var(--cream-paper);
    border: 1.5px solid var(--line);
    border-radius: 8px;
}

.auth-story h2 {
    margin: 24px 0 16px;
    color: var(--ink);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.18;
    letter-spacing: -0.045em;
}

.auth-story > p {
    max-width: 380px;
    margin: 0;
    color: #4e5f77;
    font-size: 15px;
    line-height: 1.8;
}

.story-points {
    display: grid;
    gap: 13px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.story-points li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
}

.story-points li > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--ink);
    background: var(--cream-paper);
    border: 1.5px solid var(--line);
    border-radius: 11px;
}

.story-points strong,
.register-steps strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
}

.story-points small,
.register-steps small {
    display: block;
    margin-top: 2px;
    color: var(--ink-muted);
    font-size: 12px;
    line-height: 1.4;
}

.story-note {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-top: 34px;
    padding: 11px 12px;
    color: #485a72;
    font-size: 12px;
    line-height: 1.5;
    background: rgba(255, 253, 247, 0.72);
    border-left: 4px solid var(--coral);
    border-radius: 7px;
}

.register-steps {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.register-steps > div {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 13px;
    align-items: center;
}

.register-steps b {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--cream-paper);
    font-size: 12px;
    background: var(--ink);
    border-radius: 50%;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 46px 54px;
    background: var(--cream-paper);
}

.account-page .login-container,
.account-page .register-container {
    position: static;
    z-index: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    animation: none;
}

.account-page .logo-section {
    margin-bottom: 28px;
    text-align: left;
}

.account-page .logo-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 0 18px;
    place-items: center;
    color: var(--ink);
    font-size: 23px;
    background: var(--yellow);
    border: 2px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-small);
    transition: none;
}

.account-page .logo-icon::before {
    display: none;
}

.account-page .logo-icon:hover {
    transform: none;
    box-shadow: var(--shadow-small);
}

.account-page .eyebrow {
    margin-bottom: 7px;
    color: var(--blue-dark);
}

.account-page .logo-title {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.account-page .logo-subtitle {
    margin: 0;
    color: var(--ink-muted);
    font-size: 14px;
}

.account-page .form-group {
    position: relative;
    margin-bottom: 18px;
}

.account-page .form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0;
}

.account-page .required {
    margin-left: 3px;
    color: var(--coral);
}

.account-page .input-wrapper,
.account-page .password-wrapper,
.profile-page .password-input-wrapper {
    position: relative;
}

.account-page .form-input,
.account-page .form-select {
    width: 100%;
    min-height: 46px;
    padding: 0 44px;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    background: #fffefb;
    border: 1.5px solid #9ca7b8;
    border-radius: 10px;
    outline: none;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.account-page .form-select {
    appearance: none;
}

.account-page .form-input:focus,
.account-page .form-select:focus {
    color: var(--ink);
    background: #fff;
    border-color: var(--blue-dark);
    box-shadow: 0 0 0 3px rgba(76, 151, 255, 0.18);
}

.account-page .form-input::placeholder {
    color: #9aa5b5;
}

.account-page .input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    color: #718097;
    font-size: 15px;
    transform: translateY(-50%);
}

.account-page .toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    z-index: 2;
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    color: #6f7c91;
    font-size: 14px;
    background: transparent;
    border: 0;
    border-radius: 7px;
    transform: translateY(-50%);
    cursor: pointer;
}

.account-page .toggle-password:hover {
    color: var(--ink);
    background: var(--yellow-soft);
    transform: translateY(-50%);
}

.account-page .options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 22px;
    font-size: 13px;
}

.account-page .remember-me,
.account-page .agreement {
    color: #53637a;
}

.account-page input[type="checkbox"] {
    accent-color: var(--blue-dark);
}

.account-page .forgot-password,
.account-page .register-link a,
.account-page .login-link a,
.account-page .agreement a {
    color: var(--blue-dark);
    font-weight: 750;
    text-decoration: none;
}

.account-page button.forgot-password {
    padding: 3px 0;
    font: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.account-page .forgot-password:hover,
.account-page .register-link a:hover,
.account-page .login-link a:hover,
.account-page .agreement a:hover {
    color: #235ea9;
    background: transparent;
}

.account-page .submit-btn,
.account-page .modal-btn,
.profile-page .btn-primary {
    min-height: 46px;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: var(--yellow);
    border: 2px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-small);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.account-page .submit-btn {
    width: 100%;
    margin: 0 0 22px;
    padding: 0 18px;
}

.account-page .submit-btn::before {
    display: none;
}

.account-page .submit-btn:hover,
.account-page .modal-btn:hover,
.profile-page .btn-primary:hover {
    background: var(--yellow);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(36, 53, 80, 0.17);
}

.account-page .submit-btn:active,
.account-page .modal-btn:active,
.profile-page .btn-primary:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 rgba(36, 53, 80, 0.17);
}

.account-page .submit-btn:disabled {
    color: #667386;
    background: #ddd8cd;
    border-color: #98a0ac;
    box-shadow: none;
}

.account-page .loading-spinner {
    border-color: rgba(36, 53, 80, 0.25);
    border-top-color: var(--ink);
}

.account-page .divider {
    position: relative;
    margin-bottom: 17px;
    text-align: center;
}

.account-page .divider::before {
    background: #c9c2b6;
}

.account-page .divider span {
    position: relative;
    padding: 0 12px;
    color: #788397;
    font-size: 12px;
    background: var(--cream-paper);
}

.account-page .register-link,
.account-page .login-link {
    color: #596980;
    font-size: 14px;
    text-align: center;
}

.account-page .register-link a,
.account-page .login-link a {
    margin-left: 6px;
}

.account-page .register-link a::after,
.account-page .login-link a::after {
    display: none;
}

.account-page .message {
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    padding: 11px 13px;
    font-size: 13px;
    border-width: 1.5px;
    border-style: solid;
    border-radius: 9px;
    animation: none;
}

.account-page .error-message {
    color: #8b342e;
    background: #fce8e4;
    border-color: #d8897f;
}

.account-page .success-message {
    color: #2f654d;
    background: #e6f3eb;
    border-color: #83b79c;
}

.register-page .auth-form-panel {
    padding: 40px 48px;
}

.register-page #registerForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.register-page #registerForm > .agreement-section,
.register-page #registerForm > .submit-btn {
    grid-column: 1 / -1;
}

.register-page .agreement-section {
    display: grid;
    gap: 8px;
    margin: 1px 0 20px;
    padding: 12px 14px;
    background: var(--cream-soft);
    border: 1px solid #d5ccbd;
    border-radius: 9px;
}

.register-page .agreement {
    display: grid;
    grid-template-columns: 17px 1fr;
    gap: 8px;
    align-items: start;
    font-size: 12px;
    line-height: 1.55;
}

.register-page .agreement input {
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

.register-page .password-strength {
    height: 4px;
    margin-top: 7px;
    overflow: hidden;
    background: #ded8ce;
    border-radius: 2px;
}

.register-page .password-strength-bar {
    border-radius: 2px;
}

.register-page .password-strength-text {
    margin-top: 4px;
    font-size: 11px;
}

.register-page .modal {
    background: rgba(36, 53, 80, 0.38);
    backdrop-filter: blur(4px);
}

.register-page .modal-content {
    overflow: hidden;
    color: var(--ink);
    background: var(--cream-paper);
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.register-page .modal-header,
.register-page .modal-footer {
    background: var(--cream-soft);
    border-color: #cfc6b8;
}

.register-page .modal-header h2,
.register-page .modal-body h3 {
    color: var(--ink);
}

.register-page .modal-close {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 38px;
    padding: 0;
    place-items: center;
    color: var(--ink);
    font-size: 25px;
    line-height: 1;
    background: var(--cream-paper);
    border: 1.5px solid var(--line);
    border-radius: 9px;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.register-page .modal-close:hover {
    color: #8b342e;
    background: #fce8e4;
    transform: translateY(-1px);
}

/* 登录页：邮件验证码找回密码 */
.login-page.reset-modal-open {
    overflow: hidden;
}

.login-page .reset-password-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    padding: 22px;
    place-items: center;
    visibility: hidden;
    background: rgba(36, 53, 80, 0.42);
    opacity: 0;
    backdrop-filter: blur(5px);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.login-page .reset-password-modal.show {
    visibility: visible;
    opacity: 1;
}

.login-page .reset-password-card {
    width: min(100%, 520px);
    max-height: calc(100vh - 44px);
    padding: 30px;
    overflow-y: auto;
    background: var(--cream-paper);
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: 9px 9px 0 rgba(36, 53, 80, 0.2);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.2s ease;
}

.login-page .reset-password-modal.show .reset-password-card {
    transform: translateY(0) scale(1);
}

.login-page .reset-password-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
}

.login-page .reset-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--blue-dark);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.login-page .reset-password-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 27px;
    line-height: 1.2;
}

.login-page .reset-password-header p {
    margin: 7px 0 0;
    color: var(--ink-muted);
    font-size: 13px;
    line-height: 1.6;
}

.login-page .reset-close {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
    background: var(--cream-soft);
    border: 1.5px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.login-page .reset-close i {
    display: block;
    line-height: 1;
}

.login-page .reset-close:hover {
    background: #fce8e4;
    transform: rotate(6deg) scale(1.04);
}

.login-page .reset-progress {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
}

.login-page .reset-progress::before {
    position: absolute;
    top: 17px;
    right: 16%;
    left: 16%;
    z-index: 0;
    height: 2px;
    background: #d7d0c4;
    content: '';
}

.login-page .reset-progress li {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    justify-items: center;
    color: #7d8797;
    font-size: 11px;
    font-weight: 700;
}

.login-page .reset-progress b {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    background: var(--cream-soft);
    border: 1.5px solid #aaa69f;
    border-radius: 50%;
}

.login-page .reset-progress li.active,
.login-page .reset-progress li.complete {
    color: var(--ink);
}

.login-page .reset-progress li.active b {
    background: var(--yellow);
    border-color: var(--line);
    box-shadow: 2px 2px 0 rgba(36, 53, 80, 0.16);
}

.login-page .reset-progress li.complete b {
    color: #fff;
    background: var(--sage);
    border-color: var(--line);
}

.login-page .reset-step[hidden] {
    display: none;
}

.login-page .reset-step.active {
    animation: reset-step-in 0.22s ease both;
}

@keyframes reset-step-in {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

.login-page .reset-step-heading {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-bottom: 19px;
    padding: 13px;
    background: var(--cream-soft);
    border: 1px solid #d9d0c2;
    border-radius: 12px;
}

.login-page .reset-step-heading h3,
.login-page .reset-step-heading p {
    margin: 0;
}

.login-page .reset-step-heading h3 {
    margin-bottom: 3px;
    color: var(--ink);
    font-size: 15px;
}

.login-page .reset-step-heading p {
    color: var(--ink-muted);
    font-size: 12px;
}

.login-page .reset-step-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    background: var(--yellow-soft);
    border: 1.5px solid var(--line);
    border-radius: 11px;
}

.login-page .reset-step-icon.blue { background: #dcecff; }
.login-page .reset-step-icon.coral { background: #f8d6d2; }

.login-page .reset-step .form-label {
    display: block;
    margin-bottom: 8px;
}

.login-page .reset-step .form-group {
    margin-bottom: 15px;
}

.login-page .reset-primary-button {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 47px;
    margin-top: 18px;
    padding: 0 18px;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    background: var(--yellow);
    border: 2px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-small);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-page .reset-primary-button:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(36, 53, 80, 0.17);
}

.login-page .reset-primary-button:disabled {
    color: #667386;
    background: #ddd8cd;
    border-color: #98a0ac;
    box-shadow: none;
    cursor: wait;
}

.login-page .reset-code-input {
    width: 100%;
    height: 62px;
    padding: 0 18px;
    color: var(--ink);
    font-family: inherit;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 0.32em;
    text-align: center;
    background: #fff;
    border: 1.5px solid #a7a49e;
    border-radius: 11px;
    outline: none;
}

.login-page .reset-code-input:focus {
    border-color: var(--blue-dark);
    box-shadow: 0 0 0 3px rgba(76, 151, 255, 0.16);
}

.login-page .reset-code-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 11px;
}

.login-page .reset-text-button {
    padding: 4px 0;
    color: var(--blue-dark);
    font-family: inherit;
    font-size: 12px;
    font-weight: 750;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.login-page .reset-text-button:disabled {
    color: #9299a4;
    cursor: default;
}

.login-page .reset-inline-message {
    display: none;
    margin: -10px 0 17px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.55;
    border: 1px solid transparent;
    border-radius: 9px;
}

.login-page .reset-inline-message.show { display: block; }
.login-page .reset-inline-message.success { color: #2f654d; background: #e6f3eb; border-color: #83b79c; }
.login-page .reset-inline-message.error { color: #8b342e; background: #fce8e4; border-color: #d8897f; }
.login-page .reset-inline-message.info { color: #285785; background: #e5f0ff; border-color: #91b7e5; }

/* Personal center */
.profile-page {
    --profile-grid-gap: 16px;
    display: block;
    padding: 0 0 48px;
    overflow-x: hidden;
}

.profile-page .navbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px max(28px, calc((100vw - 1180px) / 2));
    background: var(--cream-paper);
    border-bottom: 2px solid var(--line);
    box-shadow: none;
    backdrop-filter: none;
}

.profile-page .navbar-brand {
    gap: 11px;
    color: var(--ink);
}

.profile-page .navbar-logo {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    font-size: 20px;
    background: var(--yellow);
    border: 2px solid var(--line);
    border-radius: 10px;
    box-shadow: 3px 3px 0 rgba(36, 53, 80, 0.14);
    overflow: hidden;
}

.profile-page .navbar-logo i {
    animation: puzzleFloat 3.4s ease-in-out infinite;
}

.profile-page .navbar-brand:hover .navbar-logo i {
    animation-play-state: paused;
    transform: rotate(-10deg) scale(1.08);
}

.profile-page .navbar-title {
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
}

.profile-page .navbar-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.profile-page .nav-link {
    padding: 8px 12px;
    color: #5b6980;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid transparent;
    border-radius: 8px;
}

.profile-page .nav-link:hover {
    color: var(--ink);
    background: var(--cream-soft);
}

.profile-page .nav-link.active {
    color: var(--ink);
    background: var(--yellow-soft);
    border-color: var(--line);
}

.profile-page .main-content {
    position: relative;
    z-index: 2;
    width: min(100% - 40px, 1180px);
    margin: 34px auto 0;
    padding: 0;
}

.profile-page .welcome-banner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
    margin-bottom: 22px;
    padding: 30px 36px;
    overflow: hidden;
    color: var(--ink);
    background-color: var(--yellow-soft);
    background-image: radial-gradient(rgba(36, 53, 80, 0.1) 1px, transparent 1.3px);
    background-size: 17px 17px;
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    animation: profileReveal 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.profile-page .welcome-banner::after {
    position: absolute;
    right: 132px;
    bottom: -30px;
    width: 92px;
    height: 92px;
    background: #f3a69c;
    border: 2px solid var(--line);
    border-radius: 50%;
    content: "";
}

.profile-page .welcome-kicker {
    margin-bottom: 12px;
}

.profile-page .welcome-greeting {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: clamp(27px, 4vw, 38px);
    letter-spacing: -0.035em;
}

.profile-page .user-id,
.profile-page .welcome-subtitle {
    color: #56657a;
}

.profile-page .welcome-subtitle {
    max-width: 650px;
    margin-top: 8px;
    line-height: 1.65;
}

.profile-page .welcome-avatar {
    position: relative;
    z-index: 2;
    display: grid;
    width: 98px;
    height: 98px;
    place-items: center;
    overflow: hidden;
    color: var(--ink);
    font-size: 42px;
    background: var(--cream-paper);
    border: 2px solid var(--line);
    border-radius: 23px;
    box-shadow: var(--shadow-small);
}

.profile-page .welcome-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-page .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--profile-grid-gap);
    margin-bottom: 22px;
}

.profile-page .stat-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 0 14px;
    align-items: center;
    padding: 18px;
    text-align: left;
    background: var(--cream-paper);
    border: 2px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-small);
    animation: profileReveal 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-page .stat-card:nth-child(1) {
    animation-delay: 0.08s;
}

.profile-page .stat-card:nth-child(2) {
    animation-delay: 0.14s;
}

.profile-page .stat-card:nth-child(3) {
    animation-delay: 0.2s;
}

.profile-page .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 6px 7px 0 rgba(36, 53, 80, 0.15);
}

.profile-page .stat-card:hover .stat-icon {
    transform: rotate(-4deg) scale(1.04);
}

.profile-page .stat-icon {
    grid-row: 1 / 3;
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0;
    place-items: center;
    color: var(--ink);
    font-size: 18px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    transition: transform 0.18s ease;
}

.profile-page .stat-icon.blue {
    background: #cce5ff;
}

.profile-page .stat-icon.pink {
    background: #f7c6bf;
}

.profile-page .stat-icon.green {
    background: #cde6d8;
}

.profile-page .stat-value {
    align-self: end;
    color: var(--ink);
    font-size: 24px;
    line-height: 1.1;
}

.profile-page .stat-label {
    align-self: start;
    color: var(--ink-muted);
    font-size: 12px;
}

.profile-dashboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--profile-grid-gap);
    align-items: stretch;
}

.profile-page .menu-section {
    display: contents;
}

/* 仪表盘卡片（账户设置 / 学习中心 / 我的）。
   学习进度已经搬进「我的课程」弹窗，不再是这里的一张卡 */
.profile-page .menu-card {
    height: 100%;
    margin: 0;
    padding: 22px;
    background: var(--cream-paper);
    border: 2px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-small);
    animation: profileReveal 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.26s backwards;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-page .menu-card:first-child {
    animation-delay: 0.22s;
}

.profile-page .menu-card:nth-child(2) {
    animation-delay: 0.26s;
}

.profile-page .menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 6px 7px 0 rgba(36, 53, 80, 0.15);
}

.profile-page .menu-title,
.profile-page .progress-title {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 0 0 16px;
    padding-bottom: 13px;
    color: var(--ink);
    font-size: 16px;
    border-bottom: 1.5px solid #d5ccbd;
}

.profile-page .menu-title i,
.profile-page .progress-title i {
    color: var(--blue-dark);
}

.profile-page .menu-list,
.profile-page .progress-list {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-page .menu-item {
    margin: 0;
}

.profile-page .menu-link {
    position: relative;
    display: grid;
    grid-template-columns: 31px 1fr auto;
    gap: 9px;
    align-items: center;
    min-height: 43px;
    padding: 7px 10px;
    color: #4b5d75;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    background: var(--cream-soft);
    border: 1px solid transparent;
    border-radius: 9px;
}

.profile-page .menu-link::after {
    color: #8b95a5;
    font-family: "Font Awesome 6 Free";
    font-size: 10px;
    font-weight: 900;
    content: "\f054";
    transition: transform 0.18s ease;
}

.profile-page .menu-link i {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    color: var(--ink);
    background: var(--yellow-soft);
    border: 1px solid #d1b94f;
    border-radius: 8px;
}

.profile-page .menu-link:hover {
    color: var(--ink);
    background: #fff7d6;
    border-color: var(--line);
    transform: translateX(2px);
}

.profile-page .menu-link:hover::after {
    transform: translateX(3px);
}

.profile-page .progress-item {
    margin: 0;
    padding: 12px 0;
    background: transparent;
    border-bottom: 1px solid #e0d9ce;
}

.profile-page .progress-item:last-child {
    border-bottom: 0;
}

.profile-page .progress-header {
    margin-bottom: 8px;
}

.profile-page .progress-name {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.profile-page .progress-percent {
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 800;
}

.profile-page .progress-bar {
    height: 9px;
    overflow: hidden;
    background: #e4ded3;
    border: 1px solid #aeb5c0;
    border-radius: 4px;
}

.profile-page .progress-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 2px;
    transform-origin: left center;
    animation: progressGrow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.38s backwards;
}

/* ---- 学习进度：模块状态着色 ----
   必须带 .profile-page 前缀：上面的 .profile-page .progress-fill 与本文件比
   profile.html 的内联样式后加载，同优先级会盖掉那边写的基础色。 */
.profile-page .progress-fill.is-completed {
    background: var(--sage);
}

.profile-page .progress-fill.is-current {
    background: var(--blue);
}

.profile-page .progress-fill.is-pending {
    background: #cec6b8;
}

.profile-page .progress-percent.is-pending {
    color: var(--ink-muted);
    font-weight: 700;
}

/* 章节计数：4/6 章 */
.profile-page .progress-meta {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-muted);
}

/* 卡片右上角：上次同步时间 + 手动刷新 */
.profile-page .progress-sync {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-muted);
}

.profile-page .progress-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    color: var(--ink-muted);
    font-size: 12px;
    background: var(--cream-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

/* 标题里的 i 有 .profile-page .progress-title i 这个更高优先级的规则，这里显式接管 */
.profile-page .progress-refresh i {
    color: inherit;
}

.profile-page .progress-refresh:hover:not(:disabled) {
    color: var(--ink);
    background: var(--yellow-soft);
    transform: translateY(-1px);
}

.profile-page .progress-refresh:disabled {
    cursor: default;
    opacity: 0.6;
}

.profile-page .progress-refresh.is-spinning i {
    animation: progressSpin 0.8s linear infinite;
}

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

.profile-page .progress-empty {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--ink-muted);
    text-align: center;
}

/* ---- 学习进度 ----
   原先是仪表盘上的一张卡，用固定高度 + 内部滚动把 8 个模块塞进 154px。
   现在整块搬进了「我的课程」弹窗（两列排布，随弹窗内容一起滚），
   不再需要进度列表自己的滚动条，也不再需要给首尾项收边距 ——
   那条 :first-child 收边距在两列网格里只会命中最左一格，会让右列整行下移 10px。 */

.profile-page .bg-decoration {
    animation: ambientDrift 8s ease-in-out infinite alternate;
}

.profile-page .bg-decoration-2 {
    animation-delay: -3s;
}

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

@keyframes progressGrow {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes puzzleFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-2px) rotate(-5deg);
    }
}

@keyframes ambientDrift {
    from {
        translate: 0 0;
    }
    to {
        translate: 9px -7px;
    }
}

.profile-page .logout-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.profile-page .logout-btn {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    width: auto;
    min-height: 42px;
    padding: 0 16px;
    color: #8b342e;
    font-size: 13px;
    font-weight: 750;
    background: #fce8e4;
    border: 1.5px solid #b65d54;
    border-radius: 9px;
    box-shadow: 3px 3px 0 rgba(139, 52, 46, 0.12);
}

.profile-page .logout-btn:hover {
    color: #742923;
    background: #f8d8d3;
    transform: translateY(-1px);
    box-shadow: 4px 4px 0 rgba(139, 52, 46, 0.12);
}

.profile-page .modal-overlay {
    background: rgba(36, 53, 80, 0.38);
    backdrop-filter: blur(4px);
}

.profile-page .modal-overlay .modal {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    color: var(--ink);
    background: var(--cream-paper);
    border: 2px solid var(--line);
    border-radius: 16px;
    background-clip: padding-box;
    box-shadow: var(--shadow);
}

.profile-page .modal-header,
.profile-page .modal-footer {
    flex: 0 0 auto;
    background: var(--cream-soft);
    border-color: #d5ccbd;
}

.profile-page .modal-header {
    border-radius: 14px 14px 0 0;
}

.profile-page .modal-body {
    min-height: 0;
    overflow-y: auto;
    background: var(--cream-paper);
}

.profile-page .modal-footer {
    border-radius: 0 0 14px 14px;
}

.profile-page .modal-title {
    color: var(--ink);
}

.profile-page .modal-close {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    color: var(--ink);
    background: var(--cream-paper);
    border: 1.5px solid var(--line);
    border-radius: 50%;
}

.profile-page .modal-body .form-input {
    padding: 0 12px;
}

/* 上面那条把弹窗里输入框的左右内边距统一收成 12px；
   但凡输入框里叠了图标的，都必须把那一侧让出来，否则文字会压到图标上：
   - 左侧图标 .input-icon 定位在 left:16px、约 15px 宽 → 左边留 42px
   - 右侧按钮 .toggle-password 定位在 right:14px、30px 宽 → 右边留 56px
   注意选择器要写到 4 层（.modal-body .xxx-wrapper .form-input），
   否则盖不过上面那条两层半的规则。 */
.profile-page .modal-body .input-wrapper .form-input {
    padding-left: 42px;
}

.profile-page .modal-body .password-input-wrapper .form-input {
    padding-right: 56px;
}

.profile-page .modal-body textarea.form-input {
    min-height: 90px;
    padding-top: 11px;
}

.profile-page .btn {
    min-height: 40px;
    padding: 0 15px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    border-radius: 9px;
}

.profile-page .btn-secondary {
    color: var(--ink);
    background: var(--cream-paper);
    border: 1.5px solid var(--line);
}

.profile-page .avatar-option {
    background: var(--cream-soft);
    border: 1.5px solid #aeb5c0;
    border-radius: 11px;
}

.profile-page .avatar-option.selected {
    border-color: var(--blue-dark);
    box-shadow: 0 0 0 3px rgba(76, 151, 255, 0.18);
}

.profile-page .setting-item {
    background: var(--cream-soft);
    border-color: #d5ccbd;
}

.profile-page .slider {
    background: #c7c0b5;
}

.profile-page .switch input:checked + .slider {
    background: var(--blue);
}

.profile-page .toast {
    color: var(--ink);
    background: var(--cream-paper);
    border: 2px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-small);
}

.account-page :focus-visible {
    outline: 3px solid rgba(76, 151, 255, 0.45);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .auth-shell,
    .auth-shell-register {
        grid-template-columns: 1fr;
        width: min(100% - 30px, 620px);
        margin-top: 78px;
    }

    .auth-story {
        padding: 34px 38px;
        border-right: 0;
        border-bottom: 2px solid var(--line);
    }

    .auth-story h2 {
        margin-top: 18px;
        font-size: 31px;
    }

    .story-points,
    .register-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        margin-top: 22px;
    }

    .story-points li,
    .register-steps > div {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .story-note {
        margin-top: 20px;
    }

    .auth-form-panel,
    .register-page .auth-form-panel {
        padding: 38px;
    }

    .profile-dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .account-page .back-link {
        top: 14px;
        left: 15px;
    }

    .auth-shell,
    .auth-shell-register {
        width: min(100% - 20px, 560px);
        margin-top: 66px;
        border-radius: 17px;
        box-shadow: 5px 5px 0 rgba(36, 53, 80, 0.14);
    }

    .auth-story {
        padding: 28px 24px;
    }

    .auth-story > p,
    .story-points,
    .register-steps,
    .story-note {
        display: none;
    }

    .auth-story h2 {
        margin-bottom: 0;
        font-size: 27px;
    }

    .auth-story::before {
        top: 24px;
        right: 22px;
        width: 34px;
        height: 34px;
    }

    .auth-form-panel,
    .register-page .auth-form-panel {
        padding: 30px 24px;
    }

    .register-page #registerForm {
        grid-template-columns: 1fr;
    }

    .register-page #registerForm > .agreement-section,
    .register-page #registerForm > .submit-btn {
        grid-column: auto;
    }

    .profile-page .navbar {
        padding: 10px 14px;
    }

    .profile-page .navbar-nav {
        gap: 2px;
    }

    .profile-page .nav-link:not(.active) {
        display: none;
    }

    .profile-page .navbar-title {
        font-size: 14px;
    }

    .profile-page .main-content {
        width: min(100% - 20px, 560px);
        margin-top: 20px;
    }

    .profile-page .welcome-banner {
        grid-template-columns: 1fr 68px;
        gap: 14px;
        padding: 23px 20px;
        border-radius: 15px;
        box-shadow: 5px 5px 0 rgba(36, 53, 80, 0.14);
    }

    .profile-page .welcome-avatar {
        width: 68px;
        height: 68px;
        font-size: 30px;
        border-radius: 16px;
    }

    .profile-page .welcome-greeting {
        font-size: 24px;
    }

    .profile-page .welcome-subtitle {
        font-size: 12px;
    }

    .profile-page .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .profile-page .stat-card {
        padding: 13px 15px;
    }

    .profile-page .menu-section {
        grid-template-columns: 1fr;
    }

    .profile-page .menu-card {
        padding: 18px;
    }

    .login-page .reset-password-modal {
        padding: 12px;
    }

    .login-page .reset-password-card {
        max-height: calc(100vh - 24px);
        padding: 23px 19px;
        border-radius: 16px;
        box-shadow: 5px 5px 0 rgba(36, 53, 80, 0.18);
    }

    .login-page .reset-password-header h2 {
        font-size: 23px;
    }

    .login-page .reset-password-header p {
        max-width: 260px;
    }

    .login-page .reset-progress {
        margin: 20px 0;
    }

    .login-page .reset-progress li span {
        font-size: 10px;
    }
}

/* ==========================================================================
   双通道身份验证（邮箱 / 手机）
   三个账号页共用：注册页手机号选填、登录页找回密码、个人中心改密与绑定手机号。
   ========================================================================== */
.account-page .verify-channel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
    padding: 6px;
    background: var(--cream-soft);
    border: 1.5px solid #c9c2b4;
    border-radius: 12px;
}

.account-page .verify-channel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 10px;
    color: var(--ink-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.account-page .verify-channel-btn i {
    font-size: 15px;
}

.account-page .verify-channel-btn:hover:not(.active):not(:disabled) {
    color: var(--ink);
    background: #fffefb;
}

.account-page .verify-channel-btn.active {
    color: #fff;
    background: var(--blue);
    border-color: var(--ink);
    box-shadow: var(--shadow-small);
}

.account-page .verify-channel-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* 验证码输入行：输入框 + 获取验证码按钮 */
.account-page .code-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.account-page .code-row .form-input {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 16px;
    padding-right: 16px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
}

.account-page .send-code-btn {
    flex: 0 0 auto;
    min-width: 124px;
    padding: 0 14px;
    color: var(--blue-dark);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    background: #fffefb;
    border: 1.5px solid var(--ink);
    border-radius: 10px;
    box-shadow: var(--shadow-small);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, color 0.15s ease;
}

.account-page .send-code-btn:hover:not(:disabled) {
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0 rgba(36, 53, 80, 0.18);
}

.account-page .send-code-btn:disabled {
    color: var(--ink-muted);
    background: var(--cream-soft);
    box-shadow: none;
    cursor: not-allowed;
}

/* 验证方式说明 / 反馈文案 */
.account-page .verify-hint {
    margin: 8px 0 0;
    color: var(--ink-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.account-page .verify-hint.is-error {
    color: var(--coral);
}

.account-page .verify-hint.is-ok {
    color: var(--sage);
}

.account-page .verify-hint.is-warn {
    color: #a9741a;
}

/* 只读展示（如已绑定手机号的打码显示） */
.account-page .verify-target {
    display: inline-block;
    padding: 2px 8px;
    color: var(--ink);
    font-weight: 700;
    background: var(--yellow-soft);
    border-radius: 6px;
}

/* 修改密码：两步流程（先验证身份，再设置新密码） */
.account-page .change-pwd-intro {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-muted);
    background: var(--yellow-soft);
    border-radius: 10px;
}

.account-page .change-pwd-intro i {
    margin-top: 3px;
    color: var(--blue-dark);
}

.account-page .change-pwd-intro.is-ok {
    color: #1f7a4d;
    background: #e6f6ec;
}

.account-page .change-pwd-intro.is-ok i {
    color: #1f7a4d;
}

.account-page .verify-target-line {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-muted);
}

.account-page .verify-target-line strong {
    color: var(--ink);
}

.account-page .verify-target-note {
    color: #8b98ab;
}

.account-page .change-pwd-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 6px 2px;
    font-size: 13px;
    color: var(--blue-dark);
    background: none;
    border: 0;
    cursor: pointer;
}

.account-page .change-pwd-back:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .account-page .code-row {
        flex-direction: column;
    }

    .account-page .send-code-btn {
        min-height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-page *,
    .account-page *::before,
    .account-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
