/**
 * 引导页面样式表 - 移动端优先设计
 * 针对手机端用户优化的现代化界面
 */

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

:root {
    --primary-color: #1677ff;
    --secondary-color: #3155d8;
    --background-color: #f5f7fa;
    --card-background: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e8e8e8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --wechat-color: #07c160;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--background-color);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 容器样式 */
.container {
    width: 100%;
    background: var(--card-background);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 资源加载期间保留布局，使用静态骨架占位，避免内容跳动 */
.skeleton-content {
    border-radius: 6px;
}

.skeleton-overlay {
    display: none;
}

.is-loading .skeleton-overlay {
    display: flex;
    position: absolute;
    z-index: 3;
    inset: 0;
    background: #ffffff;
    pointer-events: none;
}

.is-loading .qrcode-card,
.is-loading .action-button {
    overflow: hidden;
}

.is-loading .qrcode-card > *:not(.skeleton-overlay),
.is-loading .action-button > *:not(.skeleton-overlay) {
    visibility: hidden;
}

.qrcode-skeleton {
    align-items: center;
    flex-direction: column;
    justify-content: flex-start;
    padding: 28px 22px;
}

.skeleton-circle,
.skeleton-square,
.skeleton-line,
.skeleton-button-icon,
.skeleton-button-copy span,
.skeleton-button-arrow {
    display: block;
    background: #edf0f3;
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.skeleton-line {
    height: 14px;
    border-radius: 6px;
}

.skeleton-line-title {
    width: 180px;
    height: 20px;
    margin-bottom: 8px;
}

.skeleton-line-subtitle {
    width: 150px;
    margin-bottom: 16px;
}

.skeleton-square {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.skeleton-line-tip {
    width: 100%;
    height: 34px;
}

.button-skeleton {
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #edf0f3;
}

.skeleton-button-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.skeleton-button-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.skeleton-button-copy span:first-child {
    width: 112px;
    height: 18px;
    border-radius: 5px;
}

.skeleton-button-copy span:last-child {
    width: 138px;
    height: 13px;
    border-radius: 5px;
}

.skeleton-button-arrow {
    width: 10px;
    height: 22px;
    border-radius: 4px;
}

.is-loading .skeleton-content {
    color: transparent !important;
    background: transparent;
}

.is-loading .qrcode-image {
    visibility: hidden;
}

.is-loading .qrcode-wrapper {
    min-height: 200px;
    background: transparent;
    border-radius: var(--radius-sm);
}

.is-loading .company-name {
    display: inline-block;
    min-width: 180px;
    min-height: 30px;
}

.is-loading .button-text {
    min-width: 112px;
    min-height: 22px;
}

.is-loading .button-desc {
    min-width: 132px;
    min-height: 16px;
}

/* 头部样式 - 移动端优化 */
.header {
    background: var(--primary-color);
    color: white;
    padding: 14px 20px 12px;
    text-align: center;
    position: relative;
}

.company-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.welcome-text {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

/* 主内容区域 - 移动端优化 */
.main-content {
    flex: 1;
    padding: 22px 20px 28px;
    background: var(--background-color);
}

/* 二维码卡片样式 - 移动端优化 */
.qrcode-card {
    background: var(--card-background);
    border-radius: var(--radius-md);
    padding: 28px 22px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

/* 公众号关闭时的品牌信任区 */
.brand-panel {
    display: flex;
    align-items: center;
    position: relative;
    background: var(--card-background);
    border-radius: var(--radius-md);
    min-height: 120px;
    padding: 20px 16px;
    margin-bottom: 16px;
    text-align: left;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8f1fb;
    overflow: hidden;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin: 0 16px 0 0;
    border-radius: 16px;
    color: white;
    background: var(--primary-color);
    flex-shrink: 0;
}

.brand-copy {
    min-width: 0;
    padding-right: 64px;
}

.brand-name {
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: #172033;
    font-size: 18px;
    line-height: 1.25;
}

.brand-name strong {
    font-weight: 700;
}

.brand-name span {
    color: #68758a;
    font-weight: 500;
}

.brand-name em {
    color: var(--primary-color);
    font-style: normal;
    font-weight: 700;
}

.brand-trust {
    display: flex;
    align-items: center;
    margin-top: 7px;
    color: #8a94a6;
    font-size: 12px;
    line-height: 1.4;
}

.brand-trust span {
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: #34c759;
}

.brand-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 8px;
    border: 1px solid #d8e9fb;
    border-radius: 999px;
    color: #4f7eae;
    background: #f5faff;
    font-size: 11px;
    line-height: 1.2;
}

.wechat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--wechat-color);
    border-radius: 50%;
    margin-bottom: 12px;
    color: white;
    box-shadow: 0 4px 16px rgba(7, 193, 96, 0.25);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.4;
}

/* 二维码容器 - 移动端优化 */
.qrcode-wrapper {
    display: flex;
    justify-content: center;
    margin: 0 0 14px 0;
}

.qrcode-image {
    width: 200px;
    height: 200px;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.04);
    background: white;
    padding: 10px;
    transition: all 0.3s ease;
}

.qrcode-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f9ff;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: var(--primary-color);
    font-size: 12px;
    line-height: 1.4;
}

.qrcode-tip span {
    font-weight: 500;
}

/* 操作区域样式 - 移动端优化 */
.action-section {
    margin-top: 0;
}

.action-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
}

