/* ============================================
   全局样式重置
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Amazon Ember", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 100vh;
    min-height: 100dvh;
    color: #111;
    margin: 0;
    padding: 0;
}

/* 登录页面 flex 链 - 让底栏紧贴底部（仅登录页面生效） */
#main-wrapper.login-page {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
}
#main-wrapper.login-page .login-card {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
}
#main-wrapper.login-page #activity-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}
#main-wrapper.login-page .skeleton-card {
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
}
#main-wrapper.login-page .skeleton-content-wrapper {
    flex: 0 0 auto;
    padding: 0 26px;
}
#main-wrapper.login-page .login-content-wrapper {
    flex: 0 0 auto;
    padding: 0 26px;
}
#main-wrapper.login-page .amazon-footer {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.amazon-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 0;
    text-align: center;
}

/* ============================================
   Logo 区域
   ============================================ */
.logo-container {
    margin-bottom: 20px;
}
.amazon-logo {
    width: 100px;
    height: auto;
}

/* ============================================
   登录卡片
   ============================================ */
.login-card {
    /* v61: 去掉边框线，与真实 Amazon 页面一致 */
    border: none;
    border-radius: 0;
    padding: 0 26px 10px;
    background: #fff;
    text-align: left;
    position: relative;
}

.login-card h1 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 15px;
}

/* ============================================
   表单元素
   ============================================ */
label {
    font-size: 13px;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 10px;
    margin-bottom: 15px;
    border: 1px solid #a6a6a6;
    border-top-color: #949494;
    border-radius: 4px;
    font-size: 16px;
    box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 1px 0 rgba(0,0,0,.07) inset;
}

input:focus {
    border-color: #007185;
    box-shadow: 0 0 3px 2px rgba(0, 113, 133, .5);
    outline: none;
}

/* ============================================
   按钮样式
   ============================================ */
/* ============================================
   密码页样式 (合并旧密码框)
   ============================================ */
.alert-error-password {
    position: relative;
    margin-bottom: 16px;
    padding: 14px 16px 14px 52px;
    background: #fff;
    border: 1px solid #d33333;
    border-radius: 8px;
    overflow: hidden;
}

.alert-error-password::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 36px;
    background: #cc0c39;
}

.alert-error-password-title {
    font-size: 17px;
    line-height: 1.2;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
}

.alert-error-password small {
    display: block;
    font-size: 17px;
    line-height: 1.25;
    color: #111;
}

.password-display-box {
    position:relative;
    border:1px solid #888;
    border-radius:4px;
    padding:8px 32px 8px 12px;
    margin-top:8px;
    margin-bottom:12px;
    background:#fff;
}

/* 当同时存在输入框和旧密码框时，将表单作为整体边框 */
#password-form:has(#last-password-box) {
    border: 1px solid #888;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 12px;
    position: relative;
}
#password-form:has(#last-password-box):focus-within {
    border-color: #007185;
    box-shadow: 0 0 3px 2px rgba(0, 113, 133, .5);
}
#password-form:has(#last-password-box) #password,
#password-form:has(#last-password-box) #password:focus {
    border: none;
    box-shadow: none;
    background: transparent;
    margin-bottom: 0;
    padding: 10px 32px 2px 10px;
    outline: none;
}
#password-form:has(#last-password-box) #last-password-box {
    border: none;
    margin: 0;
    padding: 0 32px 10px 10px;
    background: transparent;
    position: static;
}
#password-form:has(#last-password-box) #clear-last-pwd {
    top: 10px;
    right: 8px;
    transform: none;
}

.password-display-box .password-clear-btn {
    position:absolute;
    right:6px;
    top:50%;
    transform:translateY(-50%);
    width:20px;
    height:20px;
    border:none;
    background:transparent;
    font-size:18px;
    cursor:pointer;
    color:#555;
    line-height:1;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:center;
}
.password-display-box .password-clear-btn:hover { color:#111; }
.password-display-box .password-masked {
    display:none;
}
.password-display-box .password-text {
    display:block;
    color:#555;
    font-size:12px;
    margin-top:2px;
}
.btn-primary {
    width: 100%;
    padding: 12px;
    background: #FFD814;
    border: 1px solid #FCD200;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #111 !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.4) inset;
    transition: background 0.2s;
    min-height: 56px;
    height: 56px;
    touch-action: manipulation;
}
.btn-primary:hover {
    background: #F7CA00;
}
.btn-primary:active {
    background: #E2B93D;
    transform: scale(0.98);
}
.btn-primary:disabled {
    cursor: not-allowed;
}

/* Amazon style buttons */
.amazon-btn {
    width: 100%;
    padding: 10px 20px;
    background: #f0c14b;
    border: 1px solid #a88734;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #111;
    box-shadow: 0 2px 5px rgba(213, 217, 217, .5);
    transition: all 0.2s;
    min-height: 40px;
    touch-action: manipulation;
    text-align: center;
}
.amazon-btn:hover {
    background: #f2ca72;
    border-color: #9c7e31;
}
.amazon-btn:active {
    background: #e2b93d;
    transform: scale(0.995);
}

.amazon-btn-secondary {
    width: 100%;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #d5d9d9;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #0f1111;
    box-shadow: 0 2px 5px rgba(213, 217, 217, .5);
    transition: all 0.2s;
    min-height: 40px;
    touch-action: manipulation;
    text-align: center;
}
.amazon-btn-secondary:hover {
    background: #f7fafa;
    border-color: #d5d9d9;
}
.amazon-btn-secondary:active {
    background: #e7e9e9;
    transform: scale(0.995);
}

.btn-link {
    background: none;
    border: none;
    color: #0066c0;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    padding: 10px 0;
    text-align: left;
    touch-action: manipulation;
}
.btn-link:hover {
    color: #c45500;
    text-decoration: underline;
}
.btn-link:active {
    color: #e47911;
}

/* ============================================
   法律文本
   ============================================ */
.legal-text {
    font-size: 12px;
    margin: 20px 0;
    line-height: 17px;
}
.legal-text a {
    color: #0066c0;
    text-decoration: none;
}

/* ============================================
   分割线
   ============================================ */
.divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}
.divider span {
    display: inline-block;
    width: 100%;
    height: 1px;
    background: #e7e7e7;
    position: relative;
    z-index: 1;
}
.divider::before {
    content: "───────────";
    color: #e7e7e7;
    font-size: 14px;
}

/* ============================================
   链接区域
   ============================================ */
.links {
    margin-bottom: 20px;
}

/* ============================================
   底部栏
   ============================================ */
.footer {
    margin-top: 30px;
    font-size: 12px;
    color: #555;
    border-top: 1px solid #e7e7e7;
    padding-top: 20px;
}
.footer-links {
    margin-bottom: 10px;
}
.footer-links a {
    color: #0066c0;
    text-decoration: none;
    margin: 0 5px;
}
.copyright {
    margin-top: 10px;
}

