/*==========================================================================
 * 云雪授权系统 — 移动端体验增强层 v2（mobile.css）
 *
 * 定位：只做「小屏适配」，不改桌面端任何表现。
 *   桌面端：>= 992px  → 本文件几乎不生效
 *   平板端：768 ~ 991px
 *   手机端：< 768px（主战场）
 *   小屏：  < 400px（iPhone SE / 小屏安卓）
 *
 * 视觉语言：与 app.css 的「版印」体系同源——
 *   纸面底、发丝规则线、方角（6px）、朱砂只标当前项。
 *   手机端不再用大圆角与浮起投影，改以边界线区分层级。
 *
 * 设计原则：
 *   1. 首屏信息密度优先 —— 手机上一屏要能看到「核心价值 + 主行动」
 *   2. 触摸友好 —— 所有可点目标 >= 44×44 CSS px（含间距）
 *   3. 单手可达 —— 主行动按钮贴近拇指热区（屏幕下半部）
 *   4. 不靠颜色单独传达 —— 状态一律「色 + 图标 + 文字」
 *   5. 安全区适配 —— 刘海屏 / 底部手势条
 *   6. 性能优先 —— 无重型动画、无滤镜滥用、尊重 reduce-motion
 *==========================================================================*/

/*------------------------------------------------------
 * 1. 断点令牌（统一维护，避免散落魔法数字）
 *------------------------------------------------------*/
:root {
    /* 移动端专用令牌 */
    --yx-m-pad: 16px;              /* 手机端左右安全边距 */
    --yx-m-pad-tight: 12px;        /* 小屏紧凑边距 */
    --yx-m-gap: 12px;              /* 手机端元素间距 */
    --yx-m-radius: 6px;            /* 与桌面同值：方角是这套设计的识别点 */
    /* 触摸目标统一复用 enhance.css 已有的 --yx-touch-min: 44px */
    --yx-m-touch: var(--yx-touch-min, 44px);
    --yx-nav-h: 56px;              /* 手机导航高度（比桌面 64 更紧凑） */
    --yx-tabbar-h: 58px;           /* 底部标签栏高度 */
}

/*------------------------------------------------------
 * 2. 全局：横向溢出根治 + 平滑滚动锚点避让
 *------------------------------------------------------*/
@media (max-width: 991px) {
    html {
        /* 锚点跳转时避开固定导航 */
        scroll-padding-top: calc(var(--yx-nav-h) + 12px);
    }
    body {
        /* 根治横向滚动：图片/长文本/表格撑破视口 */
        overflow-x: hidden;
    }
    /* 自定义滚动条在触屏上无意义，且会挤压宽度 */
    .screen::-webkit-scrollbar,
    body::-webkit-scrollbar { width: 0; height: 0; }
}

