/* 微信 H5 登录首页：参考 public/demo/wechat-h5-v2.html 的视觉结构，业务交互仍由 Blade 页面提供。 */
:root {
    --wechat-blue-deep: #07357e;
    --wechat-blue: #0a56bb;
    --wechat-blue-light: #147dd9;
    --wechat-ink: #123f9b;
    --wechat-muted: #64748b;
    --wechat-line: #d9e0ea;
}

body:has(.wechat-login-page) {
    background: #eef3fb;
}

.h5:has(.wechat-login-page) {
    max-width: none;
    min-height: 100vh;
    padding-bottom: 0;
    background: transparent;
    box-shadow: none;
}

.wechat-login-page {
    min-height: 100vh;
    color: #1e293b;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.wechat-login-page *,
.wechat-login-page *::before,
.wechat-login-page *::after {
    box-sizing: border-box;
}

.wechat-login-shell {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 14px 50px rgba(31, 69, 132, .14);
}

.wechat-login-hero {
    position: relative;
    overflow: hidden;
    min-height: 192px;
    padding: 16px 20px 0;
    color: #fff;
    background: linear-gradient(145deg, var(--wechat-blue-deep) 0%, var(--wechat-blue) 52%, var(--wechat-blue-light) 100%);
}

.wechat-login-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: .35;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 22px 22px;
}

.wechat-login-hero::after {
    position: absolute;
    z-index: 0;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(7, 53, 126, .58), rgba(10, 86, 187, .2) 54%, rgba(7, 53, 126, .56));
    pointer-events: none;
}

.wechat-login-hero__art {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: .9;
    pointer-events: none;
}

.wechat-login-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0;
    padding-bottom: 24px;
}

.wechat-login-hero__logo {
    display: block;
    width: 112px;
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .18));
}

.wechat-login-hero__platform-title {
    display: block;
    width: 312px;
    max-width: 100%;
    height: auto;
    margin-top: 24px;
}

.wechat-login-body {
    position: relative;
    margin-top: -16px;
    padding: 28px 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
    border-radius: 30px 30px 0 0;
    background: #fff;
}

.wechat-login-body__heading h1 {
    margin: 0;
    color: var(--wechat-ink);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -.03em;
}

.wechat-login-body__heading p {
    margin: 8px 0 0;
    color: var(--wechat-muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.85;
}

.wechat-login-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.wechat-login-features img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.wechat-login-banner {
    margin-top: 20px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 10px 26px rgba(19, 65, 142, .08);
}

.wechat-login-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.wechat-login-cta {
    display: block;
    width: 100%;
    margin-top: 28px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: 0 14px 30px rgba(13, 69, 170, .22);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.wechat-login-cta:active {
    transform: scale(.99);
}

.wechat-login-cta img {
    display: block;
    width: 100%;
    height: auto;
}

.wechat-login-cta--text {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 22px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, #0a56bb, #147dd9);
}

.wechat-login-cta--text span {
    margin-left: 10px;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
}

.wechat-login-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    color: #64748b;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

.wechat-login-contact::before,
.wechat-login-contact::after {
    flex: 1;
    height: 1px;
    content: "";
    background: #cbd5e1;
}

.wechat-login-contact button {
    flex: 0 1 auto;
    padding: 0;
    border: 0;
    color: inherit;
    font: inherit;
    background: transparent;
    cursor: pointer;
}

.wechat-login-contact button i {
    margin-left: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.wechat-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 44px;
    padding: 12px 0 calc(env(safe-area-inset-bottom, 0px) + 8px);
    border-radius: 0 0 28px 28px;
}

.wechat-login-footer__icp {
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    text-decoration: none;
}

.wechat-login-footer__icp:hover {
    color: var(--wechat-blue);
    text-decoration: underline;
}

.wechat-contact-modal[hidden] {
    display: none;
}

.wechat-contact-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 6, 23, .45);
    backdrop-filter: blur(2px);
}

.wechat-contact-modal__panel {
    width: 100%;
    max-width: 390px;
    padding: 20px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 42, 85, .28);
    transform: translateY(24px);
    opacity: 0;
    transition: transform .2s ease, opacity .2s ease;
}

.wechat-contact-modal.is-open .wechat-contact-modal__panel {
    transform: translateY(0);
    opacity: 1;
}

.wechat-contact-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.wechat-contact-modal__eyebrow {
    color: #3b82f6;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.wechat-contact-modal h2 {
    margin: 4px 0 0;
    color: var(--wechat-ink);
    font-size: 22px;
    font-weight: 900;
}

.wechat-contact-modal p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.8;
}

.wechat-contact-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    color: #64748b;
    background: #f1f5f9;
    cursor: pointer;
}

.wechat-contact-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.wechat-contact-card,
.wechat-contact-modal__cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.wechat-contact-card {
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    background: #fff;
    transition: transform .15s ease, background-color .15s ease;
}

.wechat-contact-card--primary {
    border: 1px solid #dbeafe;
    background: #eff6ff;
}

.wechat-contact-card:active {
    transform: scale(.99);
}

.wechat-contact-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #1d4ed8;
    background: #f1f5f9;
}

.wechat-contact-card--primary .wechat-contact-card__icon {
    color: #fff;
    background: #1d4ed8;
    box-shadow: 0 8px 18px rgba(29, 78, 216, .16);
}

.wechat-contact-card__copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.wechat-contact-card__copy strong {
    font-size: 15px;
    font-weight: 900;
}

.wechat-contact-card__copy small {
    margin-top: 2px;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}

