/* 3D 遗漏查询 — 与 base.css / site.css 红金渐变风格统一 */

.omission-page .top {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md, 12px) var(--space-xl, 20px);
    box-sizing: border-box;
}

.omission-page .container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-lg, 0 4px 20px rgba(0, 0, 0, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #333;
    overflow: visible;
}

.omission-page .page-header {
    margin: var(--space-md, 12px);
    padding: var(--space-lg, 16px);
    text-align: center;
    background: linear-gradient(135deg, rgba(139, 26, 26, 0.06), rgba(245, 166, 35, 0.1));
    border: 1px solid rgba(139, 26, 26, 0.12);
    border-radius: var(--radius-lg, 12px);
    color: #1a0a0a;
}

.omission-page .page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    font-weight: 700;
    color: #8b1a1a;
    text-shadow: none;
}

.omission-page .page-meta {
    color: #666;
    font-size: 0.88rem;
    line-height: 1.5;
}

.omission-page .page-meta strong {
    color: #b45309;
    font-weight: 600;
}

.omission-page .page-status {
    margin-top: 6px;
    font-size: 0.82rem;
    color: #888;
}

.omission-page .category-tabs {
    display: flex;
    gap: 6px;
    padding: 0 var(--space-md, 12px) var(--space-sm, 8px);
    justify-content: center;
    flex-wrap: wrap;
}

.omission-page .tab {
    flex: 1 1 auto;
    min-width: 72px;
    max-width: 140px;
    min-height: 40px;
    padding: 8px 10px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast, 0.2s ease);
    color: #666;
    background: #f5f5f5;
    border-radius: var(--radius-md, 8px);
    border: 1px solid #e0e0e0;
    font-family: inherit;
}

.omission-page .tab.active {
    background: linear-gradient(135deg, #8b1a1a 0%, #c0392b 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(139, 26, 26, 0.35);
}

.omission-page .tab:hover:not(.active) {
    background: #eee;
    color: #333;
    border-color: #ccc;
}

.omission-page .tab .tab-count {
    display: block;
    font-size: 0.68rem;
    opacity: 0.85;
    margin-top: 2px;
}

.omission-page .omission-toolbar {
    margin: 0 var(--space-md, 12px) var(--space-sm, 8px);
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: var(--radius-lg, 12px);
}

.omission-page .toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.omission-page .search-wrap {
    display: flex;
    align-items: center;
    flex: 1 1 180px;
    min-width: 0;
    max-width: 100%;
    gap: 4px;
}

.omission-page .search-box {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-md, 8px);
    font-size: 0.9rem;
    background: #fff;
    color: #333;
    outline: none;
}

.omission-page .search-box::placeholder {
    color: #aaa;
}

.omission-page .search-box:focus {
    border-color: #c0392b;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

.omission-page .search-clear {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: var(--radius-md, 8px);
    background: #fff;
    color: #888;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.omission-page .search-clear:hover {
    color: #c0392b;
    border-color: #c0392b;
}

.omission-page .toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}

.omission-page .btn-ghost,
.omission-page .btn-primary {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: var(--radius-md, 8px);
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    white-space: nowrap;
    transition: all var(--transition-fast, 0.15s ease);
}

.omission-page .btn-ghost {
    background: #fff;
    color: #555;
    border: 1px solid #ccc;
}

.omission-page .btn-ghost:hover {
    background: #f5f5f5;
    border-color: #8b1a1a;
    color: #8b1a1a;
}

.omission-page .btn-primary {
    background: linear-gradient(135deg, #8b1a1a, #c0392b);
    color: #fff;
    border: 1px solid transparent;
}

.omission-page .btn-primary:hover {
    filter: brightness(1.06);
}

.omission-page .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    justify-content: center;
}

.omission-page .filter-chip {
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-family: inherit;
    transition: all var(--transition-fast, 0.15s ease);
}

.omission-page .filter-chip:hover {
    color: #8b1a1a;
    border-color: #c0392b;
}

.omission-page .filter-chip.active {
    background: rgba(139, 26, 26, 0.1);
    color: #8b1a1a;
    border-color: #c0392b;
    font-weight: 600;
}

.omission-page .watch-panel {
    margin: 0 var(--space-md, 12px) var(--space-sm, 8px);
    padding: 10px 12px;
    background: #fffbeb;
    border: 1px solid rgba(245, 166, 35, 0.35);
    border-radius: var(--radius-lg, 12px);
}