/* 操作按钮样式 - 移动端优化 */
.action-button {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    margin-bottom: 12px;
    min-height: 88px;
    -webkit-tap-highlight-color: transparent;
}

.action-button:last-child {
    margin-bottom: 0;
}

.action-button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.primary-button {
    background: var(--primary-color);
    color: white;
}

.primary-button .button-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.primary-button .button-desc {
    color: rgba(255, 255, 255, 0.85);
}

.primary-button .button-arrow {
    color: white;
}

.secondary-button {
    background: var(--secondary-color);
    color: white;
}

.secondary-button .button-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.secondary-button .button-desc {
    color: rgba(255, 255, 255, 0.85);
}

.secondary-button .button-arrow {
    color: white;
}

.video-button {
    background: #0b7ac2;
    color: white;
}

.video-button .button-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.video-button .button-desc,
.video-button .button-arrow {
    color: rgba(255, 255, 255, 0.85);
}

.button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: var(--background-color);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.button-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.button-text {
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
}

.button-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    display: block;
    line-height: 1.3;
}

.button-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    opacity: 0.8;
}

/* 手机端布局：增加卡片留白，同时保留足够触控尺寸 */
@media (max-width: 767px) {
    .main-content {
        padding: 16px 16px 22px;
    }

    .qrcode-card {
        padding: 22px 18px;
        margin-bottom: 16px;
    }

    .brand-panel {
        min-height: 110px;
        padding: 16px 14px;
    }

    .brand-mark {
        width: 56px;
        height: 56px;
        margin-right: 14px;
    }

    .brand-name {
        font-size: 16px;
    }

    .brand-trust {
        margin-top: 5px;
        font-size: 11px;
    }

    .brand-badge {
        top: 12px;
        right: 12px;
        font-size: 10px;
    }

    .wechat-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 10px;
    }

    .card-title {
        font-size: 17px;
        margin-bottom: 4px;
    }

    .card-subtitle {
        margin-bottom: 12px;
    }

    .qrcode-image {
        width: 180px;
        height: 180px;
    }

    .qrcode-wrapper {
        margin-bottom: 12px;
    }

    .qrcode-tip {
        padding: 8px 12px;
    }

    .action-title {
        margin-bottom: 10px;
    }

    .action-button {
        gap: 12px;
        padding: 14px 16px;
        min-height: 76px;
        margin-bottom: 10px;
    }

    .button-icon {
        width: 48px;
        height: 48px;
    }

    .qrcode-skeleton {
        padding: 22px 18px;
    }

    .skeleton-circle {
        width: 44px;
        height: 44px;
        margin-bottom: 10px;
    }

    .skeleton-square {
        width: 180px;
        height: 180px;
        margin-bottom: 12px;
    }

    .button-skeleton {
        gap: 12px;
        padding: 14px 16px;
    }

    .skeleton-button-icon {
        width: 48px;
        height: 48px;
    }
}

/* 页脚样式 - 移动端优化 */
.footer {
    background: #fafafa;
    padding: 24px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.copyright {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.6;
}

/* 小屏幕优化 */
@media (max-width: 360px) {
    .header {
        padding: 12px 16px 10px;
    }

    .company-name {
        font-size: 19px;
    }

    .main-content {
        padding: 18px 16px 22px;
    }

    .qrcode-card {
        padding: 22px 16px;
    }

    .qrcode-image {
        width: 180px;
        height: 180px;
    }

    .action-button {
        padding: 14px 16px;
        gap: 12px;
        min-height: 74px;
    }

    .button-icon {
        width: 48px;
        height: 48px;
    }

    .button-text {
        font-size: 15px;
    }

    .button-desc {
        font-size: 11px;
    }
}

/* 大屏幕优化（平板横屏、PC） */
@media (min-width: 768px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }

    .container {
        max-width: 480px;
        min-height: auto;
        border-radius: var(--radius-lg);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }
}

/* 无障碍优化 */
.action-button:focus-visible {
    outline: 3px solid rgba(24, 144, 255, 0.6);
    outline-offset: 2px;
}

