/* =========================================
  boatrace_race_header (Modern Flat / No Shadow / No Radius) - FINAL
  - HTML: .br-rh / .br-rh__event / .br-rh__days / .br-rh__day... / .br-rh__rgrid...
  - 方針：シャドウ禁止／角丸なし
  - 既存と衝突させない：br-rh__* のみ
========================================= */

.br-rh{
  margin:10px 0;
}

/* =========================================================
  大会名ブロック（現代フラット）
========================================================= */
.br-rh__event{
  display:flex;
  align-items:center;
  gap:0;

  background:#e3f2fd;   /* 淡い水色 */
  margin:10px 0;
  padding:6px 8px;

  border:none;          /* ←枠線削除 */
  border-radius:0;
  box-shadow:none;
}


.br-rh__badge{
  width:42px;
  height:auto;
  padding:2px;
  flex:0 0 auto;
  display:block;
  align-self:center;
}

.br-rh__meta{
  position:relative;
  min-width:0;
  padding:4px 6px 4px 14px;
}

.br-rh__meta::before{
  content:"";
  position:absolute;
  left:4px;
  top:50%;
  transform:translateY(-50%);
  width:6px;
  height:78%;
  background:rgba(15,23,42,.55);
}

.br-rh__term{
  font-size:18px;
  line-height:1.05;
  font-weight:800;
  color:#0f172a;
  letter-spacing:.01em;
}

.br-rh__title{
  margin-top:5px;
  font-size:18px;
  line-height:1.12;
  font-weight:800;
  color:#0f172a;

  white-space:normal;
  word-break:break-word;
  overflow:visible;
  text-overflow:clip;
}

@media (max-width:768px){
  .br-rh__event{ padding:6px 6px; }
  .br-rh__badge{ width:38px; }
  .br-rh__meta{ padding:3px 4px 3px 12px; }
  .br-rh__meta::before{ width:5px; left:3px; }
  .br-rh__term{ font-size:14px; }
  .br-rh__title{ font-size:14px; }
}

/* =========================================================
  日程（可変列：日数に応じて6/5/4…で自動フィット）
  - 重要：repeat(6) をやめる
  - auto-fit + minmax で「ある分だけ」均等割り
========================================================= */
.br-rh__days{
  width:100%;
  display:grid;

  /* ✅ ここが最重要：子要素の数だけ列を作って均等に伸ばす */
  grid-template-columns:repeat(auto-fit, minmax(0, 1fr));

  gap:0;
  margin:0 0 10px;

  /* 罫線が二重に見える時用：内側は罫線、外枠は無し */
  border:none;
  background:transparent;
  padding:0;
}

/* a / div 共通 */
.br-rh__day{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;

  height:60px;
  padding:0;

  border:1px solid rgba(15,23,42,.12);
  border-radius:0;
  box-shadow:none;

  text-decoration:none;
  color:inherit;

  background:#f6f7f9; /* default */
}

/* 旧absolute解除：2行 */
.br-rh__date,
.br-rh__label{
  position:static;
  top:auto;
  left:auto;
  transform:none;
  pointer-events:none;
}

/* 日付（上段） */
.br-rh__date{
  font-size:11px;
  line-height:1;
  color:rgba(15,23,42,.55);
  letter-spacing:.02em;
}

/* ラベル（下段） */
.br-rh__label{
  margin-top:6px;
  font-size:16px;
  font-weight:900;
  line-height:1;
  color:#0f172a;
}

/* 状態色 */
.br-rh__day.is-future{ background:#f1f3f5; }
.br-rh__day.is-past{   background:#e6f7fb; }
.br-rh__day.is-active{ background:#ffe6f4; }

.br-rh__day:hover{
  filter:none;
  border-color:rgba(15,23,42,.22);
}

/* disabled */
.br-rh__day.is-disabled{
  opacity:1;
  pointer-events:none;
  cursor:not-allowed;
  filter:none;
}
.br-rh__day.is-disabled .br-rh__date,
.br-rh__day.is-disabled .br-rh__label{
  color:rgba(15,23,42,.32);
}

/* canceled */
.br-rh__day.is-canceled{
  background:#f6f7f9;
  opacity:1;
  pointer-events:none;
  cursor:not-allowed;
  filter:none;
}
.br-rh__day.is-canceled .br-rh__date,
.br-rh__day.is-canceled .br-rh__label{
color:#b54a4a;
}

@media (max-width:768px){
  .br-rh__day{
    height:48px;
    border-width:0.75px;
  }

  .br-rh__label{
    font-size:12px !important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:90%;
    margin-top:5px;
  }

  .br-rh__date{
    font-size:11px !important;
    white-space:nowrap;
  }
}

/* =========================================================
  Rナビ（現代フラット）
========================================================= */
.br-rh__rgrid{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:4px;
  border:none;
  background:transparent;
  padding:0;
}

.br-rh__rbtn{
  display:flex;
  align-items:center;
  justify-content:center;

  padding:8px 0;
  min-height:34px;
  line-height:1;

  background:#f3f4f6;
  color:#0f172a;
  text-decoration:none;
  font-weight:900;

  border:1px solid rgba(15,23,42,.12);
  border-radius:0;
  box-shadow:none;
}

.br-rh__rbtn:hover{
  background:#eef2f7;
  border-color:rgba(15,23,42,.22);
}
.br-rh__rbtn:active{
  background:#e8edf4;
}

@media (max-width:768px){
  .br-rh__rgrid{ gap:3px; }
  .br-rh__rbtn{
    padding:7px 0;
    min-height:32px;
    font-size:15px;
  }
}

/* =========================================================
  空表示時（PHP保険）
========================================================= */
.br-rh.br-rh--empty{
  padding:10px;
  background:#f3f4f6;
  border:1px solid rgba(15,23,42,.12);
  border-radius:0;
  box-shadow:none;
}



.br-rh__rbtn.is-current{
  background: #ffe6f4;
}