/* 통계 페이지 (PC 전용) */
.stats-filters { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.stats-filters select { height:36px; padding:0 10px; border:1px solid var(--border); border-radius:8px; font-size:14px; }
.stats-note { color:var(--text-muted); font-size:13px; margin-left:auto; }
.stats-note b { color:var(--text-primary); }

.stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.stats-panel { background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:14px 16px; }
.sp-head { font-size:15px; font-weight:800; margin-bottom:12px; }
.stats-panel.best .sp-head { color:#16a34a; }
.stats-panel.worst .sp-head { color:#dc2626; }
.sp-empty { color:var(--text-muted); font-size:13px; padding:10px 0; }
.sp-foot { margin-top:10px; padding-top:10px; border-top:1px dashed var(--border); font-size:12px; color:#b45309; }

.sp-row { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--border-light); }
.sp-row:last-child { border-bottom:none; }
.sp-rank { flex-shrink:0; width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:800; color:#fff; }
.sp-rank.best { background:#16a34a; }
.sp-rank.worst { background:#dc2626; }
.sp-main { flex:1; min-width:0; }
.sp-name { font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sp-bar { height:6px; background:var(--border); border-radius:99px; margin-top:4px; overflow:hidden; }
.sp-fill { height:100%; border-radius:99px; }
.sp-fill.best { background:#22c55e; }
.sp-fill.worst { background:#f87171; }
.sp-cnt { flex-shrink:0; font-size:14px; font-weight:800; color:var(--text-primary); min-width:44px; text-align:right; }

.stats-table-wrap { max-height:520px; overflow-y:auto; border:1px solid var(--border); border-radius:10px; }
.stats-table { width:100%; border-collapse:collapse; font-size:13px; }
.stats-table thead th { position:sticky; top:0; background:#f8fafc; text-align:left; font-size:12px; font-weight:700; color:var(--text-secondary); padding:9px 12px; border-bottom:2px solid var(--border); }
.stats-table td { padding:8px 12px; border-bottom:1px solid var(--border-light); vertical-align:middle; }
.stats-table td.rk { color:var(--text-muted); width:40px; }
.stats-table td.nm { font-weight:600; }
.stats-table td.num, .stats-table th.num { text-align:right; font-weight:800; color:var(--primary); white-space:nowrap; }
.stats-table .sk { font-size:10px; color:var(--text-muted); background:var(--bg); padding:1px 5px; border-radius:4px; margin-left:4px; }
.stats-table td.barcell, .stats-table th.barh { width:160px; }
.stats-table .bar { height:8px; background:var(--primary); border-radius:99px; opacity:.85; }
.stats-table tbody tr:nth-child(-n+3) td.num { color:#16a34a; }

@media (max-width:900px){ .stats-grid { grid-template-columns:1fr; } }

/* 기준 전환 버튼 */
.stats-metric { display:flex; gap:4px; }
.stats-metric .chip { font-size:13px; padding:5px 12px; }
