/* =========================================================
  Doctor table (PC/SP) - organized
  - 危険な「.post_content ul 全リセット」は撤去（スライダー内だけに限定）
  - 使ってない .tantou_table th.is-today は撤去（JSは is-today-head / is-today-col）
  - ScrollHint の「今日は非表示」は CSSだけでは成立しないので削除（※JSで対応するなら別途）
  - pc-float-head の z-index は “メニューより下” を固定
========================================================= */

/* =========================================================
  SP slider base
========================================================= */
.doctor-sp-slider{
  position: relative;
  width: 100%;
  overflow: hidden;
}

.doctor-sp-viewport{
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #fff;
}

/* ulのスタイルリセット（スライダー内だけ） */
.doctor-sp-track{
  display: flex;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  will-change: transform;
  transform: translateX(0);
  transition: transform 240ms ease;
  align-items: flex-start; /* 高い曜日に引っ張られない */
}

.doctor-sp-slide{
  flex: 0 0 100%;
  box-sizing: border-box;
  padding: 12px 10px 16px; /* PC/タブレット想定のベース */
  align-self: flex-start;
}

/* 曜日 */
.doctor-sp-day{
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 10px;
}

/* セクション */
.doctor-sp-section{
  margin: 0 0 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.doctor-sp-section-title{
  padding: 10px;
  font-weight: 700;
  background: #f3f3f3;
  line-height: 1.4;
}

.doctor-sp-section-body{
  padding: 10px;
  line-height: 1.6;
}

.doctor-sp-section-body hr{
  margin: 10px 0;
}

/* 空表示 */
.doctor-sp-empty{
  border: 1px dashed #bbb;
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
}

/* 矢印（ベース） */
.doctor-sp-arrow{
  position: absolute;
  top: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  cursor: pointer;
  z-index: 5;
}
.doctor-sp-arrow.is-prev{ left: 8px; }
.doctor-sp-arrow.is-next{ right: 8px; }

.doctor-sp-arrow:before{
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid rgba(0,0,0,.6);
  border-right: 2px solid rgba(0,0,0,.6);
  margin: 0 auto;
  position: relative;
  top: 0;
}
.doctor-sp-arrow.is-prev:before{ transform: rotate(-135deg); left: 2px; }
.doctor-sp-arrow.is-next:before{ transform: rotate(45deg); left: -2px; }

/* =========================================================
  SP (<=767) tuning
========================================================= */
@media (max-width: 767px){

  /* 全体余白（上を詰める） */
  .doctor-panel{
    padding: 6px 12px 0;
    margin: 0;
    min-height: 0;
  }

  /* スライド余白（上下を詰める） */
  .doctor-sp-slide{
    padding: 2px 4px 0;
    margin: 0;
    min-height: 0;
  }

  /* 曜日（中央揃え＋高さ固定） */
  .doctor-sp-day{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 44px;        /* 矢印の被り防止 */
    border-radius: 999px;
    background: #f3f3f3;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0 0 35px;
  }

  /* 矢印（曜日の中央に合わせる） */
  .doctor-sp-arrow{
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    background: rgba(255,255,255,.95);
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    top: 22px;
    transform: translateY(-50%);
  }
  .doctor-sp-arrow::before{ opacity: .85; }

  /* セクション（中央寄せ） */
  .doctor-sp-section{
    margin: 0 0 8px;
    border: 1px solid #e9e9e9;
  }
  .doctor-sp-section:last-child{ margin-bottom: 0; }

  .doctor-sp-section-title{
    background: #EFF5F6;
    padding: 10px 12px;
    font-size: 14px;
    text-align: center;
  }

  .doctor-sp-section-body{
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
  }

  .doctor-sp-section-body hr{
    border: 0;
    border-top: 1px solid #eeeeee;
    margin: 8px 0;
  }

  .doctor-sp-section-body a{
    display: inline-block;
    padding: 2px 0;
    color: #000 !important;
    text-decoration: underline;
  }

  .doctor-sp-section-body strong{
    color: #e82a4e !important;
    font-weight: normal;
  }

  .doctor-sp-section-body strong a{
    color: #e82a4e !important;
    text-decoration: underline;
    font-weight: normal;
  }

  .doctor-sp-section-title a{
    color: #000 !important;
    text-decoration: underline;
  }

  .doctor-sp-sections{
    margin: 0;
    padding: 0;
  }

  .doctor-table-tab,
  .doctor-table-heading{
    margin-bottom: 10px;
  }
}

/* =========================================================
  SP：今日ハイライト
========================================================= */
@media (max-width: 767px){

  .doctor-sp-slide.is-today .doctor-sp-day{
    background: #8BC34A;
    color: #fff;
  }

  .doctor-sp-slide.is-today .doctor-sp-day::after{
    content: "今日";
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    opacity: .9;
  }

  .doctor-sp-slide.is-today .doctor-sp-section{
    background: rgba(123, 190, 53, 0.08);
    border-color: rgba(123, 190, 53, 0.35);
  }

  .doctor-sp-slide.is-today .doctor-sp-section-title{
    background: rgba(123, 190, 53, 0.16);
  }
}

/* =========================================================
  PC：止血（テーマ側のヘッダー固定指定を解除）
========================================================= */
.tantou_table tr:first-child th{
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

/* =========================================================
  PC：追従ヘッダー（ふわっと）
========================================================= */
.pc-float-head{
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  z-index: 2000 !important; /* メニューより下（ここが今回の肝） */
}
.pc-float-head.is-visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 追従ヘッダーを半透明にする */
.pc-float-head th{
  line-height: 2.4;
  background: rgba(221,221,221,0.88) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* =========================================================
  PC：当日ハイライト（JS付与: is-today-head / is-today-col）
========================================================= */
.tantou_table .is-today-head{
  background: rgba(123, 190, 53, 0.85);
  font-weight: 700;
}
.tantou_table .is-today-col{
  background: rgba(123, 190, 53, 0.08);
}

/* 追従ヘッダー側（強制上書き） */
.doctor-float-head table.tantou_table tbody > tr:first-child > th.is-today-head,
.doctor-float-head table.tantou_table tbody > tr:first-child > td.is-today-head{
  background: rgba(123, 190, 53, 0.85) !important;
  font-weight: 700;
}
.doctor-float-head.is-visible .is-today-head{
  box-shadow: inset 0 -3px 0 #f0c400;
}

/* =========================================================
  SP ScrollHint（CSSのみ / 中央表示）
========================================================= */
@media (max-width: 767px){

  /* 中央バッジ：← スワイプ → */
  .doctor-sp-slider::after{
    content: "← スワイプ →";
    position: absolute;
    left: 50%;
    top: 46px;
    transform: translateX(-50%);
    z-index: 6;
    pointer-events: none;

    font-size: 12px;
    line-height: 1;
    padding: 6px 12px;
    border-radius: 999px;

    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.12);
    color: rgba(0,0,0,0.65);

    animation: doctorSwipeHint 1.8s ease-in-out infinite;
  }

  @keyframes doctorSwipeHint{
    0%   { transform: translateX(-50%); opacity: .55; }
    50%  { transform: translateX(-58%); opacity: 1; }
    100% { transform: translateX(-50%); opacity: .55; }
  }

  /* 左右フェード：横に動くUIの“気付き”を補助 */
  .doctor-sp-viewport::before,
  .doctor-sp-viewport::after{
    content:"";
    position:absolute;
    top:0;
    width:22px;
    height:100%;
    pointer-events:none;
    z-index:4;   /* 矢印(5)の下 */
    opacity:.45;
  }

  .doctor-sp-viewport::before{
    left:0;
    background: linear-gradient(to right, rgba(255,255,255,0.95), rgba(255,255,255,0));
  }

  .doctor-sp-viewport::after{
    right:0;
    background: linear-gradient(to left, rgba(255,255,255,0.95), rgba(255,255,255,0));
  }

}
/* 例：TCD系でありがちなヘッダー/メニュー */
#header, .l-header, .site-header, .header, #global_menu, .global_menu {
  z-index: 5000 !important;
  position: relative; /* z-index効かせるため */
}
.pc-float-head{
  z-index: 3000 !important;
}