/* Shared responsive layer. All rules are deliberately isolated from the desktop baseline. */
@media (max-width: 1279px) {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    img,
    svg,
    video,
    canvas {
        max-width: 100%;
        height: auto;
    }

    :focus-visible {
        outline: 3px solid #ffd34f;
        outline-offset: 3px;
    }

    .site-header .site-navigation-panel {
        display: block;
    }

    /* The intermediate range remains a compact desktop header, not a drawer. */
    .bmi-inner-page .site-header {
        min-width: 0;
    }

    .bmi-inner-page .site-footer {
        min-width: 0;
    }
}

@media (min-width: 1025px) and (max-width: 1279px) {
    .site-header .topbar,
    .site-header .header-main {
        padding-inline: 40px;
    }

    .site-header .header-logo {
        left: 40px;
    }

    .site-header .nav-list {
        gap: 20px;
    }

    .site-header .nav-list a {
        font-size: 16px;
    }

    .bmi-inner-page .site-header .header-main {
        padding-inline: 40px;
    }

    .bmi-inner-page .site-header .header-logo {
        left: 40px;
    }
}

@media (max-width: 1024px) {
    html.site-nav-locked,
    body.site-nav-locked {
        overflow: hidden;
        overscroll-behavior: none;
    }

    body[class] .site-header,
    .site-header,
    .bmi-inner-page .site-header {
        position: relative;
        top: auto;
        left: auto;
        z-index: 1000;
        width: 100%;
        height: auto;
        min-width: 0;
        min-height: 68px;
        background: #01477f url("../img/v2/%E5%9B%BE%E5%B1%82%209@2x.png") center top / auto 800px;
    }

    .site-header .header-logo,
    .bmi-inner-page .site-header .header-logo {
        top: 0;
        left: 16px;
        left: max(16px, env(safe-area-inset-left));
        z-index: 1005;
        width: 128px;
        height: 68px;
        border-radius: 0 0 8px 8px;
    }

    .site-header .header-logo::after {
        top: 16px;
        left: 18px;
        width: 92px;
        height: 40px;
        background-size: 92px 40px;
    }

    body.bmi-fixed-artboard-page .site-header .nav-toggle,
    body[class] .site-header .nav-toggle,
    .site-header .nav-toggle {
        position: absolute;
        top: 14px;
        right: 16px;
        right: max(16px, env(safe-area-inset-right));
        z-index: 1005;
        display: flex;
        width: 44px;
        height: 44px;
        margin: 0;
    }

    /* 抽屉关闭按钮已在面板内渲染，隐藏外层汉堡按钮以避免两个图标重叠。 */
    body.bmi-fixed-artboard-page .site-header.nav-open .nav-toggle,
    body[class] .site-header.nav-open .nav-toggle,
    .site-header.nav-open .nav-toggle {
        display: none;
    }

    .site-header .site-navigation-panel {
        position: fixed;
        top: 0;
        right: 0;
        right: env(safe-area-inset-right);
        bottom: 0;
        z-index: 1004;
        display: flex;
        flex-direction: column;
        width: min(92vw, 420px);
        min-height: 100dvh;
        overflow: auto;
        overscroll-behavior: contain;
        background: #01477f;
        box-shadow: -16px 0 36px rgba(0, 0, 0, 0.28);
        opacity: 0;
        pointer-events: none;
        transform: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        visibility: hidden;
    }

    [dir="rtl"] .site-header .site-navigation-panel {
        right: auto;
        left: env(safe-area-inset-left);
        box-shadow: 16px 0 36px rgba(0, 0, 0, 0.28);
        transform: none;
    }

    .site-header.nav-open .site-navigation-panel {
        display: flex;
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .site-header .site-nav-scrim {
        position: fixed;
        inset: 0;
        z-index: 1003;
        display: block;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        background: rgba(0, 0, 0, 0.56);
        cursor: default;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        visibility: hidden;
    }

    .site-header.nav-open .site-nav-scrim {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .site-header .header-main,
    .bmi-inner-page .site-header .header-main {
        order: 1;
        display: block;
        height: auto;
        min-height: 0;
        padding: 0 20px 18px;
        background: transparent;
    }

    body:not(.bmi-fixed-artboard-page) .site-header .header-main {
        height: auto;
        min-height: 0;
        padding: 0 20px 18px;
    }

    /* Inner pages may use a white desktop header; keep the opened drawer blue. */
    body[class] .site-header .site-navigation-panel .header-main {
        background: transparent;
    }

    body[class] .site-header .site-navigation-panel .header-nav {
        background: transparent;
    }

    .site-header .site-nav-close {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: 10px -2px 12px auto;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .site-header .site-nav-close span {
        position: absolute;
        width: 24px;
        height: 2px;
        background: #ffffff;
    }

    .site-header .site-nav-close span:first-child {
        transform: rotate(45deg);
    }

    .site-header .site-nav-close span:last-child {
        transform: rotate(-45deg);
    }

    .site-header .header-nav,
    .bmi-inner-page .site-header .header-nav,
    .site-header.nav-open .header-nav {
        position: static;
        display: block;
        width: auto;
        margin: 0;
        padding: 0;
        background: transparent;
        transform: none;
    }

    body:not(.bmi-fixed-artboard-page) .site-header .header-nav {
        position: static;
        display: block;
        width: auto;
        margin: 0;
        padding: 0;
        background: transparent;
        transform: none;
    }

    .site-header .nav-list {
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .site-header .nav-list > li {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .site-header .nav-list > li > a {
        display: flex;
        align-items: center;
        min-width: 0;
        min-height: 48px;
        padding: 12px 0;
        color: #ffffff;
        font-size: 16px;
        line-height: 22px;
    }

    .site-header .site-nav-submenu-toggle {
        position: relative;
        display: none;
        grid-column: 2;
        grid-row: 1;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .site-header .nav-item > .site-nav-submenu-toggle {
        display: block;
    }

    /* 移动端 Products 直接跳转产品页，不在侧边栏提供展开入口。 */
    .site-header .nav-item-products > .site-nav-submenu-toggle {
        display: none;
    }

    .site-header .site-nav-submenu-toggle::before,
    .site-header .site-nav-submenu-toggle::after {
        position: absolute;
        width: 14px;
        height: 2px;
        background: #ffffff;
        content: "";
        transition: transform 0.2s ease;
    }

    .site-header .site-nav-submenu-toggle::after {
        transform: rotate(90deg);
    }

    .site-header .nav-item.is-submenu-open > .site-nav-submenu-toggle::after {
        transform: rotate(0);
    }

    .site-header .nav-item-about::after,
    .site-header .nav-item-products::after {
        display: none;
    }

    .site-header .nav-item > .about-menu,
    .site-header .nav-item > .products-menu {
        grid-column: 1 / -1;
        grid-row: 2;
        display: none;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0 0 10px 16px;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        visibility: visible;
    }

    .site-header .nav-item.is-submenu-open > .about-menu,
    .site-header .nav-item.is-submenu-open > .products-menu {
        display: block;
    }

    .site-header .about-menu-item,
    .site-header .products-menu-item {
        width: 100%;
        height: auto;
    }

    .site-header .about-menu-link,
    .site-header .products-menu-primary-link,
    .site-header .products-menu-secondary a,
    .site-header .products-menu-discover a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 44px;
        height: auto;
        padding: 9px 0;
        border: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.86) !important;
        font-size: 15px;
        line-height: 22px;
    }

    .site-header .products-menu-inner,
    .site-header .products-menu-primary,
    .site-header .products-menu-content,
    .site-header .products-menu-discover,
    .site-header .products-menu-secondary {
        position: static;
        display: block;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .site-header .products-menu-item::after,
    .site-header .products-menu-primary-icon,
    .site-header .products-menu-indicator,
    .site-header .products-menu-previews,
    .site-header .about-menu-indicator,
    .site-header .products-menu-discover strong {
        display: none;
    }

    .site-header .products-menu-secondary {
        padding-inline-start: 16px;
    }

    .site-header .topbar,
    .bmi-inner-page .site-header .topbar {
        order: 2;
        display: block;
        width: auto;
        height: auto;
        margin-top: auto;
        padding: 16px 20px calc(26px + env(safe-area-inset-bottom));
        background: #222222;
    }

    body:not(.bmi-fixed-artboard-page) .site-header .topbar {
        display: block;
        width: auto;
        height: auto;
        margin-top: auto;
        padding: 16px 20px calc(26px + env(safe-area-inset-bottom));
        background: #222222;
    }

    .site-header .topbar-list,
    .bmi-inner-page .site-header .topbar-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }

    .site-header .topbar-list > li,
    .site-header .topbar-list > li:not([data-site-auth]) {
        display: block;
        width: 100%;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    }

    /* 覆盖桌面端为紧凑页头隐藏非认证项目的规则，移动抽屉需展示完整顶栏操作。 */
    body:not(.bmi-fixed-artboard-page) .site-header .topbar-list > li:not([data-site-auth]) {
        display: block;
    }

    .site-header .topbar-list > li:last-child {
        border-bottom: 0;
    }

    .site-header .topbar-list a,
    .site-header .site-auth-placeholder,
    .site-header .site-auth-email,
    .site-header .site-auth-login,
    .site-header .site-auth-logout,
    .site-header .site-auth-retry {
        min-height: 44px;
        color: #e7edf2;
        font-size: 15px;
    }

    .site-header [data-site-auth] {
        justify-content: flex-start;
        width: 100%;
        min-height: 44px;
    }

    .site-header .site-auth-email {
        max-width: calc(92vw - 88px);
    }

    .site-header .site-auth-logout,
    .site-header .site-auth-retry {
        display: inline-flex;
        align-items: center;
        margin: 0;
        line-height: 18px;
    }

    /* 桌面端 30px 顶栏行高在抽屉中保留，内容上移以避开分隔线。 */
    .site-header .topbar-list > li > a,
    .site-header .site-auth-placeholder,
    .site-header .site-auth-logout,
    .site-header .site-auth-retry,
    .site-header .lang-switcher__toggle {
        position: relative;
        top: -4px;
    }

    /* Login 作为基准，以下三项再上移以获得同等的分隔线留白。 */
    .site-header .topbar-list > li:not([data-site-auth]) > a,
    .site-header .topbar-list > li:not([data-site-auth]) .lang-switcher__toggle {
        top: -8px;
    }

    .site-header .topbar-search {
        position: relative;
        top: -6px;
        width: 100%;
        height: 44px;
        margin-top: 12px;
        border-radius: 4px;
    }

    .site-header .topbar-search button {
        width: 44px;
        height: 44px;
    }

    .site-header .lang-switcher,
    .site-header .lang-switcher__details {
        width: 100%;
    }

    .site-header .lang-switcher__toggle {
        min-height: 44px;
        color: #e7edf2;
    }

    .site-header .lang-switcher__menu {
        position: static;
        width: 100%;
        margin: 0 0 8px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .site-header .lang-switcher__link {
        min-height: 40px;
        padding-inline: 16px;
    }

    /* Locations/Contact 的桌面页头使用更高优先级和 !important 的纹理样式；抽屉内恢复共享移动端布局。 */
    body:is(.bmi-locations-page, .bmi-contact-page) .site-header .site-navigation-panel .header-main {
        background: transparent !important;
    }

    body:is(.bmi-locations-page, .bmi-contact-page) .site-header .site-navigation-panel .nav-list > li > a {
        color: #ffffff;
        font-size: 16px;
        line-height: 22px;
    }

    body:is(.bmi-locations-page, .bmi-contact-page) .site-header .site-navigation-panel .topbar {
        position: static;
    }

    body:is(.bmi-locations-page, .bmi-contact-page) .site-header .site-navigation-panel .topbar-list {
        gap: 0;
        width: 100%;
        height: auto;
    }

    body:is(.bmi-locations-page, .bmi-contact-page) .site-header .site-navigation-panel .topbar-list a {
        color: #e7edf2;
        font-size: 15px;
    }

    body:is(.bmi-locations-page, .bmi-contact-page) .site-header .site-navigation-panel .topbar-icon {
        width: 16px;
        max-height: 16px;
    }

    body:is(.bmi-locations-page, .bmi-contact-page) .site-header .site-navigation-panel .topbar-search {
        width: 100%;
        height: 44px;
    }

    body:is(.bmi-locations-page, .bmi-contact-page) .site-header .site-navigation-panel .topbar-search button {
        width: 44px;
        height: 44px;
    }

    .bmi-locations-page .site-header,
    .bmi-contact-page .site-header {
        background: #ffffff;
    }

    .bmi-locations-page .site-header .nav-toggle span,
    .bmi-contact-page .site-header .nav-toggle span {
        background: #ffffff;
    }

    [dir="rtl"] .site-header .header-logo,
    [dir="rtl"] .bmi-inner-page .site-header .header-logo {
        right: 16px;
        right: max(16px, env(safe-area-inset-right));
        left: auto;
    }

    [dir="rtl"] .site-header .nav-toggle {
        right: max(16px, env(safe-area-inset-right));
        left: auto;
    }
}

/* Shared page footer and protected member/transaction layouts. */
@media (max-width: 1279px) {
    .site-footer {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0;
        padding: 40px 20px calc(36px + env(safe-area-inset-bottom));
        gap: 16px;
        font-size: 15px;
        line-height: 1.5;
    }

    .site-footer .footer-social,
    .site-footer .footer-line,
    .site-footer .footer-privacy,
    .site-footer .footer-badge {
        position: static !important;
        width: auto !important;
        height: auto !important;
        min-height: 0;
        margin: 0;
        transform: none !important;
        white-space: normal;
    }

    .site-footer .footer-social {
        justify-content: center;
        overflow: visible;
    }

    .site-footer .footer-badge {
        width: 106px !important;
        height: 50px !important;
        flex: 0 0 50px;
    }

    .bmi-account-page .fit-shell,
    .bmi-profile-page .fit-shell,
    .bmi-myorder-page .fit-shell,
    .bmi-cart-page .fit-shell,
    .bmi-order-detail-page .fit-shell {
        display: block;
        overflow: visible;
    }

    .bmi-account-page .fit-box,
    .bmi-profile-page .fit-box,
    .bmi-myorder-page .fit-box,
    .bmi-cart-page .fit-box,
    .bmi-order-detail-page .fit-box {
        position: relative;
        width: 100% !important;
        height: auto !important;
        overflow: visible;
    }

    .bmi-account-page .artboard,
    .bmi-profile-page .artboard,
    .bmi-myorder-page .artboard,
    .bmi-cart-page .artboard,
    .bmi-order-detail-page .artboard {
        --site-footer-position: relative;
        --site-footer-top: auto;
        width: 100%;
        height: auto;
        overflow: visible;
        transform: none !important;
    }

    .bmi-account-page .site-header,
    .bmi-profile-page .site-header,
    .bmi-myorder-page .site-header,
    .bmi-cart-page .site-header,
    .bmi-order-detail-page .site-header {
        position: relative;
        min-width: 0;
    }

    .account-hero,
    .profile-hero,
    .myorder-hero,
    .cart-hero,
    .od-hero {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: 220px;
        overflow: hidden;
    }

    .account-hero img,
    .profile-hero img,
    .myorder-hero img,
    .cart-hero img,
    .od-hero img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        object-fit: cover;
    }

    .account-hero h1,
    .profile-hero h1,
    .myorder-hero h1,
    .cart-hero h1,
    .od-hero h1 {
        top: 50%;
        left: 20px;
        width: calc(100% - 40px);
        height: auto;
        font-size: 38px;
        line-height: 1.15;
        transform: translateY(-50%);
    }

    .account-breadcrumb,
    .profile-breadcrumb,
    .myorder-breadcrumb,
    .cart-breadcrumb,
    .od-breadcrumb {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        padding: 20px 20px 0;
        font-size: 15px;
        line-height: 22px;
        white-space: normal;
    }

    .account-content-bg,
    .profile-content-bg,
    .myorder-content-bg,
    .cart-content-bg,
    .od-content-bg {
        display: none;
    }

    .account-sidebar,
    .pf-sidebar,
    .mo-sidebar,
    .od-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: auto;
        height: auto;
        margin: 20px;
        overflow: hidden;
        border: 1px solid #e0e7ee;
        border-radius: 4px;
        background: #ffffff;
    }

    .account-side-item,
    .pf-side-item,
    .mo-side-item,
    .od-side-item {
        position: relative;
        top: auto;
        left: auto;
        display: flex;
        align-items: center;
        width: auto;
        min-width: 0;
        height: 52px;
        padding: 8px 10px;
        border: 0;
        border-radius: 0;
        font-size: 14px;
        line-height: 18px;
    }

    /* account.css 以 nth-of-type 设置桌面坐标，需以同等具体度在移动网格中清除。 */
    .bmi-account-page .account-sidebar .account-side-item:nth-of-type(2),
    .bmi-account-page .account-sidebar .account-side-item:nth-of-type(3),
    .bmi-account-page .account-sidebar .account-side-item:nth-of-type(4) {
        top: auto;
    }

    .account-side-icon,
    .pf-side-icon,
    .mo-side-icon,
    .od-side-icon,
    .account-side-item-active .account-side-icon {
        position: static;
        width: 24px;
        height: 28px;
        margin-inline: 0 10px;
        object-fit: contain;
    }

    .account-side-item span,
    .pf-side-item span,
    .mo-side-item span,
    .od-side-item span,
    .account-side-item-active span {
        position: static;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .account-info-card,
    .account-orders-card,
    .pf-card,
    .mo-card,
    .ct-card,
    .od-card {
        position: static;
        width: auto;
        height: auto;
        min-height: 0;
        margin: 20px;
        padding: 20px;
        border: 1px solid #e0e7ee;
        border-radius: 4px;
        background: #ffffff;
    }

    .account-info-title,
    .account-orders-title,
    .pf-card-title,
    .mo-card-title,
    .ct-title,
    .od-card-title {
        position: static;
        width: auto;
        height: auto;
        margin: 0 0 20px;
        font-size: 24px;
        line-height: 1.25;
    }

    .account-avatar {
        position: static;
        display: flex;
        align-items: flex-end;
        width: 84px;
        height: 84px;
        margin: 0 20px 20px 0;
        float: left;
    }

    .account-avatar img {
        position: static;
        width: 84px;
        height: 84px;
    }

    .account-avatar-edit,
    .account-avatar-edit img {
        position: static;
        width: 28px;
        height: 28px;
        margin: 0 0 0 -22px;
    }

    .account-info-grid,
    .account-info-row,
    .account-email-with-level {
        position: static;
        width: auto;
        height: auto;
    }

    .account-info-grid {
        display: grid;
        gap: 14px;
        padding-top: 4px;
    }

    .account-info-row,
    .account-info-row-1,
    .account-info-row-2,
    .account-info-row-3 {
        display: grid;
        grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
        gap: 6px 12px;
        min-height: 0;
        margin: 0;
        font-size: 15px;
        line-height: 22px;
    }

    .account-info-row-2 .account-info-label-phone {
        grid-column: 1;
    }

    .account-info-row-2 .account-info-value-phone {
        grid-column: 2;
    }

    .account-info-label,
    .account-info-value,
    .account-email-with-level,
    .account-vip,
    .account-vip-level,
    .account-vip-level-text {
        position: static;
        width: auto;
        height: auto;
    }

    .account-email-with-level {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .account-vip {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
    }

    .account-vip-level {
        width: 72px;
        height: 24px;
    }

    .account-vip-level-text {
        display: none;
    }

    .account-orders-table,
    .account-history-rows,
    .mo-table,
    .mo-rows {
        position: static;
        display: grid;
        width: auto;
        height: auto !important;
    }

    .account-orders-head,
    .mo-table-head {
        display: none;
    }

    .account-history-row,
    .mo-row {
        position: static !important;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: auto;
        height: auto !important;
        margin: 0;
        padding: 16px 0;
        gap: 10px 16px;
        border-top: 1px solid #e5e8eb !important;
    }

    .account-history-row .account-orders-cell,
    .mo-row .mo-cell {
        position: static;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: auto !important;
        min-width: 0;
        height: auto;
        margin: 0;
        overflow: visible;
        color: #282828;
        font-size: 14px;
        line-height: 20px;
        text-align: start;
        text-overflow: clip;
        white-space: normal;
    }

    .account-history-row .account-orders-cell::before,
    .mo-row .mo-cell::before,
    .ct-row [data-mobile-label]::before,
    .od-block-row [data-mobile-label]::before {
        color: #69727c;
        font-size: 12px;
        font-weight: 700;
        line-height: 18px;
        content: attr(data-mobile-label);
    }

    .account-history-row .account-orders-cell-op,
    .mo-row .mo-cell-op {
        display: flex;
        align-items: end;
        grid-column: 1 / -1;
    }

    .bmi-account-page .account-history-row .account-orders-cell-op {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 6px;
    }

    .bmi-myorder-page .mo-row .mo-cell-op {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 6px;
    }

    .account-history-check,
    .mo-btn-check {
        position: static !important;
        width: auto;
        min-width: 96px;
        height: 40px;
        margin: 0;
        padding: 0 16px;
    }

    .account-history-pagination,
    .mo-pagination {
        position: static;
        display: flex;
        justify-content: center;
        width: auto;
        height: auto;
        margin: 20px 0 0;
        gap: 8px;
        text-align: center;
    }

    .account-history-pagination button,
    .mo-page-circle,
    .mo-page-prev,
    .mo-page-active,
    .mo-pagination .mo-page-circle:nth-of-type(3),
    .mo-pagination .mo-page-circle:nth-of-type(4),
    .mo-page-next {
        position: static;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        margin: 0;
        line-height: 38px;
    }

    .mo-page-prev img,
    .mo-page-next img {
        position: static;
        width: 20px;
        height: 18px;
        margin-top: 10px;
    }

    .pf-form {
        position: static;
        display: grid;
        grid-template-columns: minmax(105px, 0.7fr) minmax(0, 1.8fr);
        width: auto;
        height: auto;
        gap: 12px 16px;
        margin: 0;
        padding: 0;
    }

    .pf-form input[type="hidden"],
    .pf-field-bg {
        display: none;
    }

    .pf-label,
    .pf-input,
    .pf-submit,
    .pf-form-message {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
    }

    .pf-label {
        align-self: center;
        font-size: 14px;
        line-height: 20px;
        white-space: normal;
    }

    .pf-input {
        min-width: 0;
        min-height: 44px;
        padding: 10px 12px;
        border: 1px solid #ccd6df;
        border-radius: 4px;
        background: #ffffff;
        font-size: 16px;
        line-height: 22px;
    }

    .pf-submit {
        grid-column: 2;
        min-height: 44px;
        padding: 10px 20px;
        border: 0;
        border-radius: 4px;
        background: #175da9;
        color: #ffffff;
        font-size: 16px;
    }

    .pf-submit-bg {
        display: none;
    }

    /* 桌面端文案覆盖在位图按钮上；移动端隐藏位图后需回到按钮文档流。 */
    .pf-submit-text {
        position: static;
        display: block;
        width: auto;
        height: auto;
        color: inherit;
        font-size: inherit;
        line-height: 22px;
        text-align: center;
    }

    .pf-form-message {
        grid-column: 1 / -1;
    }

    .ct-card {
        margin-bottom: 100px;
        background: #ffffff;
    }

    .ct-thead {
        display: none;
    }

    [data-cart-items] {
        position: static;
        display: grid;
        width: auto;
        height: auto;
    }

    [data-cart-items] .ct-row {
        position: static !important;
        display: grid;
        grid-template-columns: 36px 76px minmax(0, 1fr);
        grid-template-areas:
            "check thumb name"
            "check thumb spec"
            "qty qty price"
            "date date date"
            "op op op";
        width: auto;
        height: auto;
        min-height: 0;
        padding: 16px 0;
        gap: 10px 12px;
        border-top: 1px solid #e5e8eb;
    }

    .ct-row-check,
    .ct-thumb,
    .ct-name,
    .ct-val,
    .ct-date,
    .ct-op,
    .ct-date-line,
    .ct-op-btn {
        position: static !important;
        width: auto;
        height: auto;
        min-width: 0;
        margin: 0;
        text-align: start;
        white-space: normal;
    }

    .ct-row-check {
        grid-area: check;
        align-self: center;
        width: 24px;
        height: 24px;
        background-size: 24px 24px;
    }

    .ct-thumb {
        grid-area: thumb;
        width: 76px;
        height: 76px;
        background-size: 76px 76px;
    }

    .ct-name { grid-area: name; font-size: 16px; font-weight: 700; line-height: 22px; }
    .ct-val-spec { grid-area: spec; }
    .ct-qty-stepper { grid-area: qty; display: flex; flex-wrap: wrap; align-content: start; gap: 4px 0; }
    .ct-val-price { grid-area: price; }
    .ct-date { grid-area: date; display: grid !important; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 2px 8px; }
    .ct-op { grid-area: op; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

    .ct-name,
    .ct-val-spec,
    .ct-val-price {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: 4px;
    }

    .ct-qty-stepper::before,
    .ct-date::before,
    .ct-op::before {
        grid-column: 1 / -1;
    }

    .ct-qty-stepper::before {
        flex-basis: 100%;
    }

    .ct-date-line { display: block; }

    .ct-qty-stepper .ct-qty-dec,
    .ct-qty-stepper .ct-qty-inc,
    .ct-qty-stepper .ct-qty-input,
    .ct-op-btn {
        min-height: 40px;
    }

    .ct-op-btn {
        width: auto;
        min-width: 74px;
        padding: 0 12px;
        border: 1px solid #175da9;
        border-radius: 4px;
        background: #ffffff;
        color: #175da9;
        font-size: 14px;
    }

    .cart-mobile-summary {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 900;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 68px;
        padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        border-top: 1px solid #dce4ea;
        background: #ffffff;
        box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.1);
    }

    .cart-mobile-summary-text {
        min-width: 0;
        color: #4c5965;
        font-size: 14px;
        line-height: 20px;
    }

    .cart-mobile-summary .ct-submit {
        position: static;
        flex: 0 0 auto;
        width: auto;
        min-width: 132px;
        height: 46px;
        padding: 0 16px;
        background: #175da9;
        font-size: 15px;
        line-height: 46px;
    }

    /* 成功提交态保留原图 657x460 弹窗的完整比例，仅缩放外层。 */
    .bmi-cart-page .cart-submit-modal {
        position: fixed;
        inset: 0;
        z-index: 1200;
        width: 100vw;
        height: 100vh;
    }

    .bmi-cart-page .cart-submit-modal-backdrop {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
    }

    .bmi-cart-page .cart-submit-modal-panel {
        top: calc(50% - 230px);
        left: calc(50% - 328.5px);
        transform: scale(var(--cart-submit-modal-scale, 1));
        transform-origin: center center;
    }

    .od-orderer-box,
    .od-orderer-title,
    .od-orderer-row,
    .od-orderer-label,
    .od-orderer-value,
    [data-order-detail-blocks],
    .od-product-block,
    .od-block-row,
    .od-block-head,
    .od-row-thumb,
    .od-block-row .od-cell,
    .od-back-btn,
    .od-total-label,
    .od-total-value {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
    }

    .od-orderer-box {
        display: grid;
        gap: 12px;
        padding: 16px;
        background: #f7fafe;
    }

    .od-orderer-title {
        font-size: 18px;
        line-height: 24px;
    }

    .od-orderer-row {
        display: grid;
        grid-template-columns: minmax(88px, max-content) minmax(0, 1fr);
        gap: 12px;
        font-size: 14px;
        line-height: 20px;
    }

    [data-order-detail-blocks] {
        display: grid;
        gap: 14px;
        margin-top: 20px;
    }

    .od-product-block {
        display: grid;
        padding: 14px;
        border: 1px solid #e0e7ee;
        border-radius: 4px;
    }

    .od-block-head {
        display: none;
    }

    .od-block-row {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 10px 14px;
    }

    .od-row-thumb {
        grid-row: span 2;
        width: 76px;
        height: 76px;
    }

    .od-row-thumb img {
        width: 76px;
        height: 76px;
    }

    .od-block-row .od-cell {
        display: grid;
        gap: 2px;
        min-width: 0;
        font-size: 14px;
        line-height: 20px;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .od-block-row .od-cell-info {
        max-width: none;
    }

    .od-block-row .od-cell-qty,
    .od-block-row .od-cell-price {
        display: inline-grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .od-back-btn {
        width: auto;
        min-width: 88px;
        min-height: 40px;
        margin-top: 20px;
        padding: 0 16px;
    }

    .od-mobile-summary {
        position: sticky;
        bottom: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        margin: 20px -20px -20px;
        padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
        border-top: 1px solid #dce4ea;
        background: #ffffff;
        box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.08);
    }

    .od-total-label {
        color: #595959;
        font-size: 15px;
        line-height: 22px;
    }

    .od-total-value {
        color: #175da9;
        font-size: 22px;
        font-weight: 700;
        line-height: 28px;
    }
}

@media (max-width: 520px) {
    .account-sidebar,
    .pf-sidebar,
    .mo-sidebar,
    .od-sidebar,
    .account-info-card,
    .account-orders-card,
    .pf-card,
    .mo-card,
    .ct-card,
    .od-card {
        margin: 16px;
        padding: 16px;
    }

    .account-sidebar,
    .pf-sidebar,
    .mo-sidebar,
    .od-sidebar {
        margin-bottom: 16px;
    }

    .pf-form {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pf-submit {
        grid-column: 1;
    }

    .pf-input {
        margin-bottom: 10px;
    }

    .account-history-row,
    .mo-row {
        grid-template-columns: 1fr;
    }

    .bmi-account-page .account-history-row,
    .bmi-myorder-page .mo-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bmi-account-page .account-history-row .account-orders-cell-product,
    .bmi-account-page .account-history-row .account-orders-cell-date,
    .bmi-account-page .account-history-row .account-orders-cell-op,
    .bmi-myorder-page .mo-row .mo-cell-orderno,
    .bmi-myorder-page .mo-row .mo-cell-op {
        grid-column: 1 / -1;
    }

    .bmi-account-page .account-info-row-1 {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 360px) {
    .bmi-profile-page .pf-sidebar {
        grid-template-columns: 1fr;
    }

    .bmi-account-page .account-avatar {
        float: none;
        margin: 0 0 20px;
    }

    .bmi-account-page .account-info-grid {
        clear: both;
    }
}
