/* 手机端 H5 自适应 */

.mobile-bottom-nav,
.m-topbar,
.m-topbar-back,
.m-avatar-menu,
.m-avatar-backdrop,
.m-tab-mine,
.m-tab-records,
.m-tab-record-detail,
.m-picker-top,
.m-picker-backdrop,
.m-picker-filters {
    display: none;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    /* 修复 wc-theme .wc-page > * { position:relative } 破坏浮层/弹窗 */
    body.wc-page > .m-picker-backdrop,
    body.wc-page > .m-avatar-backdrop {
        position: fixed !important;
    }

    body.wc-page > .history-modal,
    body.wc-page > .desktop-only-modal {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        position: fixed !important;
        inset: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 手机 Tab 默认全部隐藏，只通过 body 单一视图类放开 */
    body.wc-page > .m-tab-records,
    body.wc-page > .m-tab-record-detail,
    body.wc-page > .m-tab-mine {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    body.view-tab-home.wc-page > .main-layout {
        display: block !important;
    }

    body.view-tab-records.wc-page > .m-tab-records,
    body.view-tab-record-detail.wc-page > .m-tab-record-detail,
    body.view-tab-mine.wc-page > .m-tab-mine {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        pointer-events: auto !important;
        padding: 12px 14px 80px !important;
        max-width: 640px;
        margin: 0 auto;
    }

    body.view-tab-records.wc-page > .main-layout,
    body.view-tab-record-detail.wc-page > .main-layout,
    body.view-tab-mine.wc-page > .main-layout,
    body.view-tab-records.wc-page > .sticky-controls,
    body.view-tab-record-detail.wc-page > .sticky-controls,
    body.view-tab-mine.wc-page > .sticky-controls {
        display: none !important;
    }

    body:not(.view-tab-home) #matchPanel,
    body:not(.view-tab-home).m-picker-open #matchPanel,
    body:not(.view-tab-home).m-picker-open .main-layout {
        display: none !important;
        position: static !important;
        max-height: none !important;
        box-shadow: none !important;
    }

    body:not(.view-tab-home) .m-picker-backdrop,
    body:not(.view-tab-home).m-picker-open .m-picker-backdrop {
        display: none !important;
    }

    /* 隐藏桌面顶栏，使用手机顶栏 */
    .header {
        display: none !important;
    }

    .m-topbar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 10px 14px;
        background: #fff;
        border-bottom: 1px solid #e7e5e5;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .m-topbar-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: none;
        background: #f5f6fa;
        color: #385EE2;
        font-size: 18px;
        font-weight: 700;
        border-radius: 8px;
        cursor: pointer;
        flex-shrink: 0;
        line-height: 1;
        padding: 0;
    }

    .m-topbar-back.hidden {
        display: none !important;
    }

    .m-topbar.has-back .m-topbar-brand {
        flex: 1;
        min-width: 0;
    }

    .m-topbar-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .m-topbar-logo {
        width: 28px;
        height: 38px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .m-topbar-title {
        font-size: 16px;
        font-weight: 700;
        color: #333;
        white-space: nowrap;
    }

    .m-topbar-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
        position: relative;
    }

    .m-avatar-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 2px solid #385EE2;
        background: linear-gradient(135deg, #385EE2, #5b7cf0);
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        position: relative;
        z-index: 162;
        -webkit-tap-highlight-color: transparent;
    }

    .m-avatar-menu {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 161;
        min-width: 108px;
        padding: 6px;
        background: #fff;
        border: 1px solid #e7e5e5;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    .m-avatar-menu.open {
        display: flex !important;
    }

    .m-avatar-backdrop {
        position: fixed !important;
        inset: 0;
        z-index: 150;
        background: transparent;
    }

    body.m-avatar-open .m-avatar-backdrop {
        display: block !important;
    }

    .m-float-btn {
        border: none;
        background: #f7f8fa;
        color: #333;
        font-size: 13px;
        padding: 10px 12px;
        border-radius: 8px;
        cursor: pointer;
        white-space: nowrap;
        text-align: left;
        width: 100%;
    }

    .m-float-btn:active {
        background: #eef0f5;
    }

    .m-float-logout {
        color: #e53935;
        background: rgba(229, 57, 53, 0.06);
    }

    /* 赛程选择弹窗遮罩（层级须低于 main-layout / matchPanel） */
    .m-picker-backdrop {
        position: fixed;
        inset: 0;
        z-index: 280;
        background: rgba(0, 0, 0, 0.45);
        touch-action: none;
    }

    body.view-tab-home.m-picker-open .m-picker-backdrop:not(.hidden) {
        display: block !important;
        z-index: 280 !important;
    }

    body.view-tab-home.m-picker-open {
        overflow: hidden;
    }

    body.view-tab-home.m-picker-open .footer {
        display: none !important;
    }

    /* 手机端隐藏顶部控制栏，赛程弹窗使用面板内筛选 */
    .sticky-controls {
        display: none !important;
    }

    body.view-tab-home.m-picker-open .sticky-controls {
        display: none !important;
    }

    .m-picker-filters {
        display: none;
        padding: 0 0 10px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 8px;
        flex-shrink: 0;
    }

    body.view-tab-home.m-picker-open .m-picker-filters {
        display: block !important;
    }

    .m-picker-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 8px;
    }

    .m-pick-tab {
        flex: 1;
        padding: 8px 10px;
        border: 1px solid #e7e5e5;
        border-radius: 8px;
        background: #fff;
        color: #666;
        font-size: 13px;
        cursor: pointer;
    }

    .m-pick-tab.active {
        background: #385EE2;
        color: #fff;
        border-color: #385EE2;
        font-weight: 600;
    }

    .m-picker-search {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #e7e5e5;
        border-radius: 8px;
        font-size: 14px;
        box-sizing: border-box;
    }

    body.view-tab-home.m-picker-open .main-layout {
        display: block !important;
        padding: 0 !important;
        position: relative !important;
        z-index: 310 !important;
        pointer-events: none !important;
        overflow: visible !important;
        transform: none !important;
    }

    body.view-tab-home.m-picker-open .predict-panel {
        display: none !important;
        pointer-events: none !important;
    }

    body.view-tab-home.m-picker-open #matchPanel {
        display: flex !important;
        flex-direction: column;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: 52px !important;
        height: auto !important;
        max-height: none !important;
        z-index: 320 !important;
        overflow: hidden;
        background: #fff !important;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18) !important;
        padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        margin: 0 !important;
        pointer-events: auto !important;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    body.view-tab-home.m-picker-open #matchPanel .match-list {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        pointer-events: auto !important;
    }

    body.view-tab-home.m-picker-open #matchPanel .match-card {
        pointer-events: auto !important;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(56, 94, 226, 0.12);
    }

    body.view-tab-home.m-picker-open .selected-match-bar,
    body.view-tab-home.m-picker-open .match-panel .panel-header {
        display: none !important;
    }

    body.view-tab-home.m-picker-open .mobile-bottom-nav {
        display: none !important;
    }

    body.view-tab-home.m-picker-open .m-tab-mine {
        display: none !important;
    }

    body.view-tab-home.m-picker-open .m-topbar {
        z-index: 330 !important;
        position: sticky !important;
    }

    .control-inner {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 8px 12px !important;
        gap: 8px !important;
    }

    .control-tabs {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 4px 0 !important;
        gap: 6px !important;
    }

    .control-tabs .tab {
        padding: 7px 14px !important;
        font-size: 13px !important;
        flex-shrink: 0;
    }

    .control-actions {
        width: 100% !important;
        padding: 0 !important;
    }

    .search-input {
        flex: 1 !important;
        width: auto !important;
    }

    .group-select {
        min-width: 100px !important;
    }

    .main-layout {
        padding: 12px !important;
        padding-bottom: 72px !important;
        display: block !important;
    }

    body.view-tab-mine .main-layout {
        display: none !important;
    }

    body.view-tab-records .main-layout,
    body.view-tab-record-detail .main-layout {
        display: none !important;
    }

    body.view-tab-home .match-panel {
        display: none !important;
    }

    body.view-tab-home .predict-panel {
        display: block !important;
        position: static !important;
    }

    .predict-panel {
        top: auto !important;
    }

    .m-picker-top {
        display: none;
        align-items: center;
        justify-content: space-between;
        padding: 12px 0 8px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 8px;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 2;
    }

    body.view-tab-home.m-picker-open .m-picker-top {
        display: flex !important;
        flex-shrink: 0;
    }

    .m-picker-close {
        border: none;
        background: #f5f6fa;
        color: #666;
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 13px;
        cursor: pointer;
    }

    .m-picker-title {
        font-size: 16px;
        font-weight: 600;
        color: #333;
    }

    .m-picker-spacer {
        width: 52px;
    }

    .predict-content {
        min-height: 280px !important;
        padding: 16px !important;
    }

    .panel-header h2 {
        font-size: 16px !important;
    }

    .selected-match-bar {
        margin-bottom: 10px !important;
    }

    .match-card {
        padding: 14px !important;
    }

    .team-zh {
        font-size: 15px !important;
    }

    .footer {
        padding-bottom: 64px !important;
        font-size: 11px !important;
    }

    body.view-tab-mine .footer {
        display: none;
    }

    body.view-tab-records .footer,
    body.view-tab-record-detail .footer {
        display: none;
    }

    /* 我的页面 */
    .mine-profile-card {
        background: linear-gradient(135deg, #385EE2 0%, #5b7cf0 100%);
        border-radius: 16px;
        padding: 24px 20px;
        text-align: center;
        color: #fff;
        margin-bottom: 16px;
        box-shadow: 0 4px 16px rgba(56, 94, 226, 0.25);
    }

    .mine-avatar {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.25);
        border: 3px solid rgba(255, 255, 255, 0.6);
        margin: 0 auto 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        font-weight: 700;
    }

    .mine-user-name {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 6px;
    }

    .mine-member-info {
        font-size: 13px;
        opacity: 0.9;
        line-height: 1.5;
    }

    .mine-balance-line {
        margin-top: 12px;
        font-size: 15px;
        font-weight: 600;
        background: rgba(255, 255, 255, 0.15);
        display: inline-block;
        padding: 6px 16px;
        border-radius: 20px;
    }

    .mine-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mine-action-btn {
        display: block;
        width: 100%;
        padding: 14px 16px;
        border: 1px solid #e7e5e5;
        border-radius: 12px;
        background: #fff;
        font-size: 15px;
        color: #333;
        cursor: pointer;
        text-align: left;
    }

    .mine-action-btn:active {
        background: #f7f8fa;
    }

    .mine-action-btn.danger {
        color: #e53935;
        border-color: rgba(229, 57, 53, 0.3);
    }

    /* 底部导航 */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        background: #fff;
        border-top: 1px solid #e7e5e5;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
        padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
    }

    .mobile-nav-btn {
        flex: 1;
        border: none;
        background: none;
        padding: 6px 4px;
        font-size: 13px;
        color: #888;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .mobile-nav-btn.active {
        color: #385EE2;
        font-weight: 600;
    }

    .mobile-nav-btn .nav-label {
        font-size: 13px;
    }

    .mobile-nav-btn-center {
        position: relative;
        margin-top: -18px;
        padding-top: 0;
    }

    .mobile-nav-btn-center .nav-icon-football {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, #385EE2, #5b7ef5);
        color: #fff;
        box-shadow: 0 4px 14px rgba(56, 94, 226, 0.35);
        margin-bottom: 2px;
    }

    .mobile-nav-btn-center.active .nav-icon-football {
        background: linear-gradient(135deg, #2d4fc7, #385EE2);
    }

    .mobile-nav-btn-center .nav-label {
        font-size: 12px;
    }

    /* 预测记录页（兼容旧规则，已由上方 body.wc-page > 选择器接管） */
    .m-tab-records,
    .m-tab-record-detail,
    .m-tab-mine {
        display: none !important;
    }

    body.view-tab-home .m-tab-records,
    body.view-tab-home .m-tab-record-detail,
    body.view-tab-home .m-tab-mine {
        display: none !important;
    }

    body.view-tab-records .main-layout,
    body.view-tab-records .m-tab-mine,
    body.view-tab-records .m-tab-record-detail {
        display: none !important;
    }

    body.view-tab-record-detail .main-layout,
    body.view-tab-record-detail .m-tab-mine,
    body.view-tab-record-detail .m-tab-records {
        display: none !important;
    }

    body.view-tab-mine .main-layout,
    body.view-tab-mine .m-tab-records,
    body.view-tab-mine .m-tab-record-detail {
        display: none !important;
    }

    .records-page-header,
    .record-detail-header {
        margin-bottom: 14px;
    }

    .records-page-header h2,
    .record-detail-header h2 {
        margin: 0 0 4px;
        font-size: 18px;
        color: #333;
    }

    .records-page-desc,
    .record-detail-meta {
        margin: 0;
        font-size: 13px;
        color: #888;
        line-height: 1.5;
    }

    .records-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .record-card {
        background: #fff;
        border: 1px solid #e7e5e5;
        border-radius: 12px;
        padding: 14px;
    }

    .record-card-top {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 8px;
    }

    .record-card-match {
        font-size: 15px;
        font-weight: 600;
        color: #333;
        line-height: 1.4;
    }

    .record-mode-badge {
        flex-shrink: 0;
        font-size: 11px;
        padding: 3px 8px;
        border-radius: 6px;
        font-weight: 600;
        white-space: nowrap;
    }

    .record-mode-badge.mode-ai { background: rgba(56, 94, 226, 0.1); color: #385EE2; }
    .record-mode-badge.mode-math { background: rgba(13, 122, 74, 0.1); color: #0d7a4a; }
    .record-mode-badge.mode-realtime { background: rgba(229, 57, 53, 0.1); color: #e53935; }
    .record-mode-badge.mode-accurate { background: rgba(245, 166, 35, 0.15); color: #c47d00; }

    .record-card-result {
        font-size: 14px;
        color: #555;
        margin-bottom: 6px;
    }

    .record-card-meta {
        font-size: 12px;
        color: #999;
        margin-bottom: 10px;
    }

    .btn-record-detail {
        width: 100%;
        padding: 10px;
        border: 1px solid rgba(56, 94, 226, 0.3);
        background: rgba(56, 94, 226, 0.06);
        color: #385EE2;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .records-pager {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        margin-top: 16px;
        padding-bottom: 8px;
    }

    .records-pager button {
        padding: 8px 16px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        font-size: 13px;
        cursor: pointer;
    }

    .records-pager button:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .records-pager span {
        font-size: 13px;
        color: #666;
    }

    .record-detail-body {
        display: block !important;
        background: #fff;
        border: 1px solid #e7e5e5;
        border-radius: 12px;
        padding: 12px;
    }

    /* 余额不足提示 */
    .billing-error-state {
        text-align: center;
        padding: 24px 12px;
    }

    .billing-error-msg {
        font-size: 15px;
        color: #666;
        line-height: 1.6;
        margin: 0 0 20px;
    }

    .billing-error-actions {
        display: flex;
        gap: 10px;
    }

    .btn-billing-home,
    .btn-billing-recharge {
        flex: 1;
        padding: 12px 10px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        border: none;
    }

    .btn-billing-home {
        background: #f5f6fa;
        color: #666;
        border: 1px solid #e7e5e5;
    }

    .btn-billing-recharge {
        background: #385EE2;
        color: #fff;
    }

    /* 分析页模式选择 */
    .predict-home {
        text-align: center;
        padding: 8px 0;
    }

    .mode-picker {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }

    .mode-btn {
        width: 100%;
        padding: 14px 16px;
        border: 1px solid #e7e5e5;
        border-radius: 12px;
        background: #fff;
        color: #333;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        text-align: left;
    }

    .mode-btn.primary {
        background: #385EE2;
        color: #fff;
        border-color: #385EE2;
    }

    .mode-btn small {
        display: block;
        font-size: 12px;
        font-weight: normal;
        color: #888;
        margin-top: 4px;
    }

    .mode-btn.primary small {
        color: rgba(255, 255, 255, 0.85);
    }

    .predict-match-summary {
        background: #f7f8fa;
        border: 1px solid #e7e5e5;
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 12px;
        font-size: 13px;
        color: #666;
        text-align: left;
    }

    .predict-match-summary.has-match {
        border-color: #385EE2;
        background: rgba(56, 94, 226, 0.05);
    }

    .predict-match-summary strong {
        color: #333;
        display: block;
        margin-bottom: 4px;
    }

    .btn-change-match {
        margin-top: 8px;
        padding: 8px 14px;
        background: #fff;
        border: 1px solid #385EE2;
        color: #385EE2;
        border-radius: 8px;
        font-size: 13px;
        cursor: pointer;
        width: 100%;
    }

    /* 实时预测控件（分析页内，仅手机） */
    .mobile-rt-panel {
        margin: 0 0 12px;
        padding: 12px;
        background: #f7f8fa;
        border: 1px solid #e7e5e5;
        border-radius: 10px;
        text-align: left;
        display: none;
    }

    body.view-tab-home .mobile-rt-panel.show {
        display: block;
    }

    .mobile-rt-feed {
        margin: 0 0 12px;
        padding: 10px 12px;
        background: #fff;
        border: 1px solid #e7e5e5;
        border-radius: 10px;
        display: none;
    }

    body.view-tab-home .mobile-rt-feed.show {
        display: block;
    }

    .mobile-feed-header {
        font-size: 13px;
        font-weight: 600;
        color: #385EE2;
        margin-bottom: 8px;
    }

    .mobile-feed-list {
        max-height: 160px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-feed-list .feed-item {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 8px;
        padding: 6px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 12px;
        color: #666;
    }

    .mobile-feed-list .feed-item:last-child {
        border-bottom: none;
    }

    .mobile-feed-list .feed-time {
        color: #999;
        flex-shrink: 0;
    }

    .mobile-feed-list .feed-match {
        color: #385EE2;
        font-weight: 500;
    }

    .mobile-feed-list .feed-item.changed {
        background: rgba(56, 94, 226, 0.06);
        margin: 0 -8px;
        padding: 6px 8px;
        border-radius: 6px;
    }

    .predict-result-actions {
        display: flex;
        gap: 10px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid #e7e5e5;
    }

    .btn-predict-back,
    .btn-change-match-inline {
        flex: 1;
        padding: 10px 12px;
        border-radius: 8px;
        font-size: 13px;
        cursor: pointer;
    }

    .btn-predict-back {
        background: #385EE2;
        color: #fff;
        border: none;
    }

    .btn-change-match-inline {
        background: #fff;
        color: #385EE2;
        border: 1px solid #385EE2;
    }

    body.view-tab-home.m-picker-open .match-panel .panel-header {
        display: none !important;
    }

    body.view-tab-home.m-picker-open .selected-match-bar {
        display: none !important;
    }

    .mobile-rt-row {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 8px;
    }

    .mobile-rt-row:last-child {
        margin-bottom: 0;
    }

    .mobile-pick-hint {
        background: rgba(56, 94, 226, 0.08);
        border: 1px solid rgba(56, 94, 226, 0.2);
        color: #385EE2;
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 13px;
        margin-bottom: 12px;
        display: none;
    }

    body.view-tab-home.m-picker-open .mobile-pick-hint.show {
        display: block;
    }

    .btn-back-analysis {
        display: none;
    }

    body.view-tab-home.m-picker-open .panel-header .btn-back-analysis.show {
        display: none !important;
    }

    .desktop-only-bars {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .m-picker-filters,
    .m-picker-top,
    .m-picker-backdrop,
    .mobile-pick-hint,
    .btn-back-analysis,
    .mobile-rt-panel,
    .mobile-rt-feed,
    .predict-result-actions {
        display: none !important;
    }

    .mode-picker {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* 平板 */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr !important;
    }

    .math-formulas {
        display: none !important;
    }

    .realtime-controls .rt-hint {
        display: none;
    }

    /* 非首页：禁止赛程弹窗与桌面记录弹窗干扰 */
    body.view-tab-records .m-picker-backdrop,
    body.view-tab-mine .m-picker-backdrop,
    body.view-tab-record-detail .m-picker-backdrop {
        display: none !important;
    }

    body.view-tab-records #matchPanel,
    body.view-tab-mine #matchPanel,
    body.view-tab-record-detail #matchPanel {
        display: none !important;
        position: static !important;
        max-height: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    body.view-tab-records.m-picker-open .main-layout,
    body.view-tab-mine.m-picker-open .main-layout,
    body.view-tab-record-detail.m-picker-open .main-layout {
        display: none !important;
    }

    body.view-tab-mine.wc-page > .m-tab-mine {
        padding: 16px 12px 80px !important;
    }

    .history-modal,
    .desktop-only-modal {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}