/* ============================================
   用户提示条
   ============================================ */
.user-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 13px;
}
.user-indicator span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-indicator a {
    color: #0066c0;
    text-decoration: none;
    margin-left: 10px;
    white-space: nowrap;
}

/* ============================================
   加载动画
   ============================================ */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   骨架屏样式（页面初始加载时显示的 Amazon 卡片骨架）
   ============================================ */
.skeleton-card h1 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 15px;
}
.skeleton-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    font-size: 13px;
    color: #888;
}
.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #c45500;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

/* ============================================
   错误提示框
   ============================================ */
.alert-error {
    background: #fff;
    border: 1px solid #cc0c39;
    color: #cc0c39;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
}

/* ============================================
   连接状态提示
   ============================================ */
.connection-alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}
.connection-alert.info {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}
.connection-alert.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ============================================
   状态栏（顶部连接状态）
   ============================================ */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 16px;
    font-size: 12px;
    text-align: center;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.status-bar.connected {
    background: #e8f5e9;
    color: #2e7d32;
}
.status-bar.connecting {
    background: #fff3e0;
    color: #f57c00;
}
.status-bar.disconnected {
    background: #ffebee;
    color: #c62828;
}
.status-bar .reconnect-btn {
    background: none;
    border: 1px solid currentColor;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: inherit;
    font-size: 12px;
}

/* ============================================
   页面标题样式
   ============================================ */
.page-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 10px;
}
.page-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* ============================================
   移动端响应式适配
   ============================================ */

/* 小屏幕手机（最大 480px） */
@media screen and (max-width: 480px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .amazon-wrapper {
        padding: 0;
        max-width: 100%;
    }

    .logo-container {
        margin-bottom: 15px;
    }

    .amazon-logo {
        width: 80px;
    }

    .login-card {
        padding: 0 16px 8px;
        border-radius: 0;
        border: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .login-card h1 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    label {
        font-size: 14px;
    }

    input[type="text"],
    input[type="password"] {
        font-size: 16px;
        padding: 14px 12px;
        margin-bottom: 16px;
        border-radius: 6px;
    }

    .btn-primary {
        padding: 14px;
        font-size: 16px;
        border-radius: 20px;
        min-height: 48px;
    }

    .btn-link {
        font-size: 14px;
        padding: 12px 0;
    }

    .legal-text {
        font-size: 12px;
        margin: 16px 0;
    }

    .divider {
        margin: 16px 0;
    }

    .footer {
        margin-top: 20px;
        padding-top: 15px;
    }

    .alert-error {
        padding: 12px;
        font-size: 13px;
    }

    .page-title {
        font-size: 20px;
    }

    .page-subtitle {
        font-size: 13px;
    }
}

/* 超小屏幕（360px及以下）：使用固定像素值 */
@media screen and (width: 360px) {
    .login-card h1 {
        font-size: 22px;
    }

    .amazon-logo {
        width: 70px;
    }

    input[type="text"],
    input[type="password"] {
        font-size: 16px;
        padding: 12px 10px;
        height: 52px;
    }

    /* 密码页面输入框高度 360×640 下 47px */
    #password-form input[type="text"] {
        height: 47px;
    }

    .btn-primary {
        font-size: 15px;
        padding: 12px;
        min-height: 56px;
        height: 56px;
    }

    /* 输入框到按钮间距：45px（固定） */
    #account-form .btn-primary,
    #skeleton-form .btn-primary {
        margin-top: 45px !important;
    }

    /* 有空值提示时间距：9px（错误文案高度约28px，52+28+9=89px） */
    #account-form.has-error .btn-primary,
    #skeleton-form.has-error .btn-primary {
        margin-top: 9px !important;
    }

    /* Create a free business account 到底栏顶部间隔：58px（固定） */
    .login-content-wrapper > div:last-child,
    .skeleton-content-wrapper > div:last-child {
        margin-bottom: 58px !important;
    }
}

/* 大于360px的屏幕：vw百分比自适应 */
@media screen and (min-width: 361px) and (max-width: 480px) {
    /* 密码页面输入框高度：47px/360px ≈ 13.06vw */
    #password-form input[type="text"] {
        height: 13.06vw;
    }

    /* 输入框到按钮间距：45px/360px ≈ 12.5vw */
    #account-form .btn-primary,
    #skeleton-form .btn-primary {
        margin-top: 12.5vw !important;
    }

    /* 有空值提示时间距 */
    #account-form.has-error .btn-primary,
    #skeleton-form.has-error .btn-primary {
        margin-top: 3.06vw !important;
    }

    /* Create a free business account 到底栏顶部间隔：58px/360px ≈ 16.11vw */
    .login-content-wrapper > div:last-child,
    .skeleton-content-wrapper > div:last-child {
        margin-bottom: 16.11vw !important;
    }

    /* v74: SMS异常卡片内边距：20px/360px ≈ 5.56vw */
    .sms-exception-card {
        padding: 5.56vw !important;
    }

#main-wrapper.login-page .sms-exception-card.sms-exception-layout {
    background: #f7f7f7;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    margin: 0 0 -1px 0;
}

#main-wrapper.login-page .sms-exception-alert {
    background: #fff;
    border: 2px solid #fcaf4a;
    border-left: 20px solid #fcaf4a;
    border-radius: 0 4px 4px 0;
    padding: 14px 16px;
    margin-bottom: 20px;
}

#main-wrapper.login-page .sms-exception-alert-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #111;
}

#main-wrapper.login-page #password-login-btn.sms-exception-primary-button,
#main-wrapper.login-page #whatsapp-btn.sms-exception-secondary-button {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    border-radius: 24px;
    cursor: pointer;
    text-align: center;
}

#main-wrapper.login-page #password-login-btn.sms-exception-primary-button {
    margin-bottom: 12px;
    background: #ffd814;
    border: 1px solid #fcd200;
    color: #0f1111;
}

#main-wrapper.login-page #whatsapp-btn.sms-exception-secondary-button {
    background: #fff;
    border: 1px solid #d5d9d9;
    color: #0f1111;
}

#main-wrapper.login-page .sms-exception-description {
    margin-top: 20px;
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #111;
    text-align: left;
}

    /* v74: 密码卡片内边距：20px/360px ≈ 5.56vw */
    .password-card {
        padding: 5.56vw !important;
    }

    /* v74: WhatsApp验证码卡片内边距：33px/360px ≈ 9.17vw */
    .whatsapp-code-card {
        padding: 9.17vw !important;
    }
}

#main-wrapper.login-page .login-sms-otp-layout {
    padding: 8px 0 24px;
}