/* 横屏优化 */
@media (max-height: 600px) and (orientation: landscape) {
    .header {
        padding: 10px 20px;
    }

    .main-content {
        padding: 16px 20px;
    }

    .qrcode-card {
        padding: 16px;
    }

    .qrcode-image {
        width: 150px;
        height: 150px;
    }

    .action-button {
        padding: 12px 16px;
        min-height: 64px;
    }
}

/* 首页视觉更新 */
body {
    background: #dbe5ef;
    color: #1b3046;
}

.container {
    min-height: 100vh;
    background: var(--background-color);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 20px;
    background: #fff;
    text-align: left;
}

.header-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    color: var(--primary-color);
    white-space: nowrap;
}

.header-brand strong {
    font-size: 23px;
    line-height: 1;
}

.header-brand span {
    font-size: 14px;
    font-weight: 600;
}

.header-badge {
    flex: none;
    padding: 5px 10px;
    border-radius: 6px;
    background: #e9f4ff;
    color: #1d6bc1;
    font-size: 12px;
    font-weight: 600;
}

.hero {
    position: relative;
    height: 222px;
    overflow: hidden;
    background: var(--primary-color);
    color: #fff;
}

.hero-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
    padding: 32px 22px;
}

.hero h1 {
    max-width: 78%;
    margin: 0 0 7px;
    font-size: 25px;
    line-height: 1.4;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.hero p {
    margin: 0;
    color: #dbedff;
    font-size: 12px;
    line-height: 1.5;
}

.hero-tag {
    display: inline-block;
    margin-top: 34px;
    padding: 6px 12px;
    border-radius: 6px;
    background: #275687;
    color: #ddf4ff;
    font-size: 12px;
    line-height: 1.5;
}

.hero-device {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 170px;
    height: auto;
    pointer-events: none;
}

.main-content {
    flex: 1;
    padding: 22px 20px 26px;
    background: var(--background-color);
}

.qrcode-card {
    border-radius: 8px;
    border: 1px solid #e9f0f6;
    margin-bottom: 24px;
    box-shadow: 0 5px 15px rgba(27, 72, 114, 0.07);
}

.action-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.action-title {
    margin: 0;
    padding: 0;
    border: 0;
    color: #1b3046;
    font-size: 18px;
    line-height: 1.4;
}

.action-heading > span {
    color: #91a6bc;
    font-size: 11px;
    font-weight: 700;
}

.action-button {
    min-height: 92px;
    gap: 14px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #e9f0f6;
    border-radius: 8px;
    background: #fff;
    color: #1b3046;
    box-shadow: 0 5px 15px rgba(27, 72, 114, 0.07);
    transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.action-button:hover {
    border-color: #c9dceb;
    box-shadow: 0 9px 22px rgba(27, 72, 114, 0.12);
    transform: translateY(-2px);
}

.action-button:active {
    transform: translateY(0);
}

.button-icon {
    width: 54px;
    height: 54px;
    border-radius: 8px;
}

.button-icon svg {
    width: 28px;
    height: 28px;
}

.primary-button .button-icon {
    background: #eaf4ff;
    color: var(--secondary-color);
}

.secondary-button .button-icon {
    background: #eaf8f2;
    color: #159c6a;
}

.video-button .button-icon {
    background: #fff1e9;
    color: #d87337;
}

.button-content {
    min-width: 0;
    gap: 2px;
}

.button-text {
    margin: 0;
    color: #1b3046;
    font-size: 16px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.button-desc,
.primary-button .button-desc,
.secondary-button .button-desc,
.video-button .button-desc {
    color: #5a7188;
    font-size: 12px;
    line-height: 1.45;
}

.button-arrow,
.primary-button .button-arrow,
.secondary-button .button-arrow,
.video-button .button-arrow {
    flex: none;
    margin-left: auto;
    color: #94a9bc;
    opacity: 1;
}

.button-arrow svg {
    width: 20px;
    height: 20px;
}

.footer {
    padding: 18px 20px 20px;
    border-top: 1px solid #e0ebf4;
    background: #eaf2f8;
    color: #54708d;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.action-button:focus-visible {
    outline: 3px solid #247bce;
    outline-offset: 3px;
}

@media (max-width: 360px) {
    .header {
        padding: 0 16px;
    }

    .hero h1 {
        max-width: 75%;
        font-size: 22px;
    }

    .hero-device {
        right: 0;
        width: 150px;
    }

    .hero-copy {
        padding-inline: 16px;
    }

    .main-content {
        padding-inline: 16px;
    }

    .action-button {
        min-height: 88px;
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .container {
        width: 100%;
        max-width: 440px;
        min-height: 0;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 20px 80px rgba(22, 60, 106, 0.16);
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: 190px;
    }

    .hero-device {
        width: 145px;
    }

    .action-button {
        min-height: 76px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .action-button {
        transition: none;
    }
}

/* 参考图版首页：保留旧类名以兼容现有配置与跳转逻辑。 */
:root {
    --reference-ink: #173154;
    --reference-muted: #596f8d;
    --reference-blue: #2189f0;
}

body {
    background: #e8f4ff;
    color: var(--reference-ink);
}

.container {
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background: #f8fbff;
    box-shadow: none;
}

.hero {
    height: 226px;
    isolation: isolate;
    background: #f8fbff;
}

.hero::before {
    content: none;
}

.hero-backdrop {
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
}

.hero-wave-back,
.hero-wave-base,
.hero-wave-accent {
    position: absolute;
    inset: 0;
}

.hero-wave-back {
    background: linear-gradient(115deg, #8fd0ff 0%, #b7e2ff 54%, #91d0ff 100%);
    clip-path: ellipse(75% 133% at 50% -9%);
}

.hero-wave-base {
    background:
        radial-gradient(circle at 72% 55%, rgba(172, 225, 255, .43) 0 21%, transparent 21.2%),
        radial-gradient(circle at 77% 49%, rgba(101, 190, 250, .42) 0 29%, transparent 29.2%),
        linear-gradient(115deg, #238df0 0%, #49b4ff 60%, #168bf0 100%);
    clip-path: ellipse(75% 108% at 50% -22%);
}

.hero-wave-accent {
    top: 122px;
    left: 25%;
    width: 91%;
    height: 105px;
    border-radius: 50% 50% 0 0 / 65% 65% 0 0;
    background: rgba(204, 237, 255, .46);
    transform: rotate(-3deg);
}

.hero::after {
    content: "";
    position: absolute;
    left: 7%;
    top: 116px;
    width: 33px;
    height: 4px;
    border-radius: 5px;
    background: rgba(180, 226, 255, .65);
    box-shadow: 8px 0 0 rgba(180, 226, 255, .4);
}

.hero-wifi {
    position: absolute;
    z-index: 2;
    top: 28px;
    left: 35px;
    width: 36px;
    height: 36px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 86, 162, .18));
}

.hero-wifi svg {
    width: 100%;
    height: 100%;
}

.hero-copy {
    position: absolute;
    z-index: 2;
    top: 27px;
    left: 84px;
    padding: 0;
    color: #fff;
    text-shadow: 0 2px 7px rgba(9, 102, 190, .15);
}

.hero h1 {
    max-width: none;
    margin: 0;
    font-size: 38px;
    line-height: 1.05;
    font-weight: 800;
    white-space: nowrap;
}

.hero h1 span {
    display: block;
}

.hero h1 span:first-child {
    margin-bottom: 5px;
}

.hero h1 em {
    color: #ffe486;
    font-style: normal;
}

.hero p {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.4;
    color: #fff;
    white-space: nowrap;
}

.hero-device {
    z-index: 2;
    width: 132px;
    right: 57px;
    top: 24px;
    bottom: auto;
    filter: drop-shadow(0 10px 9px rgba(14, 83, 183, .18));
}

.hero-signal {
    position: absolute;
    z-index: 2;
    top: 39px;
    right: 21px;
    width: 40px;
    height: 75px;
    opacity: .85;
    pointer-events: none;
}

.main-content {
    z-index: 2;
    padding: 0 25px 0;
    background: transparent;
}

.qrcode-card {
    position: relative;
    margin: -77px 0 14px;
    padding: 46px 20px 16px;
    border: 1px solid rgba(255, 255, 255, .96);
    border-radius: 26px;
    background: #fff;
    text-align: center;
    box-shadow: 0 12px 28px rgba(38, 115, 203, .1);
}

.qrcode-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -14px;
    left: 50%;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #fff;
    transform: translateX(-50%);
}

.wechat-icon {
    position: absolute;
    top: 4px;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: 0;
    background: linear-gradient(135deg, #12cc7c, #02ae61);
    box-shadow: 0 5px 12px rgba(2, 173, 91, .18);
    transform: translateX(-50%);
}

.wechat-icon svg {
    width: 26px;
    height: 26px;
}

.card-title {
    margin: 0 0 2px;
    color: var(--reference-ink);
    font-size: 19px;
    font-weight: 750;
    line-height: 1.35;
}

.card-subtitle {
    margin: 0 0 4px;
    color: var(--reference-muted);
    font-size: 13px;
    line-height: 1.5;
}

.qrcode-wrapper {
    position: relative;
    display: grid;
    place-items: center;
    width: 166px;
    height: 150px;
    padding: 0;
    margin: 0 auto 9px;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.qrcode-frame {
    position: relative;
    display: grid;
    place-items: center;
    width: 150px;
    height: 146px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(25, 110, 225, .12);
}

.qrcode-wrapper::before,
.qrcode-wrapper::after,
.qrcode-frame::before,
.qrcode-frame::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: #72bdfb;
    border-style: solid;
    pointer-events: none;
}

.qrcode-wrapper::before {
    top: 0;
    left: 0;
    border-width: 2px 0 0 2px;
    border-radius: 6px 0 0 0;
}

.qrcode-wrapper::after {
    top: 0;
    right: 0;
    border-width: 2px 2px 0 0;
    border-radius: 0 6px 0 0;
}

.qrcode-frame::before {
    z-index: 2;
    bottom: -2px;
    left: -8px;
    border-width: 0 0 2px 2px;
    border-radius: 0 0 0 6px;
}

.qrcode-frame::after {
    z-index: 2;
    bottom: -2px;
    right: -8px;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 6px 0;
}

.qrcode-image {
    width: 132px;
    height: 132px;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.qrcode-tip {
    width: 100%;
    min-height: 40px;
    gap: 8px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: #e7f4ff;
    color: #177de5;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

.qrcode-tip span {
    font-weight: 600;
}

.qrcode-tip:hover {
    background: #d6ecff;
}

.qrcode-tip:active {
    transform: scale(.985);
}

.action-section {
    display: grid;
    gap: 11px;
}

.action-button {
    display: flex;
    align-items: center;
    min-height: 75px;
    gap: 21px;
    padding: 9px 20px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 20px;
    color: var(--reference-ink);
    box-shadow: 0 4px 9px rgba(53, 126, 212, .1);
    transition: box-shadow 180ms ease, transform 180ms ease, filter 180ms ease;
}

.service-qrcode-open {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.primary-button {
    background: linear-gradient(105deg, #fafdff 0%, #e2f1ff 100%);
}

.secondary-button {
    background: linear-gradient(105deg, #fffaff 0%, #eee6ff 100%);
}

.video-button {
    background: linear-gradient(105deg, #faffff 0%, #daf8ef 100%);
}

.action-button:hover {
    transform: translateY(-2px);
    filter: saturate(1.08);
    box-shadow: 0 8px 20px rgba(53, 126, 212, .18);
}

.action-button:active {
    transform: scale(.99);
}

.button-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #fff !important;
}

.button-icon svg {
    width: 27px;
    height: 27px;
}

.primary-button .button-icon {
    background: linear-gradient(135deg, #238afa, #1b78e7);
}

.secondary-button .button-icon {
    background: linear-gradient(135deg, #7d62ff, #5b46e6);
}

.video-button .button-icon {
    background: linear-gradient(135deg, #14c6b8, #08ada9);
}

.button-content {
    gap: 2px;
    min-width: 0;
}

.button-text {
    color: var(--reference-ink);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.35;
}

.button-desc,
.primary-button .button-desc,
.secondary-button .button-desc,
.video-button .button-desc {
    color: #5c718e;
    font-size: 13px;
    line-height: 1.4;
}

.button-arrow,
.primary-button .button-arrow,
.secondary-button .button-arrow,
.video-button .button-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(40, 145, 245, .12);
    color: #238cf2;
}

.secondary-button .button-arrow {
    background: rgba(113, 84, 239, .11);
    color: #654cec;
}

.video-button .button-arrow {
    background: rgba(17, 190, 178, .11);
    color: #0db2ad;
}

.button-arrow svg {
    width: 19px;
    height: 19px;
}

.footer {
    position: relative;
    flex: none;
    height: 43px;
    min-height: 0;
    padding: 0;
    margin-top: 0;
    border: 0;
    background: #d9edff;
}

.footer::before {
    content: "";
    position: absolute;
    top: -35px;
    left: -10%;
    width: 120%;
    height: 65px;
    border-radius: 0 0 50% 50% / 0 0 70% 70%;
    background: #f8fbff;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.qrcode-open:focus-visible,
.action-button:focus-visible,
.qr-dialog-close:focus-visible {
    outline: 3px solid #0b63ce;
    outline-offset: 3px;
}

@media (hover: none) and (pointer: coarse) {
    .qrcode-open,
    .action-button,
    .qr-dialog-close {
        -webkit-tap-highlight-color: transparent;
    }

    .qrcode-open:focus-visible,
    .action-button:focus-visible,
    .qr-dialog-close:focus,
    .qr-dialog-close:focus-visible {
        outline: none;
    }
}

.qr-dialog[hidden] {
    display: none;
}

.qr-dialog {
    position: fixed;
    z-index: 10;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(14, 39, 74, .68);
    overflow-y: auto;
}

.qr-dialog-open {
    overflow: hidden;
}

.qr-dialog-panel {
    position: relative;
    width: min(100%, 340px);
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    padding: 34px 24px 26px;
    border-radius: 20px;
    background: #fff;
    text-align: center;
    box-shadow: 0 18px 55px rgba(6, 31, 68, .27);
}

.qr-dialog-panel img {
    display: block;
    width: min(100%, 260px);
    height: auto;
    margin: 0 auto 16px;
}

.qr-dialog-panel p {
    color: var(--reference-muted);
    font-size: 14px;
}

.service-qr-dialog-panel {
    padding-top: 28px;
}

.qr-dialog-title {
    margin: 0 30px 16px;
    color: var(--reference-ink);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}

.service-qr-dialog-panel .service-qrcode-image {
    width: min(100%, 260px, max(140px, calc(100vh - 190px)));
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    -webkit-touch-callout: default;
}

.service-qr-dialog-panel p {
    margin: 0;
    line-height: 1.5;
}

.service-flow-view[hidden],
.help-category-panel[hidden],
.help-faq-answer[hidden] {
    display: none !important;
}

.service-qr-dialog-panel {
    width: min(100%, 420px);
    max-height: min(88vh, 760px);
    padding: 30px 20px 18px;
    text-align: left;
}

.service-flow-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #2189f0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.service-flow-kicker-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #35c978;
    box-shadow: 0 0 0 4px #e9f9f0;
}

.service-flow-view .qr-dialog-title {
    margin: 9px 0 5px;
    font-size: 22px;
    line-height: 1.3;
    text-align: left;
}

.service-flow-intro {
    margin: 0 0 16px !important;
    color: var(--reference-muted);
    font-size: 13px;
    line-height: 1.65;
}

.service-help-link {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding: 10px 14px;
    border: 1px solid #b9dbf9;
    border-radius: 8px;
    color: #1269b8;
    background: #edf7ff;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.service-help-link span:last-child {
    flex: none;
    font-size: 18px;
}

.help-category-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 13px;
}

.help-category-tab {
    min-width: 0;
    min-height: 40px;
    padding: 7px 4px;
    border: 1px solid #dceaf5;
    border-radius: 9px;
    color: #5e7790;
    background: #f8fbfe;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    touch-action: manipulation;
}

.help-category-tab.is-active {
    border-color: #2189f0;
    color: #fff;
    background: #2189f0;
    box-shadow: 0 5px 12px rgba(33, 137, 240, .18);
}

.help-category-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    padding: 0 2px;
}

.help-category-heading > div {
    min-width: 0;
}

.help-category-heading strong {
    display: block;
    color: var(--reference-ink);
    font-size: 15px;
    line-height: 1.4;
}

.help-category-heading span {
    display: block;
    margin-top: 2px;
    color: var(--reference-muted);
    font-size: 11px;
    line-height: 1.45;
}

.help-category-count {
    flex: none;
    padding-top: 2px;
    color: #8da4b9 !important;
    font-size: 11px !important;
    white-space: nowrap;
}

.help-faq-list {
    overflow: hidden;
    border-top: 1px solid #e5eef5;
    border-bottom: 1px solid #e5eef5;
    border-radius: 8px;
    background: #fff;
}

.help-faq-item {
    border-bottom: 1px solid #e5eef5;
}

.help-faq-item:last-child {
    border-bottom: 0;
}

.help-faq-question {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    color: var(--reference-ink);
    background: #fff;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
}

.help-faq-question > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.help-faq-question b {
    display: inline-block;
    margin-right: 6px;
    color: #8ca5bd;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.help-faq-chevron {
    flex: none;
    color: #9db1c4;
    font-size: 23px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 160ms ease, color 160ms ease;
}

.help-faq-item.is-expanded .help-faq-question {
    color: #1d75cc;
    background: #fbfdff;
}

.help-faq-item.is-expanded .help-faq-chevron {
    color: #2189f0;
    transform: rotate(90deg);
}

.help-faq-answer {
    margin: -1px 0 0;
    padding: 0 12px 12px 34px;
    color: #526f89;
    background: #fbfdff;
    font-size: 12px;
    line-height: 1.6;
}

.help-faq-answer ol {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
}

.help-faq-answer li {
    padding-left: 2px;
}

.help-faq-answer p {
    margin: 9px 0 0;
    padding-top: 8px;
    border-top: 1px solid #e6eef5;
    color: #8398ad;
    font-size: 11px;
    line-height: 1.55;
}

.service-flow-next {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 15px;
    padding: 12px;
    border: 1px solid #dceaf5;
    border-radius: 10px;
    background: #f6fbff;
}

.service-flow-next > div {
    min-width: 0;
}

.service-flow-next strong {
    display: block;
    color: var(--reference-ink);
    font-size: 13px;
    line-height: 1.4;
}

.service-flow-next span {
    display: block;
    margin-top: 3px;
    color: var(--reference-muted);
    font-size: 11px;
    line-height: 1.45;
}

.service-flow-next-button {
    min-height: 38px;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #2189f0;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
}

.service-flow-next-button span {
    margin: 0;
    color: inherit;
    font-size: 15px;
}

.service-qr-view {
    text-align: center;
}

.service-qr-view .service-flow-kicker,
.service-qr-view .qr-dialog-title {
    display: block;
    text-align: center;
}

.service-qr-view .service-flow-kicker {
    display: inline-flex;
}

.service-qr-view .qr-dialog-title {
    margin-top: 7px;
}

.service-qr-dialog-panel .service-qrcode-image {
    width: min(100%, 260px, max(150px, calc(100vh - 300px)));
    margin: 4px auto 12px;
    border: 1px solid #e1edf6;
    border-radius: 10px;
    background: #fff;
}

.service-qr-hint {
    margin: 0 !important;
    color: #2189f0 !important;
    font-size: 13px !important;
    font-weight: 650;
}

.help-page-body {
    display: block;
    padding: 0;
    background: #f0f7fd;
}

.help-page {
    width: min(100%, 640px);
    min-height: 100vh;
    margin: 0 auto;
    background: #f8fbff;
}

.help-page-header {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 54px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid #e1edf6;
    background: rgba(255, 255, 255, .97);
    color: var(--reference-ink);
    text-align: center;
}

.help-page-header strong {
    font-size: 16px;
}

.help-page-back,
.help-page-header-spacer {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
}

.help-page-back {
    border-radius: 50%;
    color: #346b9c;
    font-size: 32px;
    line-height: 1;
    text-decoration: none;
}

.help-page-back:hover {
    background: #edf7ff;
}

.help-page-content {
    padding: 22px 16px 34px;
}

.help-page-content .service-help-view {
    padding: 0;
}

.help-page-content .service-flow-view .qr-dialog-title {
    font-size: 24px;
}

.help-page-content .service-flow-intro {
    max-width: 490px;
}

.help-page-content .help-category-tabs {
    gap: 9px;
    margin: 20px 0;
}

.help-page-content .help-category-tab {
    min-height: 48px;
    font-size: 13px;
}

.help-page-content .help-faq-list {
    border-right: 1px solid #e5eef5;
    border-left: 1px solid #e5eef5;
}

.help-page-content .help-faq-question {
    min-height: 56px;
    padding: 12px 14px;
    font-size: 14px;
}

.help-page-content .help-faq-answer {
    padding: 0 16px 16px 40px;
    font-size: 13px;
}

.help-page-content .service-flow-next {
    margin-top: 22px;
}

.help-page-disclaimer {
    margin-top: 16px;
    padding: 0 2px;
    color: #7992a8;
    font-size: 11px;
    line-height: 1.6;
}

button:focus-visible,
.service-help-link:focus-visible,
.help-page-back:focus-visible {
    outline: 3px solid #2189f0;
    outline-offset: 2px;
}

@media (max-width: 400px) {
    .service-qr-dialog-panel {
        width: min(100%, 360px);
        padding: 28px 14px 14px;
    }

    .service-flow-view .qr-dialog-title {
        font-size: 20px;
    }

    .help-category-tabs {
        gap: 4px;
    }

    .help-category-tab {
        min-height: 38px;
        font-size: 11px;
    }

    .help-faq-question {
        min-height: 46px;
        padding-inline: 8px;
        font-size: 12px;
    }

    .help-faq-answer {
        padding-left: 29px;
        font-size: 11px;
    }

    .service-flow-next {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-flow-next-button {
        width: 100%;
        justify-content: center;
    }

    .help-page-content {
        padding: 20px 14px 30px;
    }

    .help-page-content .help-category-tabs {
        gap: 5px;
    }

    .help-page-content .help-category-tab {
        font-size: 11px;
    }

    .help-page-content .service-flow-next-button {
        width: 100%;
    }
}

.qr-dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #edf5fc;
    color: var(--reference-ink);
    font: 500 21px/1 Arial, sans-serif;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.qr-dialog-close:hover {
    background: #e1eef9;
}

.qr-dialog-close:active {
    background: #d7e8f5;
    transform: scale(.92);
}

@media (max-width: 400px) {
    .hero {
        height: 213px;
    }

    .hero-wifi {
        left: 24px;
        width: 32px;
        height: 32px;
    }

    .hero-copy {
        left: 62px;
    }

    .hero h1 {
        font-size: 33px;
    }

    .hero p {
        font-size: 13px;
    }

    .hero-device {
        top: 24px;
        right: 27px;
        width: 123px;
    }

    .hero-signal {
        top: 42px;
        right: 2px;
        width: 24px;
        height: 54px;
    }

    .main-content {
        padding-inline: 17px;
    }

    .qrcode-card {
        margin-top: -69px;
        padding-inline: 14px;
    }

    .action-button {
        gap: 13px;
        padding-inline: 14px;
    }

    .button-icon {
        width: 50px;
        height: 50px;
    }

    .button-text {
        font-size: 15px;
    }

    .button-desc {
        font-size: 12px;
    }
}

@media (max-width: 340px) {
    .hero-copy {
        left: 58px;
    }

    .hero h1 {
        font-size: 29px;
    }

    .hero-device {
        top: 35px;
        right: 12px;
        width: 105px;
    }

    .hero-signal {
        display: none;
    }

    .main-content {
        padding-inline: 12px;
    }

    .action-button {
        gap: 10px;
        padding-inline: 12px;
    }
}

@media (min-width: 768px) {
    body {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 20px;
    }

    .container {
        max-width: 512px;
        min-height: 768px;
        border-radius: 8px;
        box-shadow: 0 20px 65px rgba(29, 101, 186, .17);
    }
}

/* 移动端首屏重排：先看到入口，再保留品牌宣传 */
@media (max-width: 767px) {
    body {
        background: #f8fbff;
    }

    .container {
        min-height: 100dvh;
    }

    .hero {
        height: 190px;
    }

    .hero-copy {
        top: 25px;
    }

    .hero h1 {
        font-size: 34px;
        line-height: 1.06;
    }

    .hero p {
        margin-top: 7px;
        font-size: 14px;
    }

    .hero-device {
        top: 22px;
        right: 25px;
        width: 124px;
    }

    .hero-signal {
        top: 37px;
        right: 5px;
        width: 30px;
        height: 62px;
    }

    .main-content {
        padding: 0 16px calc(24px + env(safe-area-inset-bottom));
    }

    .qrcode-card {
        margin: -30px 0 14px;
        padding: 37px 14px 14px;
        border-radius: 22px;
    }

    .qrcode-card::before {
        top: -11px;
        width: 68px;
        height: 68px;
    }

    .wechat-icon {
        top: 3px;
        width: 38px;
        height: 38px;
    }

    .wechat-icon svg {
        width: 24px;
        height: 24px;
    }

    .card-title {
        font-size: 18px;
    }

    .card-subtitle {
        margin-bottom: 2px;
        font-size: 12px;
    }

    .qrcode-wrapper {
        width: 156px;
        height: 137px;
        margin-bottom: 7px;
    }

    .qrcode-frame {
        width: 138px;
        height: 134px;
        border-radius: 14px;
    }

    .qrcode-image {
        width: 122px;
        height: 122px;
    }

    .qrcode-tip {
        min-height: 38px;
        font-size: 12px;
    }

    .action-section {
        gap: 9px;
    }

    .action-button {
        min-height: 72px;
        gap: 13px;
        padding: 9px 14px;
        border-radius: 16px;
    }

    .button-icon {
        width: 48px;
        height: 48px;
    }

    .button-icon svg {
        width: 25px;
        height: 25px;
    }

    .button-text {
        font-size: 15px;
    }

    .button-desc,
    .primary-button .button-desc,
    .secondary-button .button-desc,
    .video-button .button-desc {
        font-size: 12px;
    }

    .button-arrow {
        width: 28px;
        height: 28px;
    }

    .button-arrow svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 400px) {
    .hero {
        height: 181px;
    }

    .hero-wifi {
        top: 25px;
        left: 22px;
        width: 31px;
        height: 31px;
    }

    .hero-copy {
        top: 24px;
        left: 60px;
    }

    .hero h1 {
        font-size: 31px;
    }

    .hero p {
        font-size: 13px;
    }

    .hero-device {
        top: 22px;
        right: 19px;
        width: 112px;
    }

    .hero-signal {
        top: 39px;
        right: 0;
        width: 24px;
        height: 52px;
    }

    .main-content {
        padding-inline: 12px;
    }

    .qrcode-card {
        margin-top: -24px;
        padding-inline: 12px;
    }

    .action-button {
        padding-inline: 12px;
    }
}

@media (max-width: 340px) {
    .hero {
        height: 174px;
    }

    .hero-copy {
        left: 55px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-device {
        top: 29px;
        right: 10px;
        width: 101px;
    }

    .hero-signal {
        display: none;
    }

    .qrcode-card {
        padding-top: 35px;
    }

    .qrcode-wrapper {
        width: 150px;
    }

    .action-button {
        min-height: 70px;
        gap: 10px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .action-button:hover {
        transform: none;
        filter: none;
        box-shadow: 0 4px 9px rgba(53, 126, 212, .1);
    }

    .action-button,
    .qrcode-open {
        touch-action: manipulation;
    }
}

@media (prefers-reduced-motion: reduce) {
    .action-button,
    .qrcode-tip {
        transition: none;
    }
}
