.br-ai-stats-wrap {
  margin: 0 0 32px;
}

.br-ai-stats-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}

.br-ai-stats-filter-label {
  font-weight: 700;
  font-size: 14px;
}

.br-ai-stats-date-input {
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid #d8d8d8;
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.br-ai-stats-filter-button {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #222;
  background: #222;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.br-ai-stats-filter-button:hover {
  opacity: 0.9;
}

.br-ai-stats-table-wrap {
  overflow-x: visible;
  margin: 0 0 24px;
}

.br-ai-stats-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  table-layout: fixed;
}

.br-ai-stats-table th,
.br-ai-stats-table td {
  border: 1px solid #e5e5e5;
  padding: 1px 2px !important;
  font-size: 14px !important;
  line-height: 2 !important;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: break-word;
}

.br-ai-stats-table th {
  background-color: #e2fdf4 !important;
  color: #000 !important;
  font-weight: 700;
}

.br-ai-stats-table th *,
.br-ai-stats-table td * {
  font-size: inherit;
  line-height: inherit;
  box-sizing: border-box;
}

/* 日次集計表 */
.br-ai-stats-summary-table th:nth-child(1),
.br-ai-stats-summary-table th:nth-child(3) {
  width: 20%;
}

.br-ai-stats-summary-table td:nth-child(2),
.br-ai-stats-summary-table td:nth-child(4) {
  width: 30%;
  background: #fff;
}

/* レース詳細表 */
.br-ai-stats-detail-table thead th:nth-child(1),
.br-ai-stats-detail-table tbody td:nth-child(1) {
  width: 12%;
}

.br-ai-stats-detail-table thead th:nth-child(2),
.br-ai-stats-detail-table thead th:nth-child(3),
.br-ai-stats-detail-table tbody td:nth-child(3),
.br-ai-stats-detail-table tbody td:nth-child(2) {
  width: 8%;
}

.br-ai-stats-detail-table thead th:nth-child(5),
.br-ai-stats-detail-table tbody td:nth-child(5),
.br-ai-stats-detail-table thead th:nth-child(6),
.br-ai-stats-detail-table tbody td:nth-child(6) {
  width: 15%;
}
.br-ai-stats-detail-table thead th:nth-child(4),
.br-ai-stats-detail-table tbody td:nth-child(4),
.br-ai-stats-detail-table thead th:nth-child(7),
.br-ai-stats-detail-table tbody td:nth-child(7) {
  width: 18%;
}

.br-ai-stats-detail-table thead th {
  white-space: normal;
}

.br-ai-stats-empty {
  padding: 8px 4px !important;
  color: #777;
}

.br-ai-stats-badge {
   display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;          /* ←ここで統一 */
  padding: 1px 4px;
  font-size: 12px !important;
  line-height: 1.4 !important;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  border-radius: 6px;
}

.br-ai-stats-badge-hit {
  background: #d6001c;
  color: #fff;
}

.br-ai-stats-badge-lose {
  background: #999;
  color: #fff;
}

.br-ai-stats-badge-cancelled {
  background: #666;
  color: #fff;
}

.br-ai-stats-badge-pending {
  background: #f0ad4e;
  color: #fff;
}

.br-ai-stats-badge-blank {
  min-width: 0;
  min-height: 1em;
}

.br-ai-stats-error {
  padding: 16px;
  border: 1px solid #e5e5e5;
  background: #fff7f7;
  color: #b60000;
}

.br-race-link {
  color: #222;
  text-decoration: underline;
  font-weight: 700;
}

.br-race-link:hover {
  opacity: 0.7;
}

.br-boat-icon {
  width: 18px;
  height: auto;
  margin: 0 1px;
  vertical-align: middle;
}

.br-ai-stats-detail-table th,
.br-ai-stats-detail-table td {
  padding: 1px !important;
}

/* 全部太字 */
.br-ai-stats-table th,
.br-ai-stats-table td {
  font-weight: 700;
}

/* リンクは太字のまま青 */
.br-ai-stats-table a {
  font-weight: 700 !important;
  color: #0073aa;
  text-decoration: underline;
}

.br-ai-stats-table a:hover {
  color: #005177;
}



.br-ai-stats-filter-button {
  display: inline-block;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffd700, #f7b500);
  color: #222;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

/* ホバーで浮く */
.br-ai-stats-filter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #ffe066, #ffc107);
}

/* 押したとき */
.br-ai-stats-filter-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* フォーカス（アクセシビリティ） */
.br-ai-stats-filter-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.5);
}