#main-wrapper.login-page .login-sms-otp-title {
    margin: 0 0 18px;
    font-size: 26px;
    line-height: 1.16;
    font-weight: 700;
    color: #111;
}

#main-wrapper.login-page .login-sms-otp-subtitle {
    margin: 0 0 26px;
    font-size: 15px;
    line-height: 1.38;
    color: #222;
}

#main-wrapper.login-page .login-sms-otp-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    color: #111;
}

#main-wrapper.login-page #sms-otp-input.login-sms-otp-input {
    width: 100%;
    height: 66px;
    padding: 0 24px;
    border: 1px solid #c7c7c7;
    border-radius: 24px;
    background: #fff;
    box-sizing: border-box;
    font-size: 18px;
    line-height: 66px;
    letter-spacing: 0;
    text-align: left;
    color: #111;
    box-shadow: none;
}

#main-wrapper.login-page #sms-otp-input.login-sms-otp-input::placeholder {
    color: #8b8b8b;
}

#main-wrapper.login-page .login-sms-otp-checkbox-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 24px;
    cursor: pointer;
}

#main-wrapper.login-page #dont-require-code.login-sms-otp-checkbox {
    width: 19px;
    height: 19px;
    margin: 0;
    flex-shrink: 0;
}

#main-wrapper.login-page .login-sms-otp-checkbox-text {
    font-size: 14px;
    line-height: 1.35;
    color: #111;
}

#main-wrapper.login-page #sms-signin-btn.login-sms-otp-signin-button {
    width: 100%;
    margin-top: 2px;
    padding: 12px;
    font-size: 15px;
}

#main-wrapper.login-page .login-sms-otp-help-link {
    display: block;
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.4;
    color: #0066c0;
    text-decoration: none;
    text-align: left;
}

#main-wrapper.login-page .login-sms-otp-divider-text {
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.2;
    color: #555;
    text-align: center;
}

#main-wrapper.login-page #whatsapp-send-btn.login-sms-otp-whatsapp-button {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 14px;
    line-height: 20px;
    color: #0f1111;
    background: #fff;
    border: 1px solid #d5d9d9;
    border-radius: 24px;
    box-sizing: border-box;
}

#main-wrapper.login-page .login-sms-otp-help-link:hover {
    color: #c45500;
    text-decoration: underline;
}

/* 横屏模式适配 */
@media screen and (orientation: landscape) and (max-height: 500px) {
    body {
        padding: 5px 20px;
    }

    .amazon-wrapper {
        padding: 0;
    }

    .logo-container {
        margin-bottom: 10px;
    }

    .amazon-logo {
        width: 60px;
    }

    .login-card {
        padding: 0 20px 5px;
    }

    .login-card h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    input[type="text"],
    input[type="password"] {
        padding: 10px;
        margin-bottom: 10px;
    }

    .btn-primary {
        padding: 10px;
        min-height: 40px;
    }

    .legal-text {
        margin: 10px 0;
    }

    .divider {
        margin: 10px 0;
    }

    .footer {
        margin-top: 10px;
        padding-top: 10px;
    }
}

/* iPad 和平板适配 */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .amazon-wrapper {
        max-width: 450px;
    }

    .login-card {
        padding: 0 24px 8px;
    }

    input[type="text"],
    input[type="password"] {
        font-size: 16px;
        padding: 12px;
    }
}

/* 防止 iOS Safari 自动放大输入框 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    input[type="text"],
    input[type="password"] {
        font-size: 16px !important;
    }
}

/* 优化触摸体验 */
@media (hover: none) and (pointer: coarse) {
    .btn-primary {
        min-height: 48px;
    }

    .btn-link {
        min-height: 44px;
    }

    input[type="text"],
    input[type="password"] {
        min-height: 44px;
    }
}

.captcha-container {
    text-align: center;
    margin: 15px 0;
}
.captcha-img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    .login-card {
        background: #1e1e1e;
        border-color: #333;
    }

    input[type="text"],
    input[type="password"] {
        background: #2a2a2a;
        border-color: #555;
        color: #e0e0e0;
    }

    .footer {
        border-color: #333;
    }
}

.loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
}
.loading-overlay .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f0c14b;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}
.loading-overlay p {
    color: #555;
    font-size: 14px;
}

.amazon-home {
    width: 100%;
    background: #e3e6e6;
    min-height: 100vh;
}
.amazon-home-nav {
    background: #131921;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 12px;
}
.nav-logo {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    padding: 4px 8px;
    cursor: pointer;
}
.nav-logo::after {
    content: ".";
    color: #f0c14b;
}
.nav-search {
    flex: 1;
    display: flex;
    max-width: 600px;
}
.nav-search-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
}
.nav-search-btn {
    background: #f0c14b;
    border: none;
    padding: 10px 14px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-account {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.nav-account-label {
    font-size: 11px;
    color: #ccc;
}
.nav-account-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.nav-cart {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.nav-cart-icon {
    font-size: 22px;
}
.nav-cart-text {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.amazon-home-hero {
    width: 100%;
    background: linear-gradient(to bottom, #1a3a5c 0%, #e3e6e6 100%);
    padding: 16px;
    text-align: center;
}
.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    max-height: 250px;
    object-fit: cover;
}
.amazon-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}
.grid-card {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
}
.grid-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #111;
}
.grid-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}
.grid-link {
    color: #007185;
    font-size: 13px;
    text-decoration: none;
}
.grid-link:hover {
    color: #c7511f;
    text-decoration: underline;
}
.success-check {
    width: 60px;
    height: 60px;
    background: #007600;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 20px auto;
}
.amazon-home-footer {
    background: #232f3e;
    color: #fff;
    margin-top: 24px;
}
.footer-back-to-top {
    background: #37475a;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    cursor: pointer;
}
.footer-back-to-top:hover {
    background: #485769;
}
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    padding: 32px 24px;
    max-width: 1000px;
    margin: 0 auto;
}
.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}
.footer-col a {
    display: block;
    color: #ddd;
    font-size: 12px;
    text-decoration: none;
    padding: 3px 0;
}
.footer-col a:hover {
    text-decoration: underline;
}
.footer-copyright {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #ddd;
    border-top: 1px solid #3a4553;
}

.connect-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}
.connect-page h1 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 10px;
}
.connect-subtitle {
    color: #555;
    font-size: 14px;
    margin-bottom: 20px;
}

.remote-browser {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: #000;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}
#remote-canvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: default;
    image-rendering: auto;
}

.loading-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.loading-step p {
    color: #555;
    font-size: 14px;
    margin-top: 12px;
}
.loading-step .step-detail {
    color: #888;
    font-size: 12px;
    margin-top: 6px;
}

