/* stats-v1.css — 成績・分析画面(機能版)。ビジュアルの仕上げはCodex担当予定 */
#stats-dialog {
  border: 1px solid rgba(140, 170, 205, 0.35);
  border-radius: 14px;
  background: #0b1420;
  color: #e6ecf4;
  padding: 0;
  width: min(680px, 92vw);
  max-height: 86vh;
}
#stats-dialog::backdrop { background: rgba(2, 6, 12, 0.72); }
.stats-shell { display: flex; flex-direction: column; max-height: 86vh; }
.stats-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px; border-bottom: 1px solid rgba(140, 170, 205, 0.2);
}
.stats-header small { color: #8fa8c4; letter-spacing: 0.14em; }
.stats-header h2 { margin: 2px 0 0; font-size: 1.2rem; }
.stats-body { overflow-y: auto; padding: 12px 18px; }
.stats-section { margin-bottom: 16px; }
.stats-section h3 {
  margin: 0 0 8px; font-size: 0.95rem; color: #d6b25e;
  border-left: 3px solid #d6b25e; padding-left: 8px;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px 14px; margin: 0;
}
.stats-grid div { display: flex; justify-content: space-between; gap: 8px; }
.stats-grid dt { color: #9db2c8; }
.stats-grid dd { margin: 0; font-weight: 600; }
.stats-ranks { margin-top: 10px; }
.stats-rank-row { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.stats-rank-row .lbl { width: 34px; color: #9db2c8; }
.stats-rank-row .cnt { width: 48px; text-align: right; }
.stats-bar { flex: 1; height: 10px; background: rgba(140, 170, 205, 0.15); border-radius: 5px; overflow: hidden; }
.stats-bar i { display: block; height: 100%; background: #d6b25e; border-radius: 5px; }
.stats-yaku { width: 100%; border-collapse: collapse; }
.stats-yaku td { padding: 3px 4px; border-bottom: 1px solid rgba(140, 170, 205, 0.12); }
.stats-yaku td.cnt { text-align: right; }
.stats-empty { color: #9db2c8; }
.stats-footer {
  padding: 10px 18px 14px; border-top: 1px solid rgba(140, 170, 205, 0.2);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.stats-footer .btn.primary { min-width: 180px; }
/* リセットは破壊的操作: 主導線から外し、小さな赤い文字リンクとして隅に置く */
.stats-clear-link {
  appearance: none; background: none; border: none; cursor: pointer;
  color: #d4655e; font-size: 0.78rem; text-decoration: underline;
  padding: 4px 2px; opacity: 0.85;
}
.stats-clear-link:hover { opacity: 1; }