.wechat-contact-card__action {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
}

.wechat-contact-modal__cancel {
    width: 100%;
    margin-top: 12px;
    border: 0;
    color: #475569;
    background: #f1f5f9;
    cursor: pointer;
}

.wechat-login-page .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (min-width: 480px) {
    .wechat-contact-modal {
        align-items: center;
    }

    .wechat-contact-modal__panel {
        transform: translateY(24px) scale(.97);
    }

    .wechat-contact-modal.is-open .wechat-contact-modal__panel {
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 360px) {
    .wechat-login-hero,
    .wechat-login-body {
        padding-right: 16px;
        padding-left: 16px;
    }

    .wechat-login-hero__keywords {
        gap: 8px;
        font-size: 11px;
    }

    .wechat-login-body__heading h1 {
        font-size: 26px;
    }

    .wechat-login-features {
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wechat-login-cta:active,
    .wechat-contact-card:active {
        transform: none;
    }

    .wechat-contact-modal__panel {
        transition: none;
    }
}

/* 文字改由 HTML/SVG 渲染，图片只保留清晰插画，避免生成图中文字缩放发糊 */
.wechat-login-hero .wechat-login-hero__logo{width:auto!important;height:50px!important;max-width:calc(100% - 24px)!important;padding:8px 18px;border-radius:999px;background:rgba(255,255,255,.96);box-shadow:0 8px 20px rgba(1,25,76,.2);object-fit:contain;filter:none;}
.wechat-login-hero__platform-title{display:flex;width:100%;max-width:340px;flex-direction:column;align-items:center;margin-top:14px;color:#fff;text-align:center;}
.wechat-login-hero__platform-title strong{font-size:20px;font-weight:900;letter-spacing:.04em;line-height:1.4;text-shadow:0 4px 16px rgba(0,25,80,.2);}
.wechat-login-hero__platform-title span{margin-top:4px;color:rgba(219,234,254,.92);font-size:13px;font-weight:700;letter-spacing:.16em;}
.wechat-login-features{align-items:stretch;}
.wechat-login-feature{display:flex;min-height:94px;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:10px 5px;border:1px solid #e1e9f4;border-radius:16px;background:linear-gradient(180deg,#f8fbff,#eef5ff);color:var(--wechat-ink);text-align:center;}
.wechat-login-feature i{font-size:21px;color:#1470cc;}
.wechat-login-feature strong{font-size:12px;font-weight:800;line-height:1.35;}
.wechat-login-feature small{color:#7b8ca4;font-size:10px;line-height:1.3;white-space:nowrap;}
.wechat-login-banner{position:relative;}
.wechat-login-banner__caption{position:absolute;right:18px;bottom:14px;left:18px;color:#fff;font-size:14px;font-weight:800;line-height:1.5;text-shadow:0 2px 10px rgba(2,25,70,.55);}
.wechat-login-cta.wechat-login-cta--text{min-height:56px;}

/* H5 微信绑定身份页：复用登录页 Hero/主体结构，表单卡片沿用登录页蓝色视觉 */
.wechat-bind-page .wechat-login-body__heading h1{font-size:26px;}
.wechat-bind-card{margin-top:22px;padding:18px 16px 16px;border:1px solid #e1e9f4;border-radius:20px;background:linear-gradient(180deg,#f8fbff,#fff);box-shadow:0 10px 26px rgba(19,65,142,.06);}
.wechat-bind-card__head{display:flex;align-items:center;gap:12px;padding-bottom:14px;margin-bottom:16px;border-bottom:1px solid #e6edf6;}
.wechat-bind-card__icon{display:flex;width:40px;height:40px;flex:none;align-items:center;justify-content:center;border-radius:12px;background:#e8f1fd;color:#1470cc;font-size:18px;}
.wechat-bind-card__head strong{display:block;color:var(--wechat-ink);font-size:15px;font-weight:800;}
.wechat-bind-card__head small{display:block;margin-top:2px;color:var(--wechat-muted);font-size:12px;}
.wechat-bind-card__label{display:block;margin-bottom:8px;color:#334155;font-size:13px;font-weight:700;}
.wechat-bind-card__input{display:block;width:100%;height:50px;padding:0 16px;border:1px solid var(--wechat-line);border-radius:14px;background:#fff;color:#0f172a;font-size:17px;font-weight:600;letter-spacing:.06em;outline:none;-webkit-appearance:none;appearance:none;}
.wechat-bind-card__input:focus{border-color:#147dd9;box-shadow:0 0 0 3px rgba(20,125,217,.15);}
.wechat-bind-card__input::placeholder{color:#a0aec0;font-weight:500;letter-spacing:0;}
.wechat-bind-card__status{min-height:20px;margin-top:8px;color:var(--wechat-muted);font-size:12px;}
.wechat-bind-card__status.is-valid{color:#16a34a;}
.wechat-bind-card .wechat-login-cta{margin-top:18px;}
.wechat-bind-card .wechat-login-cta:disabled{opacity:.5;box-shadow:none;cursor:not-allowed;}
.wechat-bind-card__note{margin:14px 0 0;color:#94a3b8;font-size:11px;text-align:center;}
.wechat-bind-alt{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px;}
.wechat-bind-alt a{display:flex;min-height:44px;align-items:center;justify-content:center;border:1px solid #cfdcef;border-radius:999px;background:#fff;color:var(--wechat-blue);font-size:14px;font-weight:700;text-decoration:none;}
.wechat-bind-alt a:active{background:#f1f6fd;}