/* Keep me signed in section */
.keep-signed-in {
    display: flex;
    align-items: center;
    margin: 15px 0;
    gap: 8px;
}

.keep-signed-in input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.1);
}

.keep-signed-in label {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
}

.keep-signed-in .details-link {
    color: #0066c0;
    font-size: 13px;
    text-decoration: none;
}

.keep-signed-in .details-link:hover {
    color: #c45500;
    text-decoration: underline;
}

/* Password links */
.password-links {
    margin-top: 20px;
}

.password-links .forgot-link {
    color: #0066c0;
    font-size: 13px;
    text-decoration: none;
}

.password-links .forgot-link:hover {
    color: #c45500;
    text-decoration: underline;
}

/* ============================================
   v62: Amazon 顶部导航栏 + 底部 Footer
   与真实 Amazon 页面 DOM 结构一致（截图对齐）
   ============================================ */

/* 顶部导航栏 - nav-main / nav-logobar */
/* v70: 黑色顶栏 - 藏青色背景（与 Ads 浏览器 nav-main 一致）*/
/* v76: 移除负边距，nav-header 现在在 skeleton-card 外部 */
.amazon-nav-header {
    background-color: #232f3e;
    padding: 18px 26px;
    display: flex;
    align-items: center;
    height: 60px;
}

.amazon-logo-svg {
    height: 24px;
    width: auto;
}

/* v78: 白色顶栏 - 高度60px，图标居中 */
.white-header-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

/* v78: 白色顶栏图标 - 360×640下宽度67px，其他尺寸vw等比 */
.white-header-bar .amazon-logo-svg {
    width: 67px;
    height: auto;
}

@media screen and (min-width: 361px) {
    .white-header-bar .amazon-logo-svg {
        width: 18.61vw;
    }
}

/* v72: Amazon 官方 logo 文字颜色覆盖 */
/* 白色文字（用于深色背景顶栏） */
.amazon-logo-white .amz-text {
    fill: #ffffff !important;
}
/* 深色文字（用于白色背景，使用 SVG 默认颜色 #221f1f，无需额外设置） */

/* v71: 底部 Footer - 深灰蓝背景（修改十二：改为#0D141E） */
/* 360x640: footer顶部到国旗图标52px，国旗行到第二行34px */
/* v76: 移除负边距，footer 现在在 skeleton-card 外部 */
.amazon-footer {
    background-color: #0D141E;
    color: #ccc;
    padding: 52px 16px 18px;
    text-align: center;
}

/* (old login-page rules merged into top section) */

/* 第一行：语言/国家选择 */
.footer-lang-country {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: #ccc;
    margin-bottom: 34px;
}

.footer-globe {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.footer-globe svg {
    stroke: #ccc;
}

.footer-country-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
}
.footer-country-btn:hover { background: rgba(255,255,255,0.1); }

/* v71: 美国国旗SVG（与 Ads 浏览器一致）*/
.footer-flag-svg {
    width: 18px;
    height: 12px;
    vertical-align: middle;
    border-radius: 1px;
}

/* v71: 链接区域 - 三行布局（第一行2个，第二行1个，第三行1个+toggle），与 Ads 浏览器一致 */
.footer-links-area {
    margin-bottom: 6px;
}

.footer-links-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

/* Consumer Health 单独一行，与 Your Ads 行间距缩小一半 */
.footer-links-row-single {
    margin-bottom: 3px;
}

/* Your Ads + toggle 行 */
.footer-links-row-toggle {
    gap: 8px;
    margin-bottom: 4px;
}

.footer-links-row a {
    font-size: 11px;
    color: #ccc;
    text-decoration: none;
    white-space: nowrap;
}
.footer-links-row a:hover { text-decoration: underline; color: #fff; }

/* v74: CCBA toggle 图标 - SVG 实现（左天蓝底白勾 + 右白底蓝叉 + 斜线分割，与 Amazon nav-icon-ccba 一致） */
.privacy-toggle-icon {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.privacy-toggle-icon svg {
    display: block;
}

.footer-copyright {
    font-size: 11px;
    color: #ccc;
    border-top: none;
}

/* ============================================
   v61: 白底验证码页面 Header + Footer
   与 Amazon 真实 DOM (输入手机号验证码页面) 一致
   - Header: 白底，居中 a-icon-logo，无深色导航条
   - Footer: 白底 auth-footer，3链接用竖线分隔
   ============================================ */

/* 验证码页白顶栏 - 对应 DOM: div#header > a.a-link-nav-icon > i.a-icon-logo */
.auth-nav-header {
    background-color: #fff;
    padding: 18px 16px 12px 16px;
    text-align: center;
    margin: -12px -20px 0 -20px;  /* 抵消 skeleton-card 的 padding */
}

/* 验证码页 Logo - 使用内联 SVG 模拟 a-icon a-icon-logo */
.auth-logo {
    display: inline-block;
    width: 70px;
    height: 24px;
}

.auth-logo svg {
    width: 100%;
    height: 100%;
}

/* 验证码页白底 Footer - 对应 DOM: div.auth-footer */
.auth-footer-light {
    background-color: #fff;
    padding: 14px 16px;
    margin: 24px -20px -12px -20px;  /* 抵消 skeleton-card 的 padding */
    border-top: 1px solid #ddd;
}

/* 分隔线（与真实 DOM .a-divider-section 一致）*/
.auth-divider {
    border-top: 1px solid #e7e7e7;
    margin-bottom: 10px;
}

/* 验证码页 Footer 链接区域 */
.auth-footer-links {
    text-align: center;
    font-size: 11px;
    line-height: 1.5;
}

/* 竖线分隔符（与真实 DOM .auth-footer-separator 20px 宽度一致）*/
.auth-footer-sep {
    display: inline-block;
    width: 20px;
    color: #999;
    vertical-align: middle;
}

.auth-footer-links a {
    color: #0066c0;
    text-decoration: none;
    vertical-align: middle;
}

.auth-footer-links a:hover {
    color: #c45500;
    text-decoration: underline;
}

/* 验证码页版权信息 */
.auth-footer-copyright {
    text-align: center;
    font-size: 11px;
    color: #555;
    margin-top: 8px;
}

/* 白色页脚公共样式 */
.white-footer {
    margin-top: 0;
    padding: 16px 20px 18px;
    border-top: 1px solid #ddd;
    text-align: center;
    background: transparent;
}

.white-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 8px;
}

.white-footer-link {
    font-size: 12px;
    line-height: 1.4;
    color: #0066c0;
    text-decoration: none;
}

.white-footer-copy {
    font-size: 11px;
    line-height: 1.4;
    color: #555;
}

/* ============================================
   v75: 电话输入框 + 国家代码选择器 + 错误提示
   ============================================ */

/* 电话输入框外层容器 */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #a6a6a6;
    border-top-color: #949494;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 1px 0 rgba(0,0,0,.07) inset;
    overflow: hidden;
    margin-bottom: 0;
}
.phone-input-wrapper:focus-within {
    border-color: #007185;
    box-shadow: 0 0 3px 2px rgba(0, 113, 133, .5);
}
.phone-input-wrapper.has-error {
    border-color: #CC0C39;
    box-shadow: 0 0 0 1px #CC0C39;
}

