.stats-page > * {
    position: relative;
    z-index: 1;
}

.stats-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.stats-head h1 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 28px;
    line-height: 1.2;
}

.stats-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.stats-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 6px 12px;
    border: 1px solid rgba(96, 165, 250, .38);
    border-radius: 999px;
    background: rgba(219, 234, 254, .86);
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 800;
}

.stats-note {
    margin-bottom: 22px;
    padding: 10px 12px;
    border-left: 3px solid rgba(20, 184, 166, .66);
    border-radius: 8px;
    background: rgba(240, 253, 250, .74);
    color: #0f766e;
    font-size: 13px;
    line-height: 1.7;
}

.stats-room {
    display: grid;
    gap: 14px;
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, .24);
}

.stats-room:first-of-type {
    margin-top: 0;
}

.stats-room-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stats-room-head h2 {
    margin: 0;
    color: #111827;
    font-size: 21px;
    line-height: 1.35;
}

.stats-room-head span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.stats-summary-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 12px;
    background: rgba(255, 255, 255, .48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.stats-summary-short,
.stats-victory-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
}

.stats-summary-short {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    font-size: 15px;
}

.stats-summary-card strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.35;
}

.stats-summary-card em {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    line-height: 1.4;
}

.stats-table-wrap {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 12px;
    background: rgba(255, 255, 255, .50);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.stats-table th,
.stats-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, .18);
    color: #1f2937;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

.stats-table thead th {
    color: #334155;
    background: rgba(241, 245, 249, .74);
    font-size: 12px;
    font-weight: 800;
}

.stats-table tbody tr:last-child th,
.stats-table tbody tr:last-child td {
    border-bottom: 0;
}

.stats-table tbody th {
    text-align: left;
    font-weight: 700;
}

.stats-victory-label {
    width: 24px;
    height: 24px;
    margin-right: 6px;
    border-radius: 999px;
    font-size: 12px;
    vertical-align: middle;
}

.stats-human .stats-summary-short,
.stats-victory-label.stats-human {
    background: #2563eb;
}

.stats-wolf .stats-summary-short,
.stats-victory-label.stats-wolf {
    background: #dc2626;
}

.stats-fox .stats-summary-short,
.stats-victory-label.stats-fox {
    background: #7c3aed;
}

.stats-lover .stats-summary-short,
.stats-victory-label.stats-lover {
    background: #db2777;
}

.stats-draw .stats-summary-short,
.stats-victory-label.stats-draw {
    background: #64748b;
}

.stats-other .stats-summary-short,
.stats-victory-label.stats-other {
    background: #52525b;
}

.stats-empty {
    padding: 20px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .48);
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.stats-query-count {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, .20);
    color: #64748b;
    font-size: 12px;
    text-align: right;
}

@media (max-width: 760px) {
    .stats-head {
        display: grid;
    }

    .stats-total {
        justify-self: start;
    }

    .stats-summary-grid {
        grid-template-columns: 1fr;
    }
}
