/**
 * 首页移动端适配（index.html）
 * 小屏：压缩上方模块高度，尽量露出「历史开奖」完整板块
 */
@media (max-width: 768px) {
    html {
        overflow-x: hidden;
        max-width: 100%;
    }

    body {
        overflow-x: hidden;
        max-width: 100vw;
        padding-top: 92px !important;
    }

    .container,
    .container-fluid,
    .dash-wrap {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .dash-wrap {
        padding-bottom: 16px !important;
    }

    /* 顶栏：与 index-polish 导航胶囊风格一致 */
    .site-header {
        padding: 8px 10px 6px !important;
    }

    .header-row1 {
        margin-bottom: 6px !important;
        gap: 6px !important;
    }

    .site-title {
        font-size: 13px !important;
        max-width: 48vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-logo {
        font-size: 17px;
        flex-shrink: 0;
    }

    #userArea .login-btn {
        padding: 5px 12px !important;
        font-size: 11px !important;
    }

    #userArea .user-info {
        font-size: 11px;
    }

    #userArea .user-avatar {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .top-nav-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 5px !important;
        padding: 3px !important;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .top-nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tab {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        padding: 7px 10px !important;
        font-size: 11px !important;
        white-space: nowrap;
    }

    .nav-tab.nav-vip .vip-crown {
        margin-right: 1px;
        font-size: 8px !important;
    }

    /* 公告栏压缩 */
    .notice-bar {
        padding: 6px 8px !important;
        gap: 6px;
    }

    .notice-icon {
        font-size: 14px;
    }

    .notice-text {
        font-size: 10px !important;
    }

    .notice-more {
        font-size: 10px;
        flex-shrink: 0;
    }

    /* 广告区间距 */
    .dash-ad-container,
    .dash-ad-container.ad-container {
        margin-bottom: 6px !important;
    }

    /* ===== 开奖区压缩见 hall-draw-panel.css ===== */

    /* ===== 预览 / 导航：由 index-ui-refresh.css 统一适配，此处仅保留间距 ===== */
    .dash-preview-scroll {
        margin-bottom: 6px !important;
    }

    .dash-preview {
        margin-bottom: 0 !important;
    }

    .dash-nav {
        margin-bottom: 6px !important;
    }

    /* ===== 历史开奖板块 ===== */
    .dash-card {
        margin-bottom: 8px !important;
        border-radius: 10px;
    }

    .dash-panel {
        padding: 8px 6px !important;
    }

    .dash-panel-title {
        font-size: 13px !important;
        margin-bottom: 6px !important;
        padding-left: 8px;
    }

    .dash-table {
        font-size: 12px;
    }

    .dash-table th,
    .dash-table td {
        padding: 8px 4px;
    }

    .dash-pager {
        margin-top: 8px;
        gap: 4px;
    }

    .dash-pager button {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
    }

    /* 其他面板同步压缩 */
    .dash-tip {
        padding: 6px 8px;
        font-size: 11px;
        margin-bottom: 8px;
    }

    .dash-num-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
    }

    .dash-num-btn {
        height: 30px;
        font-size: 11px;
    }

    .dash-num-toolbar {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .dash-num-controls {
        width: 100%;
        justify-content: space-between;
    }

    .dash-num-limit-input {
        flex: 1;
        min-width: 0;
        width: auto;
        height: 30px;
    }

    .dash-num-analyze-btn {
        height: 30px;
        padding: 0 12px;
        font-size: 12px;
    }

    /* 号码分析结果区：紧凑布局，禁止单列堆叠撑大框架 */
    #dashPanel-num {
        padding: 10px 8px 12px;
    }

    .dash-num-summary {
        padding: 8px 10px;
        font-size: 11px;
        line-height: 1.5;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    .dash-num-card {
        padding: 6px;
        margin-bottom: 6px;
        border-radius: 8px;
    }

    .dash-num-section-title {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .dash-num-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3px;
    }

    .dash-num-metric {
        padding: 5px 3px;
        border-radius: 6px;
    }

    .dash-num-metric-label {
        font-size: 9px;
        margin-bottom: 1px;
    }

    .dash-num-metric-val {
        font-size: 11px;
    }

    .dash-num-metric-sub {
        font-size: 8px;
    }

    .dash-num-submetrics {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 3px;
        margin-top: 4px;
    }

    .dash-num-submetric {
        padding: 5px 3px;
        font-size: 9px;
        border-radius: 5px;
    }

    .dash-num-submetric b {
        font-size: 10px;
    }

    .dash-num-submetric em {
        font-size: 8px;
    }

    .dash-num-trend-big {
        gap: 4px;
        margin-bottom: 4px;
    }

    .dash-num-trend-card {
        padding: 6px 4px;
        border-radius: 6px;
    }

    .dash-num-trend-card .lbl {
        font-size: 10px;
    }

    .dash-num-trend-card .pct {
        font-size: 14px;
    }

    .dash-num-trend-card .cnt {
        font-size: 8px;
    }

    .dash-num-combo-row {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 3px;
    }

    .dash-num-combo {
        padding: 5px 2px;
        font-size: 9px;
    }

    .dash-num-combo strong {
        font-size: 11px;
    }

    .dash-num-abc-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 3px;
    }

    .dash-num-abc-col {
        padding: 5px 3px;
    }

    .dash-num-abc-title {
        font-size: 9px;
        margin-bottom: 3px;
    }

    .dash-num-abc-row {
        margin-bottom: 1px;
        gap: 2px;
    }

    .dash-num-abc-stat {
        font-size: 7px;
    }

    .dash-num-recovery-grid {
        gap: 3px;
    }

    .dash-num-recovery-item {
        padding: 5px 3px;
    }

    .dash-num-recovery-item .lbl {
        font-size: 9px;
    }

    .dash-num-recovery-item .pct {
        font-size: 11px;
    }

    .dash-num-dev-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 3px;
    }

    .dash-num-dev {
        padding: 4px 2px;
    }

    .dash-num-dev-num {
        font-size: 11px;
    }

    .dash-num-dev-val {
        font-size: 9px;
    }

    .dash-num-dev-sub {
        font-size: 8px;
    }

    .dash-num-corr-tag {
        padding: 2px 5px;
        font-size: 9px;
    }

    .dash-quick-links {
        margin-top: 8px;
        gap: 6px;
    }

    .dash-quick-links a {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* 客服按钮在开奖区旁，见 customer-service.css */
}

@media (max-width: 480px) {
    body {
        padding-top: 88px !important;
        font-size: 13px;
    }

    .site-domains {
        display: none !important;
    }

    .nav-tab {
        padding: 7px 10px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 380px) {
    body {
        padding-top: 94px !important;
    }

    .site-title {
        max-width: 40vw;
        font-size: 12px !important;
    }

    .nav-tab {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }
}