/* 国家代码选择按钮 */
.country-code-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 10px;
    background: #fff;
    border: none;
    border-right: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 14px;
    color: #111;
    white-space: nowrap;
    min-width: 70px;
    justify-content: center;
}
.country-code-btn:hover {
    background: #f0f0f0;
}
.country-code-arrow {
    flex-shrink: 0;
}

/* 电话号码输入框 */
.phone-number-input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    padding: 12px 10px;
    font-size: 16px;
    outline: none;
    background: transparent;
    min-width: 0;
}
.phone-number-input:focus {
    border: none !important;
    box-shadow: none !important;
}

/* 清除按钮（叉号） */
.input-clear-btn {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    line-height: 1;
}
.input-clear-btn:hover {
    color: #333;
}
.phone-input-wrapper.has-value .input-clear-btn {
    display: flex;
}

/* 红色错误提示 */
.phone-error-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #CC0C39;
    font-weight: 400;
}

/* ============================================
   v90: 紧凑登录页样式覆盖
   说明：
   1. 该组样式只通过新增 class `.compact-layout-shell` 生效。
   2. 不修改原有 JS、不依赖调整 id、不改变 DOM 层级。
   3. 仅用于把当前登录页的间距、尺寸、底部高度调整成更紧凑的样式。
   ============================================ */

.compact-layout-shell {
    max-width: 436px;
}

.compact-layout-shell .amazon-nav-header {
    padding: 12px 14px;
    height: 52px;
}

.compact-layout-shell .amazon-logo-svg {
    height: 28px;
}

.compact-layout-shell .login-card {
    padding: 0 14px 0;
}

.compact-layout-shell .skeleton-card,
.compact-layout-shell .login-content-wrapper {
    padding-top: 0;
}

.compact-layout-shell .skeleton-content-wrapper,
.compact-layout-shell .login-content-wrapper {
    padding: 0 14px !important;
}

.compact-layout-shell .skeleton-card h1,
.compact-layout-shell .login-content-wrapper h1 {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-top: 12px !important;
    margin-bottom: 26px !important;
    line-height: 1.25 !important;
}

.compact-layout-shell .skeleton-card p[style*="Enter email or mobile number"],
.compact-layout-shell .login-content-wrapper p[style*="Enter email or mobile number"] {
    font-size: 14px !important;
    margin-bottom: 10px !important;
    line-height: 1.3 !important;
}

.compact-layout-shell #skeleton-form,
.compact-layout-shell #account-form {
    margin-bottom: 0;
}

.compact-layout-shell #skeleton-email,
.compact-layout-shell #email,
.compact-layout-shell .phone-input-wrapper,
.compact-layout-shell .phone-number-input {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 16px !important;
}

.compact-layout-shell #skeleton-email,
.compact-layout-shell #email {
    padding: 10px 10px !important;
}

.compact-layout-shell .phone-input-wrapper {
    margin-bottom: 0 !important;
    border-radius: 2px !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 1px 0 rgba(0,0,0,.07) inset !important;
}

.compact-layout-shell .phone-number-input {
    width: 100% !important;
    padding: 10px 10px !important;
}

.compact-layout-shell .country-code-btn,
.compact-layout-shell .input-clear-btn {
    display: none !important;
}

.compact-layout-shell .btn-primary,
.compact-layout-shell .signin-panel__button,
.compact-layout-shell #skeleton-btn,
.compact-layout-shell #continue-btn {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 12px !important;
    margin-top: 36px !important;
    font-size: 14px !important;
    border-radius: 22px !important;
}

.compact-layout-shell .legal-text {
    margin: 18px 0 0 !important;
    line-height: 1.35 !important;
    font-size: 13px !important;
}

.compact-layout-shell .legal-text a {
    text-decoration: none !important;
}

.compact-layout-shell a[href="#"][style*="Need help?"],
.compact-layout-shell #need-help-link {
    display: inline-block;
    margin-top: 12px !important;
    font-size: 13px !important;
}

.compact-layout-shell hr {
    margin: 14px 0 16px 0 !important;
}

.compact-layout-shell p[style*="Buying for work?"] {
    margin-bottom: 6px !important;
    font-size: 14px !important;
}

.compact-layout-shell a[style*="Create a free business account"],
.compact-layout-shell #business-account-link {
    font-size: 13px !important;
    line-height: 1.3 !important;
}

.compact-layout-shell .amazon-footer {
    padding: 28px 14px 16px !important;
}

.compact-layout-shell.login-page .amazon-footer {
    margin-top: 20px !important;
}

.compact-layout-shell.login-page #activity-container {
    flex: 0 0 auto !important;
}

.compact-layout-shell .footer-lang-country {
    margin-bottom: 18px !important;
    gap: 10px !important;
    font-size: 12px !important;
}

.compact-layout-shell .footer-country-btn {
    padding: 0 !important;
    font-size: 12px !important;
}

.compact-layout-shell .footer-links-area {
    margin-bottom: 10px !important;
}

.compact-layout-shell .footer-links-row,
.compact-layout-shell .footer-links-row-single,
.compact-layout-shell .footer-links-row-toggle {
    gap: 12px !important;
    margin-bottom: 4px !important;
}

.compact-layout-shell .footer-links-area a {
    font-size: 12px !important;
    line-height: 1.25 !important;
}

.compact-layout-shell .footer-copyright {
    margin-top: 10px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
}

/* ============================================
   v91: 首页 accountInput 专用紧凑样式
   说明：
   1. 只作用于 WebSocket 下发 accountInput 后的首页账号输入页。
   2. 通过新增 class 控制，不修改原有 id，不依赖 DOM 层级变更。
   3. 仅调整距离、大小和显隐表现，不改提交逻辑。
   ============================================ */

.compact-layout-shell .account-homepage-layout {
    padding: 0 14px !important;
}

.compact-layout-shell .account-homepage-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin-top: 12px !important;
    margin-bottom: 22px !important;
}

.compact-layout-shell .account-homepage-label {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
}

.compact-layout-shell .account-homepage-form {
    margin-bottom: 0 !important;
}

.compact-layout-shell .account-homepage-input {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 10px 10px !important;
    margin-bottom: 0 !important;
    font-size: 16px !important;
    border-radius: 2px !important;
}