/* 长英文单词 / URL / 授权码不撑破容器 */
@media (max-width: 991px) {
    .yx-mono,
    .yx-app-card-key,
    .yx-license-key,
    code, kbd, pre {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/*------------------------------------------------------
 * 3. 顶部导航：手机端改为紧凑栏 + 全屏抽屉
 *------------------------------------------------------*/
@media (max-width: 991px) {
    .yx-nav {
        height: var(--yx-nav-h);
        /* 顶部安全区（横屏刘海） */
        padding-top: env(safe-area-inset-top, 0);
    }
    .yx-nav-inner {
        padding: 0 14px;
        gap: 10px;
    }
    .yx-nav-brand-text {
        font-size: 15px;
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .yx-nav-brand-logo {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    /* 汉堡按钮放到右手拇指区 */
    .yx-nav-toggle {
        margin-left: auto;
        width: var(--yx-m-touch);
        height: var(--yx-m-touch);
        border-radius: var(--yx-radius-sm);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .yx-nav-actions { margin-left: auto; }
    .yx-nav-actions .yx-btn { min-height: 34px; padding: 0 13px; font-size: 13px; }
}

/* 抽屉：从顶部滑入的全屏面板（比原生下拉更易点） */
@media (max-width: 991px) {
    .yx-nav-links {
        position: fixed;
        top: calc(var(--yx-nav-h) + env(safe-area-inset-top, 0px));
        left: 0;
        right: 0;
        bottom: auto;
        max-height: calc(100vh - var(--yx-nav-h));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding: 10px 14px calc(18px + env(safe-area-inset-bottom, 0px));
        background: var(--yx-card);
        border-bottom: 1px solid var(--yx-line);
        border-radius: 0 0 var(--yx-radius) var(--yx-radius);
        box-shadow: 0 18px 40px rgba(64, 52, 30, .16);
        display: none;
        flex-direction: column;
        gap: 2px;
        z-index: 1001;
    }
    .yx-nav-links.open { display: flex; animation: yxDrawerIn .22s var(--yx-ease-out); }
    .yx-nav-link {
        display: flex;
        align-items: center;
        min-height: var(--yx-m-touch);
        padding: 0 14px;
        border-radius: var(--yx-radius-sm);
        font-size: 15px;
        font-weight: 500;
        color: var(--yx-ink-2);
    }
    .yx-nav-link:active { background: var(--yx-primary-soft); color: var(--yx-primary); }
    /* 当前页高亮 —— 手机端靠左侧朱砂短条 + 浅底双重视觉 */
    .yx-nav-link.active,
    .yx-nav-link[aria-current="page"] {
        background: var(--yx-primary-soft);
        color: var(--yx-primary);
        font-weight: 600;
        box-shadow: inset 3px 0 0 var(--yx-primary);
    }
    /* 抽屉打开时锁背景滚动，避免穿透 */
    body.yx-nav-open { overflow: hidden; }
    /* 遮罩：点击关闭 */
    .yx-nav-scrim {
        position: fixed;
        inset: 0;
        background: rgba(27, 23, 18, .42);
        backdrop-filter: blur(2px);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--yx-dur-base) var(--yx-ease);
    }
    .yx-nav-scrim.open { opacity: 1; pointer-events: auto; }

    @keyframes yxDrawerIn {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: none; }
    }
}

/*------------------------------------------------------
 * 4. 首页 Hero：手机端不再硬撑 620px，改为「内容驱动 + 紧凑节奏」
 *------------------------------------------------------*/
@media (max-width: 991px) {
    .yx-hero-home {
        min-height: 0;                     /* 关键：解除 620px 硬高 */
        padding: calc(var(--yx-nav-h) + 40px) 20px 46px;
        margin-top: calc(-1 * var(--yx-nav-h));
    }
    .yx-hero-home-inner { max-width: 100%; }
    .yx-hero-title {
        font-size: 30px;
        line-height: 1.28;
        letter-spacing: -.6px;
        margin-bottom: 12px;
    }
    .yx-hero-sub {
        font-size: 14.5px;
        line-height: 1.75;
        padding: 0 4px;
    }
    .yx-hero-badge { margin-bottom: 18px; padding: 6px 14px; font-size: 12px; }
    .yx-hero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 24px 0 28px;               /* 手机上缩短 CTA 下方留白 */
    }
    .yx-hero-cta .yx-hero-btn {
        width: 100%;
        justify-content: center;
        min-height: 50px;                  /* 拇指友好高度 */
        font-size: 15.5px;
    }
    .yx-hero-trust {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        font-size: 12.5px;
    }
    .yx-hero-orb-1 { width: 240px; height: 240px; top: -110px; right: -70px; }
    .yx-hero-orb-2 { width: 200px; height: 200px; bottom: -90px; left: -60px; }
}

/* 小屏进一步收敛 */
@media (max-width: 400px) {
    .yx-hero-title { font-size: 26px; }
    .yx-hero-sub { font-size: 13.5px; }
    .yx-hero-home { padding-left: 16px; padding-right: 16px; }
}

/*------------------------------------------------------
 * 5. 区块节奏：手机端边距补偿（80px → 48px）
 *------------------------------------------------------*/
@media (max-width: 991px) {
    .yx-section {
        padding: 48px var(--yx-m-pad) 0;
    }
    .yx-section-head {
        margin: 44px 0 22px;
        text-align: left;                  /* 手机端左对齐更省视线移动 */
    }
    .yx-section-head h2 { font-size: 22px; }
    .yx-section-head p { font-size: 13px; margin-top: 4px; }
    .yx-hero { padding: 28px 20px; }
    .yx-hero-sm { padding: 24px 20px; }
    .yx-card { border-radius: var(--yx-m-radius); }
    .yx-card-body { padding: 16px 14px; }
    .yx-card-head { padding: 14px 14px 0; }
}

/* 首页列表类：手机端增大行高与点击区域 */
@media (max-width: 991px) {
    .yx-notice-list li {
        padding: 13px 0;
        gap: 10px;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .yx-notice-list a {
        font-size: 14px;
        line-height: 1.6;
        flex: 1 1 100%;
        order: 1;
    }
    .yx-notice-list .date {
        font-size: 11.5px;
        order: 2;
        margin-left: 24px;
        opacity: .8;
    }
    .yx-notice-list .flag { margin-top: 7px; }
}

/*------------------------------------------------------
 * 6. 卡片网格：手机端单列 + 紧凑内边距
 *------------------------------------------------------*/
@media (max-width: 991px) {
    .yx-feature-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 28px 0;
    }
    .yx-feature {
        padding: 18px 16px;
        border-radius: var(--yx-m-radius);
    }
    .yx-feature-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 12px;
    }
    .yx-feature h3 { font-size: 16.5px; margin: 0 0 6px; }
    .yx-feature p { font-size: 13px; line-height: 1.7; }

    .yx-app-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin: 22px 0 40px;
    }
    .yx-app-card {
        padding: 16px;
        border-radius: var(--yx-m-radius);
    }
    .yx-app-card-logo {
        width: 46px;
        height: 46px;
        font-size: 19px;
        border-radius: 12px;
    }
    .yx-app-card-name { font-size: 17px; }
    .yx-app-card-desc {
        font-size: 13px;
        line-height: 1.7;
        margin: 12px 0;
    }
    /* 主/次行动按钮：主行动占满，次行动紧凑 —— 避免两个按钮同权重 */
    .yx-app-card-foot {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 10px;
        margin-top: 14px;
    }
    .yx-app-card-foot .yx-btn {
        min-height: 42px;
        justify-content: center;
    }
    .yx-pkg-grid { grid-template-columns: 1fr; gap: 12px; }
    .yx-pkg-card { padding: 18px 16px; }

    .yx-features-row { grid-template-columns: 1fr; gap: 12px; }
    .yx-data-grid { grid-template-columns: 1fr; gap: 10px; }
    .yx-data-card { padding: 16px 14px; gap: 14px; }
    .yx-data-num { font-size: 22px; }
    .yx-data-ico { width: 42px; height: 42px; }
    .yx-data-ico svg { width: 20px; height: 20px; }
    .yx-data-band { margin-top: -30px; padding: 0 var(--yx-m-pad); }
}