.omission-page .watch-panel.collapsed .watch-list,
.omission-page .watch-panel.collapsed .watch-hint,
.omission-page .watch-panel.collapsed .watch-empty {
    display: none;
}

.omission-page .watch-panel.collapsed .watch-chevron {
    transform: rotate(-90deg);
}

.omission-page .watch-panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.omission-page .watch-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: none;
    color: #8b1a1a;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.omission-page .watch-count {
    min-width: 20px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(139, 26, 26, 0.12);
    color: #8b1a1a;
    font-size: 0.75rem;
    font-weight: 600;
}

.omission-page .watch-chevron {
    color: #999;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.omission-page .watch-hint {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: #888;
    line-height: 1.4;
}

.omission-page .watch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.omission-page .watch-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: var(--radius-md, 8px);
    background: #fff;
    border: 1px solid #e8dcc8;
    font-size: 0.78rem;
}

.omission-page .watch-item.is-current-tab {
    border-color: #c0392b;
    box-shadow: 0 0 0 1px rgba(192, 57, 43, 0.2);
}

.omission-page .watch-item-num {
    font-weight: 700;
    color: #333;
    font-variant-numeric: tabular-nums;
}

.omission-page .watch-item-tab {
    color: #888;
    font-size: 0.7rem;
}

.omission-page .watch-item-miss {
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.omission-page .watch-item-remove {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    font-family: inherit;
}

.omission-page .watch-item-remove:hover {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.08);
}

.omission-page .watch-empty {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: #999;
    text-align: center;
}

.omission-page .miss-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0 var(--space-md, 12px) var(--space-sm, 8px);
    font-size: 0.72rem;
    color: #888;
}

.omission-page .content {
    display: none;
    padding: 0 4px 12px;
}

.omission-page .content.active {
    display: block;
}

.omission-page .table-container {
    background: #fff;
    overflow-x: auto;
    border-radius: var(--radius-lg, 12px);
    margin: var(--space-sm, 8px) var(--space-md, 12px);
    border: 1px solid #e8e8e8;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.06));
    -webkit-overflow-scrolling: touch;
}

.omission-page table {
    width: 100%;
    border-collapse: collapse;
    min-width: 320px;
}

.omission-page th {
    background: #f3f4f6;
    color: #8b1a1a !important;
    padding: 10px 6px;
    font-size: 0.8rem;
    text-align: center;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    border-bottom: 2px solid #c0392b;
    white-space: nowrap;
}

.omission-page th.col-watch {
    cursor: default;
    width: 44px;
    min-width: 44px;
}

.omission-page th:hover:not(.col-watch) {
    background: #e8eaed;
    color: #6b1515 !important;
}

.omission-page th.sort-asc::after { content: ' ▲'; font-size: 0.65em; }
.omission-page th.sort-desc::after { content: ' ▼'; font-size: 0.65em; }

.omission-page td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.88rem;
    color: #444;
}