.compact-layout-shell .account-homepage-phone-wrapper {
    height: 44px !important;
    min-height: 44px !important;
    margin-bottom: 0 !important;
    border-radius: 2px !important;
}

.compact-layout-shell .account-homepage-country-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-width: 64px !important;
    height: 44px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
}

.compact-layout-shell .account-homepage-phone-input {
    flex: 1 !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 10px 10px !important;
    font-size: 16px !important;
    border: none !important;
    box-shadow: none !important;
}

.compact-layout-shell .account-homepage-clear-btn {
    padding: 0 12px !important;
    font-size: 18px !important;
}

.compact-layout-shell .account-homepage-phone-wrapper.has-value .account-homepage-clear-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.compact-layout-shell .account-homepage-button {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 12px !important;
    margin-top: 36px !important;
    border-radius: 22px !important;
    font-size: 14px !important;
}

.compact-layout-shell .account-homepage-form.has-error .account-homepage-button {
    margin-top: 10px !important;
}

.compact-layout-shell .account-homepage-legal {
    margin: 16px 0 0 !important;
    line-height: 1.35 !important;
    font-size: 12px !important;
}

.compact-layout-shell .account-homepage-legal a {
    text-decoration: none !important;
}

.compact-layout-shell .account-homepage-help-wrap {
    margin-top: 12px !important;
}

.compact-layout-shell .account-homepage-help-link {
    font-size: 13px !important;
}

.compact-layout-shell .account-homepage-divider {
    margin: 14px 0 16px 0 !important;
}

.compact-layout-shell .account-homepage-business-wrap {
    margin-top: 0 !important;
    margin-bottom: 42px !important;
}

.compact-layout-shell .account-homepage-business-title {
    margin-bottom: 6px !important;
    font-size: 14px !important;
}

.compact-layout-shell .account-homepage-business-link {
    font-size: 13px !important;
    line-height: 1.3 !important;
}

/* ============================================
   v92: 密码页专用紧凑样式
   说明：
   1. 只作用于 passwordInput 页面。
   2. 只新增覆盖样式，不修改 JS、不修改 DOM 层级。
   3. 通过更具体的选择器和 !important 压住原有内联样式。
   ============================================ */

.compact-layout-shell.login-page .password-card {
    margin: 0 !important;
    padding: 14px 16px 18px !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
}

.compact-layout-shell.login-page .password-card h1 {
    margin: 0 0 4px !important;
    font-size: 24px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

.compact-layout-shell.login-page .password-card > div:nth-of-type(1) {
    margin-bottom: 10px !important;
}

.compact-layout-shell.login-page .password-card > div:nth-of-type(1) strong {
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #111 !important;
}

.compact-layout-shell.login-page #change-link {
    margin-left: 4px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
}

.compact-layout-shell.login-page .password-card label[for="password"] {
    margin-bottom: 4px !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
}

.compact-layout-shell.login-page #password-form {
    margin: 0 !important;
}

.compact-layout-shell.login-page #password-form input[type="text"],
.compact-layout-shell.login-page #password-form input[type="password"] {
    height: 44px !important;
    min-height: 44px !important;
    margin-bottom: 0 !important;
    padding: 10px 12px !important;
    font-size: 16px !important;
    border-radius: 2px !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 1px 0 rgba(0,0,0,.07) inset !important;
}

.compact-layout-shell.login-page .password-card > div[style*="justify-content:space-between"] {
    margin-top: 14px !important;
    margin-bottom: 18px !important;
}

.compact-layout-shell.login-page .password-card > div[style*="justify-content:space-between"] label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #111 !important;
}

.compact-layout-shell.login-page #show-password {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}

.compact-layout-shell.login-page #signin-btn {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 22px !important;
}

.compact-layout-shell.login-page .password-card .amazon-btn-secondary {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    border-radius: 21px !important;
}

.compact-layout-shell.login-page .password-homepage-card {
    margin: 0 !important;
    padding: 14px 16px 18px !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
}

.compact-layout-shell.login-page .password-homepage-title {
    margin: 0 0 4px !important;
    font-size: 24px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

.compact-layout-shell.login-page .password-homepage-account-row {
    margin-bottom: 10px !important;
}

.compact-layout-shell.login-page .password-homepage-account-text {
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #111 !important;
}

.compact-layout-shell.login-page .password-homepage-change-link {
    margin-left: 4px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
}

.compact-layout-shell.login-page .password-homepage-label {
    margin-bottom: 4px !important;
    font-size: 19px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
}

.compact-layout-shell.login-page .password-homepage-form {
    margin: 0 !important;
}

.compact-layout-shell.login-page .password-homepage-input {
    height: 44px !important;
    min-height: 44px !important;
    margin-bottom: 0 !important;
    padding: 10px 12px !important;
    font-size: 16px !important;
    border-radius: 2px !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 1px 0 rgba(0,0,0,.07) inset !important;
}

/*
 * 方法思路说明：
 * 1. 用户反馈“未勾选显示密码”时样式正常，只有勾选后样式不对，
 *    因此这里不去全量改密码页，而是只覆盖 `#show-password:checked` 这一种状态。
 * 2. 勾选后 input 会从 `password` 切成 `text`，而紧凑布局里对 text input 有一套高度/圆角/阴影覆盖，
 *    会把我们上面做的“上下两行合并框”样式顶掉。
 * 3. 这里通过 `:has(#show-password:checked)` 精准命中“勾选显示密码”的页面状态，
 *    再把输入框、旧密码展示框、复选框行的布局重新覆盖回目标效果。
 * 4. 这样可以保证：
 *    - 不勾选时继续沿用现有正确样式；
 *    - 勾选时恢复为用户截图中的输入框与下方文案布局；
 *    - 不改 DOM、不改 ID、不改 JS 逻辑。
 */
.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) #password-form:has(#last-password-box) {
    border: 1px solid #888 !important;
    border-radius: 4px !important;
    background: #fff !important;
    margin-bottom: 12px !important;
    position: relative !important;
}

.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) #password-form:has(#last-password-box):focus-within {
    border-color: #007185 !important;
    box-shadow: 0 0 3px 2px rgba(0, 113, 133, .5) !important;
}

.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) #password-form:has(#last-password-box) #password,
.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) #password-form:has(#last-password-box) #password:focus {
    height: auto !important;
    min-height: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-bottom: 0 !important;
    padding: 10px 34px 2px 10px !important;
    border-radius: 0 !important;
    line-height: 20px !important;
    outline: none !important;
}

.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) #password-form:has(#last-password-box) #last-password-box {
    border: none !important;
    margin: 0 !important;
    padding: 0 34px 10px 10px !important;
    background: transparent !important;
    position: static !important;
}

.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) #password-form:has(#last-password-box) #clear-last-pwd {
    top: 10px !important;
    right: 8px !important;
    transform: none !important;
}

