.page-hero { padding: 20px 0; background: linear-gradient(to bottom, var(--bg-subtle), var(--bg)); border-bottom: 1px solid var(--line); }
.page-title { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.brif-sidebar-list { max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.bs-item { padding: 12px; border-radius: 8px; background: var(--bg-subtle); border: 1px solid var(--line-subtle); cursor: pointer; transition: all 0.2s; display: flex; justify-content: space-between; align-items: center; }
.bs-item:hover { border-color: var(--ac); }
.bs-item.active { background: rgba(59, 130, 246, 0.1); border-color: #3b82f6; }
.s-tour a {
  color: var(--tx-muted) !important;
  text-decoration: none !important;
}
.mistake-card { background: var(--bg-subtle); padding: 12px; border-radius: 8px; border-left: 3px solid #ef4444; margin-bottom: 12px; }

.my-choice { background: rgba(59, 130, 246, 0.12) !important; border: 1px solid rgba(59, 130, 246, 0.2) !important; }

.fact-hit { box-shadow: inset 0 0 0 1px #10b981 !important; border-color: transparent !important; }
.fact-miss { box-shadow: inset 0 0 0 1px #ef4444 !important; border-color: transparent !important; }

.fact-hit > div:first-child { color: #10b981 !important; }
.fact-miss > div:first-child { color: #ef4444 !important; }

@media (max-width: 768px) {
    .tbl-outer.tbl-scroll-x { overflow: visible !important; border: none !important; background: transparent !important; }
    #matchesTable, #matchesTable tbody { display: block !important; width: 100% !important; min-width: 0 !important; }
    #matchesTable thead { display: none !important; }

    #matchesTable tr { display: flex !important; flex-wrap: wrap !important; align-items: center !important; background: var(--surf) !important; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; box-shadow: var(--sh-card) !important; margin-bottom: 16px !important; padding: 14px !important; }
    #matchesTable td { display: block !important; padding: 0 !important; border: none !important; text-align: left !important; }
    #matchesTable td::before, #matchesTable td::after { content: none !important; display: none !important; }

    #matchesTable tr { position: relative !important; }

    #matchesTable td:nth-child(1) {
        order: 1 !important;
        display: block !important;
        flex: 0 0 auto !important;
        width: auto !important;
        margin: 0 !important;
        text-align: left !important;
        padding-right: 60px !important;
        box-sizing: border-box !important;
    }

    #matchesTable td:nth-child(2) {
        order: 2 !important;
        display: block !important;
        position: absolute !important;
        top: 14px !important;
        right: 14px !important;
        width: auto !important;
        flex: none !important;
        margin: 0 !important;
        text-align: right !important;
        font-size: 11px !important;
        color: var(--tx-dim) !important;
        white-space: nowrap !important;
    }

    #matchesTable td:nth-child(3) { order: 3 !important; width: 100% !important; flex-basis: 100% !important; font-size: 12px !important; margin-bottom: 8px !important; }
    
    #matchesTable td:nth-child(4) { order: 4 !important; width: 100% !important; flex-basis: 100% !important; font-size: 15px !important; font-weight: 700 !important; line-height: 1.4 !important; margin-bottom: 4px !important; text-align: center !important; }
    
    #matchesTable td:nth-child(5) { order: 5 !important; width: 100% !important; flex-basis: 100% !important; text-align: center !important; margin-bottom: 4px !important; }

    #matchesTable td:nth-child(6),
    #matchesTable td:nth-child(7),
    #matchesTable td:nth-child(8) { flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; margin-top: 16px !important; padding: 10px 2px !important; border: 1px solid var(--line-subtle) !important; border-radius: 8px !important; background: var(--bg-subtle) !important; position: relative; box-sizing: border-box !important; }

    #matchesTable td:nth-child(6) { order: 6 !important; margin-right: 6px !important; }
    #matchesTable td:nth-child(7) { order: 7 !important; margin-right: 6px !important; }
    #matchesTable td:nth-child(8) { order: 8 !important; margin-right: 0 !important; }

    #matchesTable td:nth-child(6)::before,
    #matchesTable td:nth-child(7)::before,
    #matchesTable td:nth-child(8)::before { display: block !important; font-size: 10px !important; color: var(--tx-muted) !important; margin-bottom: 4px !important; }

    #matchesTable td:nth-child(6)::before { content: "П1" !important; }
    #matchesTable td:nth-child(7)::before { content: "X" !important; }
    #matchesTable td:nth-child(8)::before { content: "П2" !important; }

    #matchesTable td:nth-child(n+6) > div:first-child { display: none !important; }
    #matchesTable td:nth-child(n+6) > div:last-child { font-size: 14px !important; font-weight: 800 !important; color: var(--tx) !important; opacity: 1 !important; }

    #matchesTable td.my-choice { background: rgba(59, 130, 246, 0.12) !important; border-color: rgba(59, 130, 246, 0.2) !important; }
    #matchesTable td.fact-hit { box-shadow: inset 0 0 0 1px #10b981 !important; border-color: transparent !important; }
    #matchesTable td.fact-miss { box-shadow: inset 0 0 0 1px #ef4444 !important; border-color: transparent !important; }

    #matchesTable td.my-choice > div:last-child { color: #3b82f6 !important; }
    #matchesTable td.fact-hit > div:last-child { color: #10b981 !important; }
    #matchesTable td.fact-miss > div:last-child { color: #ef4444 !important; }

    #matchesTable td.my-choice::before { color: rgba(59, 130, 246, 0.8) !important; }
    #matchesTable td.fact-hit::before { color: rgba(16, 185, 129, 0.9) !important; }
    #matchesTable td.fact-miss::before { color: rgba(239, 68, 68, 0.9) !important; }
}