.omission-page tr:nth-child(even) { background: #fafafa; }
.omission-page tr:hover { background: #fff8f0; }

.omission-page tr.row-watching { background: rgba(245, 166, 35, 0.08) !important; }

.omission-page .watch-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #bbb;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    font-family: inherit;
    transition: all var(--transition-fast, 0.15s ease);
}

.omission-page .watch-btn:hover {
    border-color: var(--color-accent, #f5a623);
    color: var(--color-accent, #f5a623);
}

.omission-page .watch-btn.active {
    background: rgba(245, 166, 35, 0.15);
    border-color: var(--color-accent, #f5a623);
    color: #d97706;
}

.omission-page .number-cell { font-weight: bold; color: #333; }
.omission-page .leopard-number { color: #c0392b; }
.omission-page .group3-number { color: #16a34a; }
.omission-page .group6-number { color: #2563eb; }

.omission-page .miss-high { color: #dc2626; font-weight: 600; }
.omission-page .miss-medium { color: #d97706; font-weight: 600; }
.omission-page .miss-low { color: #16a34a; }

.omission-page tr.current-draw {
    background: rgba(245, 166, 35, 0.15) !important;
    box-shadow: inset 3px 0 0 var(--color-accent, #f5a623);
}

.omission-page .draw-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 0 4px;
    font-size: 0.65rem;
    border-radius: 4px;
    background: rgba(245, 166, 35, 0.25);
    color: #b45309;
    vertical-align: middle;
}

.omission-page .stat-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: var(--space-sm, 8px) var(--space-md, 12px);
    padding: 12px;
    background: #f8f9fa;
    border-radius: var(--radius-lg, 12px);
    border: 1px solid #eee;
}

.omission-page .stat-card {
    background: #fff;
    padding: 12px 10px;
    border-radius: var(--radius-md, 8px);
    text-align: center;
    border: 1px solid #eee;
    box-shadow: var(--shadow-sm, 0 1px 4px rgba(0, 0, 0, 0.04));
}

.omission-page .stat-card h3 {
    color: #888;
    margin-bottom: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.omission-page .stat-card .value {
    font-size: 1.45rem;
    font-weight: bold;
    color: #8b1a1a;
}

.omission-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 10px var(--space-md, 12px);
}

.omission-page .pagination button {
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.82rem;
    min-width: 32px;
    font-family: inherit;
}

.omission-page .pagination button:hover:not(:disabled) {
    border-color: #8b1a1a;
    color: #8b1a1a;
}

.omission-page .pagination button.active {
    background: linear-gradient(135deg, #8b1a1a, #c0392b);
    color: #fff;
    border-color: transparent;
}

.omission-page .pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.omission-page .page-ellipsis {
    color: #999;
    padding: 0 2px;
}

.omission-page .error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 14px;
    margin: var(--space-sm, 8px) var(--space-md, 12px);
    border-radius: var(--radius-md, 8px);
    text-align: center;
    border: 1px solid #fecaca;
}

.omission-page .toast-msg {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-80px);
    background: rgba(26, 10, 10, 0.92);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid rgba(245, 166, 35, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: all 0.25s ease;
    font-size: 0.88rem;
    pointer-events: none;
}

.omission-page .toast-msg.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.omission-page .back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #8b1a1a, #c0392b);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 999;
    box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.25));
}

.omission-page .back-to-top.show { display: flex; }

@media (max-width: 768px) {
    /* 整页由 document 滚动，避免 flex 子项“悬空”且恢复 iOS 回弹 */
    html:has(body.omission-page) {
        width: 100%;
        overflow-x: hidden;
    }

    body.omission-page {
        display: block !important;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: visible;
        overscroll-behavior-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #fff !important;
        background-attachment: scroll !important;
        min-height: 100vh;
        min-height: 100dvh;
    }

    body.omission-page .site-header {
        width: 100%;
        margin-bottom: 0;
    }

    body.omission-page .site-footer {
        width: 100%;
        max-width: 100%;
        margin-top: 0;
    }

    .omission-page .top {
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
        background: #fff;
    }

    .omission-page .container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 8px 8px 16px;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: #fff;
        overflow: visible;
        flex: none;
    }

    .omission-page .page-header {
        margin: 0 0 8px;
        padding: 12px 10px;
        border-radius: 8px;
    }

    .omission-page .page-header h1 { font-size: 1.35rem; }

    .omission-page .category-tabs {
        padding: 0 0 6px;
        gap: 4px;
    }

    .omission-page .tab {
        min-height: 44px;
        font-size: 0.82rem;
        min-width: 0;
        max-width: none;
    }

    .omission-page .omission-toolbar {
        margin: 0 0 8px;
        padding: 8px;
        border-radius: 8px;
    }

    .omission-page .toolbar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        justify-content: flex-start;
    }

    .omission-page .search-wrap {
        flex: 0 0 auto;
        width: 100%;
    }

    .omission-page .toolbar-actions {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .omission-page .toolbar-actions .btn-ghost,
    .omission-page .toolbar-actions .btn-primary {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 6px 8px;
    }

    .omission-page .filter-chips {
        margin-top: 6px;
        gap: 4px;
        justify-content: flex-start;
    }

    .omission-page .watch-panel { margin: 0 0 8px; padding: 8px; }
    .omission-page .miss-legend { margin: 0 0 6px; gap: 8px; }
    .omission-page .content { padding: 0 0 8px; }

    .omission-page .stat-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 8px;
        margin: 0 0 6px;
    }

    .omission-page .stat-card .value { font-size: 1.15rem; }

    .omission-page .table-container {
        margin: 0 0 8px;
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
        border: 1px solid #e8e8e8;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .omission-page .pagination { margin: 6px 0; }
    .omission-page .error-message { margin: 0 0 6px; }

    .omission-page th, .omission-page td { padding: 6px 4px; font-size: 0.78rem; }
}

@media (max-width: 480px) {
    .omission-page .container { padding: 6px 6px 12px; }

    .omission-page .filter-chip {
        padding: 4px 10px;
        font-size: 0.72rem;
    }
}