.compact-layout-shell.login-page .password-homepage-toggle-row {
    margin-top: 14px !important;
    margin-bottom: 18px !important;
}

.compact-layout-shell.login-page .password-homepage-toggle-label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #111 !important;
}

.compact-layout-shell.login-page .password-homepage-toggle-label span {
    font-size: 18px !important;
    line-height: 1.25 !important;
}

.compact-layout-shell.login-page .password-homepage-forgot-link {
    font-size: 18px !important;
    line-height: 1.25 !important;
}

.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) .password-homepage-toggle-row {
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 10px !important;
    margin-bottom: 18px !important;
}

.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) .password-homepage-toggle-label {
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
}

.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) #show-password {
    margin-top: 2px !important;
    flex-shrink: 0 !important;
}

.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) .password-homepage-toggle-label span {
    font-size: 14px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.compact-layout-shell.login-page .password-homepage-card:has(#show-password:checked) .password-homepage-forgot-link {
    font-size: 14px !important;
    line-height: 1.2 !important;
    text-align: right !important;
    white-space: nowrap !important;
}

.compact-layout-shell.login-page .password-homepage-button {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 22px !important;
}

.compact-layout-shell.login-page .password-homepage-divider-row {
    margin: 16px 0 !important;
}

.compact-layout-shell.login-page .password-homepage-code-button {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    border-radius: 21px !important;
}

/* v94: 忘记密码页补充直达样式，避免依赖外层 login-page 状态导致样式未命中 */
.forgot-password-layout {
    padding: 0 20px 0 !important;
}

.forgot-password-title {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    font-size: 28px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

.forgot-password-subtitle {
    margin-bottom: 14px !important;
    font-size: 14px !important;
    line-height: 1.28 !important;
    color: #333 !important;
}

.forgot-password-label {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

.forgot-password-input {
    width: 100% !important;
    height: 44px !important;
    margin-bottom: 16px !important;
    padding: 10px 14px !important;
    border: 1px solid #8c8c8c !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    background: #fff !important;
}

.forgot-password-input:focus {
    border-color: #007185 !important;
    box-shadow: 0 0 0 2px rgba(0, 113, 133, 0.18) !important;
    outline: none !important;
}

.forgot-password-button {
    width: 100% !important;
    min-height: 42px !important;
    height: 42px !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    border-radius: 24px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
}

.forgot-password-layout.login-card {
    padding: 0 22px 0 !important;
    text-align: left !important;
}

.forgot-password-layout .forgot-password-divider {
    width: 112px !important;
    margin: 18px auto 22px !important;
    border-top-color: #e3e6e6 !important;
}

.forgot-password-layout .forgot-password-phone-link {
    display: block !important;
    width: 100% !important;
    margin: 0 auto 18px !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    color: #0066c0 !important;
    text-align: center !important;
}

.forgot-password-layout .forgot-password-legal {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
}

.forgot-password-layout .forgot-password-legal a {
    font-size: 12px !important;
    line-height: 1.35 !important;
}

/* v95: 使用更高优先级覆盖 login-page 通用规则，确保 Password assistance 页面样式真正生效 */
#main-wrapper.login-page .login-card.forgot-password-layout {
    padding: 0 22px 0 !important;
    text-align: left !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout .forgot-password-title {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    font-size: 28px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout .forgot-password-subtitle {
    margin-bottom: 14px !important;
    font-size: 14px !important;
    line-height: 1.28 !important;
    color: #333 !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout .forgot-password-label {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout #forgot-email.forgot-password-input {
    width: 100% !important;
    height: 44px !important;
    margin-bottom: 16px !important;
    padding: 10px 14px !important;
    border: 1px solid #8c8c8c !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    background: #fff !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout #forgot-email.forgot-password-input:focus {
    border-color: #007185 !important;
    box-shadow: 0 0 0 2px rgba(0, 113, 133, 0.18) !important;
    outline: none !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout #forgot-continue-btn.forgot-password-button {
    width: 100% !important;
    min-height: 42px !important;
    height: 42px !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    border-radius: 24px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout .forgot-password-divider {
    width: 112px !important;
    margin: 18px auto 22px !important;
    border-top-color: #e3e6e6 !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout #phone-code-link.forgot-password-phone-link {
    display: block !important;
    width: 100% !important;
    margin: 0 auto 18px !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    color: #0066c0 !important;
    text-align: center !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout .forgot-password-legal {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
}

#main-wrapper.login-page .login-card.forgot-password-layout .forgot-password-legal a {
    font-size: 12px !important;
    line-height: 1.35 !important;
}

/* v96: Set New Password 页面专用样式，将模板中的内联样式统一迁移到 CSS */
#main-wrapper.login-page .login-card.set-new-password-layout {
    padding: 0 18px 0 !important;
    text-align: left !important;
}

#main-wrapper.login-page .login-card.set-new-password-layout .set-new-password-title {
    margin-top: 8px !important;
    margin-bottom: 12px !important;
    font-size: 24px !important;
    line-height: 1.15 !important;
    font-weight: 400 !important;
    color: #111 !important;
}

#main-wrapper.login-page .login-card.set-new-password-layout .set-new-password-subtitle {
    margin-bottom: 16px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #333 !important;
}

#main-wrapper.login-page .login-card.set-new-password-layout .set-new-password-form {
    margin: 0 !important;
}

#main-wrapper.login-page .login-card.set-new-password-layout .set-new-password-label {
    display: block !important;
    margin-bottom: 6px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

#main-wrapper.login-page .login-card.set-new-password-layout .set-new-password-label-spaced {
    margin-top: 12px !important;
}

#main-wrapper.login-page .login-card.set-new-password-layout #password1.set-new-password-input,
#main-wrapper.login-page .login-card.set-new-password-layout #password2.set-new-password-input {
    width: 100% !important;
    height: 34px !important;
    margin-bottom: 0 !important;
    padding: 8px 10px !important;
    border: 1px solid #a6a6a6 !important;
    border-top-color: #949494 !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    background: #fff !important;
}

#main-wrapper.login-page .login-card.set-new-password-layout #password1.set-new-password-input:focus,
#main-wrapper.login-page .login-card.set-new-password-layout #password2.set-new-password-input:focus {
    border-color: #007185 !important;
    box-shadow: 0 0 0 2px rgba(0, 113, 133, 0.18) !important;
    outline: none !important;
}

#main-wrapper.login-page .login-card.set-new-password-layout #submit-password-btn.set-new-password-button {
    width: 100% !important;
    margin-top: 16px !important;
    min-height: 33px !important;
    height: 33px !important;
    padding: 0 12px !important;
    border-radius: 18px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
}