/*------------------------------------------------------
 * 7. 表单：手机端触控优化 + 键盘类型适配
 *------------------------------------------------------*/
@media (max-width: 991px) {
    .yx-form-grid { grid-template-columns: 1fr; gap: 14px; }
    .yx-field { margin-bottom: 16px; }
    .yx-label {
        font-size: 13.5px;
        font-weight: 600;
        margin-bottom: 7px;
        display: block;
    }
    .yx-input,
    .yx-select,
    .yx-textarea {
        min-height: 46px;                  /* 触摸友好 */
        padding: 0 14px;
        border-radius: var(--yx-radius-sm);
        font-size: 16px;                   /* 抑制 iOS 聚焦缩放 */
    }
    .yx-textarea { padding: 12px 14px; min-height: 96px; line-height: 1.7; }
    /* 主按钮撑满，符合手机端「底部大按钮」习惯 */
    .yx-form-actions .yx-btn,
    .yx-form .yx-btn-block { width: 100%; min-height: 48px; font-size: 15.5px; }
    .yx-form-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
    /* 验证码行：输入框 + 按钮不换行挤压 */
    .yx-code-row { gap: 10px; }
    .yx-code-row .yx-input { flex: 1; min-width: 0; }
    .yx-code-row .yx-btn {
        flex: 0 0 auto;
        min-width: 108px;
        min-height: 46px;
    }
    .yx-checkbox,
    .yx-radio { min-height: var(--yx-m-touch); display: inline-flex; align-items: center; }
    /* 密码强度条在窄屏不挤压 */
    .yx-strength { flex-wrap: wrap; }
    .yx-strength-label { text-align: left; }
}

/*------------------------------------------------------
 * 8. 用户中心 / 后台：侧栏改「顶部折叠」，内容区收边距
 *------------------------------------------------------*/
