.mobile-bottom-menu {
    position: fixed;
    z-index: 90;
    inset: 0;
    color: #26282d;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.mobile-bottom-menu[hidden],
.mobile-drawer-login[hidden] {
    display: none;
}

.mobile-bottom-menu__backdrop,
.mobile-drawer-login__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
}

.mobile-bottom-menu__backdrop {
    background: rgba(0, 0, 0, .5);
}

.mobile-bottom-menu__panel {
    position: absolute;
    z-index: 1;
    inset: 0 auto 0 0;
    display: flex;
    box-sizing: border-box;
    width: 80vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0 0 env(safe-area-inset-bottom);
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: #fff7fa;
    box-shadow: 2px 0 8px rgba(0, 0, 0, .15);
    flex-direction: column;
    animation: mobile-bottom-menu-enter .3s ease;
}

.mobile-bottom-menu__hero {
    display: flex;
    min-height: 104px;
    padding: calc(17px + env(safe-area-inset-top)) 23px 17px;
    background: linear-gradient(135deg, #ff5a91 0%, #ff7eaa 100%);
    color: #fff;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
}

.mobile-bottom-menu__hero-account {
    display: flex;
    min-width: 0;
    color: inherit;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    flex: 1;
}

.mobile-bottom-menu__hero-account:focus-visible {
    border-radius: 8px;
    outline: 2px solid rgba(255, 255, 255, .9);
    outline-offset: 3px;
}

.mobile-bottom-menu__hero-icon,
.mobile-bottom-menu__app-download-icon {
    display: grid;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 0;
    background: transparent;
    place-items: center;
    flex: 0 0 auto;
}

.mobile-bottom-menu__hero-icon svg,
.mobile-bottom-menu__app-download-icon svg {
    width: 26.4px;
    height: 26.4px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
}

.mobile-bottom-menu__hero-avatar {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-bottom-menu__hero-avatar[hidden],
.mobile-bottom-menu__hero-icon svg[hidden] {
    display: none;
}

[data-mobile-drawer-account-state="guest"] [data-mobile-drawer-avatar],
[data-mobile-drawer-account-state="authenticated"] [data-mobile-drawer-guest-icon] {
    display: none !important;
}

[data-mobile-drawer-account-state="authenticated"] [data-mobile-drawer-avatar] {
    display: block !important;
}

.mobile-bottom-menu__hero-copy,
.mobile-bottom-menu__app-download > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.mobile-bottom-menu__hero-copy {
    flex: 1;
}

.mobile-bottom-menu__hero-copy strong {
    overflow: hidden;
    font-size: clamp(16px, 4.55vw, 17px);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-bottom-menu__hero-copy small,
.mobile-bottom-menu__app-download small {
    overflow: hidden;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(10px, 2.9vw, 11px);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-bottom-menu__hero-login {
    display: inline-flex;
    min-width: 55px;
    height: 36px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(184, 32, 88, .18);
    color: #f35386;
    font-size: clamp(12px, 3.45vw, 13px);
    font-weight: 700;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 0 0 auto;
}

.mobile-bottom-menu__app-download {
    display: grid;
    min-height: 82px;
    margin: 11.5px;
    padding: 0 23px;
    border: 1px solid rgba(255, 255, 255, .74);
    border-radius: 10px;
    background: linear-gradient(135deg, #ff74a3 0%, #ffa4c0 100%);
    box-shadow: 0 5px 14px rgba(255, 107, 165, .3);
    color: #fff;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}

.mobile-bottom-menu__app-download[hidden] {
    display: none;
}

.mobile-bottom-menu__app-download strong {
    font-size: clamp(14px, 4vw, 15px);
    line-height: 1.2;
}

.mobile-bottom-menu__app-download b {
    color: rgba(255, 255, 255, .9);
    font-size: 25px;
    font-weight: 300;
    text-align: right;
}

.mobile-bottom-menu__links {
    border-top: 1px solid #f4e8ec;
    border-bottom: 1px solid #f4e8ec;
    background: #fff;
}

.mobile-bottom-menu .pc-quick-menu__item {
    display: grid;
    min-height: 59px;
    padding: 0 23px;
    border-bottom: 1px solid #f2f0f1;
    border-radius: 0;
    color: #26282d;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    font-size: clamp(13px, 3.75vw, 14px);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.mobile-bottom-menu .pc-quick-menu__item:last-child {
    border-bottom: 0;
}

.mobile-bottom-menu .pc-quick-menu__icon {
    display: grid;
    width: 28px;
    height: 28px;
    border-radius: 0;
    background: transparent;
    color: #303136;
    place-items: center;
}

.mobile-bottom-menu .pc-quick-menu__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.mobile-bottom-menu .pc-quick-menu__meta {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    color: #96999f;
    font-size: clamp(10px, 2.9vw, 11px);
    font-weight: 500;
    white-space: nowrap;
}

.mobile-bottom-menu .pc-quick-menu__meta strong {
    padding: 2px 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff6d91, #ff875f);
    color: #fff;
    font-size: clamp(8px, 2.4vw, 9px);
    font-weight: 800;
    letter-spacing: .06em;
}

.mobile-drawer-login {
    position: fixed;
    z-index: 110;
    inset: 0;
    display: grid;
    padding: 16px;
    color: #25262b;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    place-items: center;
}

.mobile-drawer-login__backdrop {
    background: rgba(22, 23, 28, .48);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.mobile-drawer-login__panel {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(360px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 27px 20px 20px;
    overflow-y: auto;
    border: 1px solid rgba(30, 33, 38, .09);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(21, 24, 31, .28);
}

.mobile-drawer-login__panel h2 {
    margin: 0 36px 22px;
    color: #25262b;
    font-size: clamp(18px, 5.4vw, 20px);
    line-height: 1.25;
    text-align: center;
}

.mobile-drawer-login__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ececef;
    border-radius: 50%;
    background: #fff;
    color: #696b72;
    font-size: 0;
    cursor: pointer;
    place-items: center;
}

.mobile-drawer-login__close::before,
.mobile-drawer-login__close::after {
    position: absolute;
    width: 14px;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    content: '';
}

.mobile-drawer-login__close::before { transform: rotate(45deg); }
.mobile-drawer-login__close::after { transform: rotate(-45deg); }

.mobile-drawer-login form,
.mobile-drawer-login label {
    display: flex;
    flex-direction: column;
}

.mobile-drawer-login form { gap: 14px; }

.mobile-drawer-login form[hidden],
.mobile-drawer-login__switch[hidden],
.mobile-drawer-login__captcha[hidden] {
    display: none;
}

.mobile-drawer-login label {
    gap: 7px;
    color: #4e5057;
    font-size: clamp(12px, 3.45vw, 13px);
    font-weight: 600;
}

.mobile-drawer-login input {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #e5e5e9;
    border-radius: 10px;
    outline: 0;
    background: #fafafd;
    color: #25262b;
    font: inherit;
    /* iOS/WebKit 会在聚焦小于 16px 的输入框时放大视觉视口。 */
    font-size: 16px;
    line-height: 1.25;
}

.mobile-drawer-login input:focus {
    border-color: #ff6d9b;
    outline: none;
    box-shadow: none;
    background: #fff;
}

.mobile-drawer-login__password,
.mobile-drawer-login__captcha label > span:last-child {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-drawer-login__password input { padding-right: 48px; }

.mobile-drawer-login__password button {
    position: absolute;
    right: 5px;
    width: 38px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #92949a;
    cursor: pointer;
}

.mobile-drawer-login__captcha input { padding-right: 105px; }

.mobile-drawer-login__captcha button {
    position: absolute;
    right: 4px;
    width: 96px;
    height: 36px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    background: #f1f1f4;
    cursor: pointer;
}

.mobile-drawer-login__captcha img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-drawer-login__feedback {
    display: none;
}

.mobile-drawer-auth-toast {
    position: fixed;
    z-index: 210;
    top: 50%;
    left: 50%;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100vw - 28px);
    min-height: 0;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(27, 29, 33, .92);
    box-shadow: 0 12px 34px rgba(14, 16, 21, .22);
    color: #fff;
    font-size: clamp(12px, 3.45vw, 13px);
    font-weight: 600;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translate(-50%, calc(-50% - 10px));
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    visibility: hidden;
    white-space: normal;
}

.mobile-drawer-auth-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%);
    visibility: visible;
}

.mobile-drawer-login__submit {
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff5a91, #ff7eaa);
    box-shadow: 0 8px 18px rgba(236, 63, 123, .22);
    color: #fff;
    font-size: clamp(14px, 4vw, 15px);
    font-weight: 700;
    cursor: pointer;
}

.mobile-drawer-login__submit:disabled {
    cursor: wait;
    opacity: .66;
}

.mobile-drawer-login__switch {
    margin-top: 15px;
    color: #81838a;
    font-size: clamp(11px, 3.2vw, 12px);
    text-align: center;
}

.mobile-drawer-login__switch button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #ff4f8b;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.mobile-drawer-login__switch button:hover,
.mobile-drawer-login__switch button:focus-visible {
    color: #e93472;
    text-decoration: underline;
}

body.has-mobile-drawer-login,
body.has-mobile-bottom-menu {
    overflow: hidden;
}

@keyframes mobile-bottom-menu-enter {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@media (min-width: 681px) {
    .mobile-bottom-menu__panel { width: min(80vw, 430px); }
}