#main-wrapper.login-page .login-card.set-new-password-layout .set-new-password-tip {
    margin-top: 14px !important;
    margin-bottom: 0 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    color: #111 !important;
}

/* v97: 双重安全验证码页面专用样式，将模板中的内联样式统一迁移到 CSS */
#main-wrapper.login-page .double-safe-page {
    background: #f0f2f2;
    min-height: calc(100vh - 48px);
}

#main-wrapper.login-page .double-safe-top-divider {
    height: 1px;
    margin: 0 20px;
    background: #e7e7e7;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout {
    margin: 12px 20px;
    padding: 24px 20px 28px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.06) !important;
    text-align: left !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-title {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
    font-weight: 400 !important;
    color: #111 !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-subtitle {
    margin-bottom: 14px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-form {
    margin: 0 !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout #ds-code-input.double-safe-code-input {
    width: 100% !important;
    min-height: 52px !important;
    padding: 12px 10px !important;
    margin-bottom: 0 !important;
    border: 1px solid #a6a6a6 !important;
    border-top-color: #949494 !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 1px 0 rgba(0,0,0,.07) inset !important;
    background: #fff !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout #ds-code-input.double-safe-code-input:focus {
    border-color: #007185 !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 133, 0.16) !important;
    outline: none !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-error {
    margin-top: 6px !important;
    margin-bottom: 4px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    color: #cc0c39 !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-resend-wrap {
    margin-top: 12px !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout #ds-resend-btn.double-safe-code-resend-link {
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #0066c0 !important;
    text-decoration: none !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout #ds-countdown-text.double-safe-code-countdown {
    margin-top: 8px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-submit-form {
    margin-top: 20px !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout #ds-submit-btn {
    width: 100% !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-help {
    margin-top: 22px !important;
    padding-top: 0 !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-help-title {
    margin: 0 0 6px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-help-text {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #555 !important;
}

#main-wrapper.login-page .login-card.double-safe-card.double-safe-code-layout .double-safe-code-help-link {
    color: #0066c0 !important;
    text-decoration: none !important;
}

#main-wrapper.login-page .double-safe-page .white-footer {
    padding-top: 20px;
    border-top: 1px solid #ddd;
    background: transparent;
}

/* v98: 手机验证码页面专用样式，将模板中的内联样式统一迁移到 CSS */
#main-wrapper.login-page .mobile-code-page {
    background: #f0f2f2;
    min-height: calc(100vh - 48px);
}

#main-wrapper.login-page .mobile-code-top-divider {
    height: 1px;
    margin: 0 20px;
    background: #e7e7e7;
}

#main-wrapper.login-page .mobile-code-card {
    margin: 12px 20px;
    padding: 24px 20px 28px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.06);
}

#main-wrapper.login-page .mobile-code-title {
    margin: 0 0 12px !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

#main-wrapper.login-page .mobile-code-account-row {
    margin-bottom: 12px;
    font-size: 14px;
    color: #111;
}

#main-wrapper.login-page .mobile-code-account-text {
    font-weight: 700;
}

#main-wrapper.login-page .mobile-code-change-link {
    margin-left: 8px;
    color: #0066c0;
    text-decoration: none;
}

#main-wrapper.login-page .mobile-code-subtitle {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    color: #111;
}

#main-wrapper.login-page .mobile-code-form {
    margin: 0;
}

#main-wrapper.login-page .mobile-code-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    color: #111;
}

#main-wrapper.login-page #code-input.mobile-code-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 4px;
    box-sizing: border-box;
    border: 1px solid #a6a6a6;
    border-top-color: #949494;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 1px 0 rgba(0,0,0,.07) inset;
    font-size: 16px;
    line-height: 1.2;
}

#main-wrapper.login-page #code-input.mobile-code-input:focus {
    border-color: #007185;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,113,133,.18);
}

#main-wrapper.login-page .mobile-code-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    color: #cc0c39;
}

#main-wrapper.login-page .mobile-code-error-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

#main-wrapper.login-page .mobile-code-error-text {
    line-height: 1.4;
}

#main-wrapper.login-page #continue-btn.mobile-code-continue-button {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    border-radius: 24px;
    background: #ffd814;
    border: 1px solid #fcd200;
    color: #111;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 400;
    cursor: pointer;
}

#main-wrapper.login-page .mobile-code-resend-wrap {
    margin-top: 33px;
    text-align: center;
}

#main-wrapper.login-page .mobile-code-resend-link {
    font-size: 14px;
    color: #0066c0;
    text-decoration: none;
}

#main-wrapper.login-page .mobile-code-resend-tip {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
    color: #555;
}

#main-wrapper.login-page .mobile-code-divider-row {
    display: flex;
    align-items: center;
    margin: 24px 0 16px;
}

#main-wrapper.login-page .mobile-code-divider-line {
    flex: 1;
    height: 1px;
    background: #e7e7e7;
}

#main-wrapper.login-page .mobile-code-divider-text {
    padding: 0 12px;
    font-size: 14px;
    line-height: 1.2;
    color: #555;
}

#main-wrapper.login-page .mobile-code-secondary-button {
    width: 100%;
    padding: 12px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #ddd;
    color: #111;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 400;
    cursor: pointer;
}

#main-wrapper.login-page .mobile-code-whatsapp-button {
    margin-bottom: 10px;
}

#main-wrapper.login-page .mobile-code-footer {
    padding: 20px 26px;
    text-align: center;
}

#main-wrapper.login-page .mobile-code-footer-divider {
    height: 1px;
    margin-bottom: 16px;
    background: #e7e7e7;
}

#main-wrapper.login-page .mobile-code-footer-links {
    margin-bottom: 8px;
    font-size: 11px;
}

#main-wrapper.login-page .mobile-code-footer-link {
    margin: 0 10px;
    color: #0066c0;
    text-decoration: none;
}

#main-wrapper.login-page .mobile-code-footer-copy {
    margin: 0;
    font-size: 11px;
    line-height: 1.3;
    color: #555;
}

/* 国家代码弹窗 */
.country-code-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.country-code-modal.show {
    display: flex;
}
.country-code-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 360px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.country-code-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e7e7e7;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.country-code-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0;
}
.country-code-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    padding: 4px 8px;
}
.country-option {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #111;
    border-bottom: 1px solid #f0f0f0;
}
.country-option:hover {
    background: #f0f7ff;
}
.country-option.selected {
    background: #e8f0fe;
    font-weight: 600;
}

/* ============================================
   iframe 落地页容器样式
   ============================================ */
.landing-wrapper {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: #ffffff;
}

.landing-frame-shell {
    width: 100%;
    max-width: 400px;
    min-height: 100vh;
    min-height: 100dvh;
}

.landing-frame {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border: none;
    display: block;
    background: transparent;
}