@media (max-width: 991px) {
    .yx-dash { flex-direction: column; gap: 0; }
    .yx-dash-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 48px;
        padding: 0 16px;
        margin-bottom: 12px;
        background: var(--yx-ink);
        color: #F3EFE4;
        border: none;
        border-radius: var(--yx-m-radius);
        font-size: 14.5px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: none;
    }
    .yx-dash-toggle:active { transform: scale(.99); }
    .yx-dash-toggle .bars { flex-shrink: 0; }
    .yx-dash-toggle .yx-dash-toggle-arrow {
        margin-left: auto;
        transition: transform var(--yx-dur-base) var(--yx-ease);
    }
    .yx-dash-toggle[aria-expanded="true"] .yx-dash-toggle-arrow { transform: rotate(180deg); }

    /* 侧栏展开：卡片式，不再整块深色铺满（省电、更清爽） */
    .yx-sidebar {
        display: none;
        width: 100%;
        position: static;
        border-radius: var(--yx-m-radius);
        margin-bottom: 12px;
        padding: 12px 10px;
    }
    .yx-sidebar.open { display: block; animation: yxDrawerIn .2s var(--yx-ease-out); }
    .yx-sidebar-item {
        min-height: 46px;
        border-radius: var(--yx-radius-sm);
        font-size: 14.5px;
        padding: 0 12px;
    }
    .yx-sidebar-item.active { font-weight: 600; }
    .yx-sidebar-sep { margin: 8px 12px; }

    /* 内容区 */
    .yx-main { padding: 0 var(--yx-m-pad); }
    .yx-panel {
        padding: 16px 14px;
        border-radius: var(--yx-m-radius);
    }
    .yx-page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 14px;
    }
    .yx-page-title { font-size: 19px; line-height: 1.35; }
    .yx-page-sub { font-size: 12.5px; line-height: 1.6; }
    .yx-page-head .yx-btn { width: 100%; min-height: 42px; }

    /* 统计卡：2 列，数字更大更好读 */
    .yx-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 14px;
    }
    .yx-stat {
        padding: 14px 12px;
        border-radius: var(--yx-m-radius);
    }
    .yx-stat-num { font-size: 21px; letter-spacing: -.4px; }
    .yx-stat-label { font-size: 12px; }
    .yx-src-grid { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 400px) {
    .yx-stats { grid-template-columns: 1fr; }
    .yx-main { padding: 0 var(--yx-m-pad-tight); }
    .yx-section { padding-left: var(--yx-m-pad-tight); padding-right: var(--yx-m-pad-tight); }
}

/*------------------------------------------------------
 * 9. 筛选栏：手机端折叠为「输入框 + 单行按钮」
 *------------------------------------------------------*/
@media (max-width: 991px) {
    .yx-filter {
        padding: 12px;
        border-radius: var(--yx-m-radius);
        gap: 10px;
        margin-bottom: 12px;
    }
    .yx-filter .yx-filter-input,
    .yx-filter .yx-filter-date,
    .yx-filter .yx-filter-select {
        width: 100%;
        min-height: 44px;
        font-size: 16px;                    /* 防 iOS 缩放 */
        height: auto;
        padding: 0 12px;
    }
    .yx-filter .yx-btn {
        flex: 1 1 calc(50% - 5px);
        min-height: 44px;
        font-size: 14px;
    }
    .yx-filter-sep { display: none; }       /* 竖分隔条在换行布局下无意义 */
}

/*------------------------------------------------------
 * 10. 表格：手机端卡片化（增强可读性 + 标签对齐）
 *------------------------------------------------------*/
@media (max-width: 991px) {
    .yx-main .yx-table-wrap { overflow-x: visible; }
    .yx-main .yx-table { min-width: 0; }
}
@media (max-width: 767px) {
    /* 未加 .yx-rt 的表格：保留横向滚动但给出可滚动暗示 */
    .yx-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--yx-m-radius);
        box-shadow: inset -16px 0 14px -16px rgba(64, 52, 30, .2);
    }
    /* 卡片化表格：标签与值两行更清晰（避免左右挤在窄屏） */
    .yx-table.yx-rt tr {
        margin: 0 0 10px;
        padding: 2px 0;
        border-radius: var(--yx-m-radius);
    }
    .yx-table.yx-rt td {
        padding: 10px 14px;
        font-size: 13.5px;
        line-height: 1.65;
    }
    .yx-table.yx-rt td::before {
        font-size: 12.5px;
        max-width: 42%;
        flex-shrink: 0;
    }
    /* 首个单元格作为卡片标题：左对齐、加粗、分隔线更明显 */
    .yx-table.yx-rt td:first-child {
        border-bottom: 1px solid var(--yx-line-soft);
        padding-bottom: 11px;
        font-weight: 600;
        color: var(--yx-ink);
        justify-content: flex-start;
    }
    .yx-table.yx-rt td:first-child::before { display: none; }
    /* 操作列：按钮组撑满、不换行挤压 */
    .yx-table.yx-rt td .yx-btn + .yx-btn { margin-left: 6px; }
    .yx-table.yx-rt td[data-label="操作"] {
        justify-content: flex-end;
        padding-top: 12px;
        gap: 8px;
    }
    .yx-table.yx-rt td[data-label="操作"]::before { display: none; }
    .yx-table.yx-rt td[data-label="操作"] .yx-btn { min-height: 38px; min-width: 64px; }

    /* 分页：居中 + 大触控 */
    .yx-table-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 0;
    }
    .pagination { justify-content: center; gap: 4px; }
    .pagination a,
    .pagination span {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
        border-radius: 8px;
    }
}

/*------------------------------------------------------
 * 11. 底部标签栏（移动端主导航，<768px 显示）
 *     常驻底部：首页 / 方案 / 查询 / 我的，拇指热区直达
 *------------------------------------------------------*/
.yx-tabbar { display: none; }

@media (max-width: 767px) {
    .yx-tabbar {
        display: flex;
        align-items: stretch;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        height: calc(var(--yx-tabbar-h) + env(safe-area-inset-bottom, 0px));
        padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
        background: rgba(254, 253, 249, .97);
        backdrop-filter: blur(12px) saturate(140%);
        -webkit-backdrop-filter: blur(12px) saturate(140%);
        border-top: 1px solid var(--yx-line);
        box-shadow: none;
    }
    .yx-tab-item {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        color: var(--yx-ink-3);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .02em;
        text-decoration: none;
        border-radius: var(--yx-radius-sm);
        -webkit-tap-highlight-color: transparent;
    }
    .yx-tab-item svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }
    .yx-tab-item:active { transform: scale(.94); }
    .yx-tab-item.active {
        color: var(--yx-primary);
        font-weight: 600;
    }
    .yx-tab-item.active svg { stroke-width: 2.4; }
    /* 当前项：顶部朱砂短标（版印体系里的"当前页"记号） */
    .yx-tab-item.active::before {
        content: '';
        position: absolute;
        top: -4px; left: 50%;
        transform: translateX(-50%);
        width: 22px; height: 2px;
        background: var(--yx-primary);
    }

    /* 底部有标签栏时，页脚留出空间避免被遮挡 */
    body { padding-bottom: calc(var(--yx-tabbar-h) + env(safe-area-inset-bottom, 0px)); }
    /* 返回顶部按钮上移，避免压在标签栏上 */
    .yx-back-top {
        bottom: calc(var(--yx-tabbar-h) + var(--yx-sp-4, 16px) + env(safe-area-inset-bottom, 0px));
    }
    /* 底部固定操作条与标签栏互斥：有标签栏就不再用 .yx-mobile-bar */
    .yx-mobile-bar { display: none !important; }
}

/* 平板（768-991px）不显示标签栏 */
@media (min-width: 768px) {
    .yx-tabbar { display: none !important; }
}

/*------------------------------------------------------
 * 11b. 底部拇指操作区（可选组件 .yx-mobile-bar）
 *     用于把「主行动」固定在手机屏幕底部
 *------------------------------------------------------*/
.yx-mobile-bar { display: none; }

@media (max-width: 767px) {
    .yx-mobile-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(254, 253, 249, .96);
        backdrop-filter: blur(12px) saturate(140%);
        -webkit-backdrop-filter: blur(12px) saturate(140%);
        border-top: 1px solid var(--yx-line);
        box-shadow: none;
    }
    .yx-mobile-bar .yx-btn {
        flex: 1;
        min-height: 46px;
        justify-content: center;
        font-size: 15px;
    }
    .yx-mobile-bar .yx-btn-outline { flex: 0 0 auto; padding: 0 16px; }
    /* 有底部操作条时，页面留出空间避免遮挡 */
    body.yx-has-mobile-bar { padding-bottom: calc(var(--yx-tabbar-h) + env(safe-area-inset-bottom, 0px)); }
    body.yx-has-mobile-bar .yx-footer { margin-bottom: 0; }
}

/*------------------------------------------------------
 * 12. 弹层 / 提示：手机端居中且不超宽
 *------------------------------------------------------*/
@media (max-width: 767px) {
    .yx-modal,
    .yx-dialog,
    .layui-layer {
        max-width: calc(100vw - 28px) !important;
    }
    .yx-toast-stack {
        left: 14px;
        right: 14px;
        top: calc(var(--yx-nav-h) + 12px);
    }
    .yx-toast {
        width: 100%;
        max-width: none;
        font-size: 13.5px;
        padding: 11px 15px;
    }
    .yx-back-top {
        width: 42px;
        height: 42px;
        right: 14px;
    }
}

/*------------------------------------------------------
 * 13. 页脚：手机端两列折叠 + 紧凑
 *------------------------------------------------------*/
@media (max-width: 767px) {
    .yx-footer { margin-top: 32px; }
    .yx-footer-main {
        grid-template-columns: 1fr 1fr;      /* 产品/支持并排，省一半高度 */
        gap: 20px 16px;
        padding: 26px var(--yx-m-pad) 16px;
    }
    .yx-footer-col:first-child { grid-column: 1 / -1; }  /* 品牌独占一行 */
    .yx-footer-desc { max-width: 100%; font-size: 12.5px; line-height: 1.75; }
    .yx-footer-col h4 { font-size: 13.5px; margin-bottom: 8px; }
    .yx-footer-col a { font-size: 13px; line-height: 2.1; }
    .yx-footer-bottom {
        padding: 12px var(--yx-m-pad) calc(14px + env(safe-area-inset-bottom, 0px));
        font-size: 11.5px;
        text-align: center;
    }
}
@media (max-width: 400px) {
    .yx-footer-main { grid-template-columns: 1fr; gap: 18px; }
}

/*------------------------------------------------------
 * 14. 无障碍与降级
 *------------------------------------------------------*/
/* 横屏手机：压缩纵向留白 */
@media (max-width: 991px) and (orientation: landscape) and (max-height: 520px) {
    .yx-hero-home { padding-top: calc(var(--yx-nav-h) + 20px); padding-bottom: 28px; }
    .yx-section { padding-top: 32px; }
    .yx-hero-title { font-size: 26px; }
}

/* 用户偏好减少动效时，关闭抽屉/卡片的过渡 */
@media (prefers-reduced-motion: reduce) {
    .yx-nav-links.open,
    .yx-sidebar.open { animation: none; }
    .yx-nav-scrim { transition: none; }
}

/* 触摸设备：去掉 hover 抬升，改为按压反馈（已有 .yx-press） */
@media (max-width: 991px) {
    .yx-card-hover:hover,
    .yx-app-card:hover,
    .yx-feature:hover,
    .yx-pkg-card:hover {
        transform: none;
        box-shadow: var(--yx-shadow);
    }
}

/*------------------------------------------------------
 * 15. 「版印」体系的手机端收口
 *     桌面上的倾斜凭证卡、双细线内框、大间距，
 *     在小屏需要各自给出明确答案，而不是自动缩水。
 *------------------------------------------------------*/
@media (max-width: 991px) {
    /* 凭证卡：取消倾斜（窄屏倾斜会出界），改为常规卡片，印章缩小 */
    .yx-cert-card {
        transform: none;
        justify-self: stretch;
        max-width: 100%;
        box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
        padding: 22px 20px 18px;
    }
    .yx-cert-seal { width: 62px; height: 62px; font-size: 13px; right: 14px; bottom: 40px; }

    /* 区块题头：手机端竖排，避免标题与副标题在窄屏挤成一行 */
    .yx-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin: 40px 0 22px;
    }
    .yx-section-head h2 { font-size: 23px; }

    /* 内页 hero：内框随内边距收紧，避免贴边 */
    .yx-hero::before { inset: 5px; }

    /* 方案页 / 订单页在窄屏的呼吸感 */
    .yx-buy-hero { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
    .yx-buy-hero-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
    .yx-buy-logo { flex: 0 0 60px; width: 60px; height: 60px; font-size: 26px; }
    .yx-buy-name { font-size: 20px; }
    .yx-cta-card { padding: 36px 22px; }
    .yx-order-total { padding: 13px 16px; }
    .yx-order-total .val { font-size: 22px; }
    .yx-auth-card { padding: 30px 22px 24px; border-top-width: 3px; }
}

