/* ===== 料金比較表 共通スタイル =====
   TOPページ（/）と料金ページ（/pages/price）の両方で使用する
   hikaku.scroll-fade-soft テーブルの共通スタイル定義。
   ページ固有の上書きは各ページの CSS ファイルに記述すること。
   （例: sticky.kara 背景色 / start_price_card）
====================================== */

/* ----- PC 共通 ----- */

#PRICE .table-scroll table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  /* border-right はセル側で管理（badge_row の右端線問題を回避するため） */
  /* background-color は badge_row が透過するようセル側で管理 */
}

/* badge_row を除く全セルに白背景（table 自体は transparent のため明示的に設定） */
#PRICE .table-scroll thead tr:not(.badge_row) th,
#PRICE .table-scroll tbody td,
#PRICE .table-scroll tbody th {
  background: #fff;
}

/* badge_row を除く全行の最終セルに右枠線を付与（table の border-right 代替） */
#PRICE .table-scroll thead tr:not(.badge_row) th:last-child,
#PRICE .table-scroll tbody td:last-child {
  border-right: 1px solid #EDEDED;
}

#PRICE .table-scroll th {
  text-align: center;
}

#PRICE .table-scroll .sticky {
  background: #F9F9F9;
  color: #333;
  width: auto;
  vertical-align: middle;
}

#PRICE .table-scroll .sticky.kara {
  border-left: none;
  /* background は各ページの CSS で指定（TOP: #EFF7F3 / 料金ページ: #fff） */
}

#PRICE .table-scroll .plan_name {
  width: 255px;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0;
  position: relative;
}

#PRICE .table-scroll .plan_name strong {
  font-size: 2.4rem;
  display: block;
  margin: 16px 0 0px;
}

#PRICE .table-scroll .plan_name .price_box {
  padding: 20px 0 28px;
  font-weight: bold;
  font-size: 2rem;
}

#PRICE .table-scroll .plan_name.plan01 {
  background: #7EAA4D;
}

#PRICE .table-scroll .plan_name.plan02 {
  background: #C0529B;
}

#PRICE .table-scroll .plan_name.plan03 {
  background: #1B4DC3;
}

#PRICE .table-scroll .plan_name.plan04 {
  background: #BDAE24;
}

#PRICE .table-scroll .plan_name .price_box strong {
  font-size: 4rem;
  display: inline-block;
  font-weight: 500;
  margin: 0 5px;
}

#PRICE .table-scroll .plan_name .this_name {
  padding-top: 36px;
  font-weight: bold;
  font-size: 1.5rem;
}

#PRICE .table-scroll table th,
#PRICE .table-scroll table td {
  text-align: center;
  padding: 10px;
  color: #A9A9AD;
  border-bottom: 1px solid #EDEDED;
  border-left: 1px solid #EDEDED;
}

#PRICE .table-scroll td .circle {
  fill: none;
  stroke-width: 4;
}

#PRICE .table-scroll td:first-of-type .circle {
  stroke: #BDAE24;
}

#PRICE .table-scroll td:nth-of-type(2) .circle {
  stroke: #1B4DC3;
}

#PRICE .table-scroll td:nth-of-type(3) .circle {
  stroke: #C0529B;
}

#PRICE .table-scroll td:nth-of-type(4) .circle {
  stroke: #7EAA4D;
}

#PRICE .table-scroll .can_select {
  color: #1B4DC3;
  font-weight: bold;
  font-size: 1.8rem;
  background: linear-gradient(64deg, #DFF6F3 11.81%, #F3F8DF 130.66%);
}

#PRICE .table-scroll .can_select strong {
  font-size: 3.2rem;
  font-weight: 500;
}

#PRICE .add_note {
  font-size: 1.4rem;
  margin: 10px 5px;
}

#PRICE .add_note strong {
  font-size: 1.8rem;
}

#PRICE .note {
  background: none;
  margin-top: 10px;
  opacity: 0.4;
  font-size: 1.4rem;
}

#PRICE .security {
  text-align: left !important;
  color: #333333 !important;
  line-height: 1.7 !important;
  padding: 8px 14px 8px 24px !important;
}

#PRICE .security .siteseal_img {
  float: right;
  padding-top: 10px;
}

#PRICE .security .siteseal_img img {
  width: 120px;
  margin-left: 8px;
}

#PRICE .security a {
  font-weight: 700;
  color: #0065B3;
  text-decoration: underline;
}

/* 料金表ヘッダー改修 2026/04 */
#PRICE .table-scroll .badge_row th {
  border: none;
  padding: 0;
  overflow: visible;
}

#PRICE .table-scroll .plan03_badge_cell {
  padding: 12px 0 0;
}

#PRICE .table-scroll .plan_popular {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  margin-bottom: -20px;
}

#PRICE .table-scroll .plan_popular__crown {
  width: 46px;
  height: auto;
}

/* リボン形状（白塗り・青枠2px・両端V字切り欠き）
   Method B: 外側要素を青背景、::before で内側白レイヤーを重ねて枠線を表現
   clip-path は border を切り取るため border 直接指定は不可 */
#PRICE .table-scroll .plan_popular__label {
  position: relative;
  display: block;
  background: #1b4dc3;
  padding: 8px 26px;
  text-align: center;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%, 12px 50%);
}

#PRICE .table-scroll .plan_popular__label::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%, 12px 50%);
}

#PRICE .table-scroll .plan_popular__label-inner {
  position: relative;
  z-index: 1;
  color: #1b4dc3;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 0.02em;
}

/* カスタマイズ列ヘッダーをリボンの下に配置 */
#PRICE .table-scroll .plan_name.plan03 {
  position: relative;
  z-index: 1;
}

/* 料金表 おすすめ行・CTA改修 2026/04 */
#PRICE .table-scroll .recommend_row td,
#PRICE .table-scroll .recommend_row th {
  background: #F6F9F9;
}

#PRICE .table-scroll .recommend_row .sticky {
  color: #1c9898;
}

/* height: 1px は table-cell の子要素が height: 100% を解決するためのトリック */
#PRICE .table-scroll .recommend_row td {
  height: 1px;
}

#PRICE .table-scroll .td_inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#PRICE .table-scroll .recommend_txt {
  font-size: 1.4rem;
  color: #4c4c4c;
  line-height: 1.43;
  text-align: left;
  flex-grow: 1;
  margin-bottom: 20px;
  margin-top: 8px;
}

#PRICE .table-scroll .recommend_txt__hl {
  color: #1c9898;
  font-weight: bold;
}

#PRICE .table-scroll .cta_btn_main {
  display: block;
  width: 208px;
  text-align: center;
  border-radius: 20px;
  color: #fff;
  font-size: 1.6rem;
  font-weight: bold;
  padding: 12px 16px 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  margin: 0 auto 20px;
}

#PRICE .table-scroll .cta_btn_main--plan04 { background: #BDAE24; }
#PRICE .table-scroll .cta_btn_main--plan03 { background: #1B4DC3; }
#PRICE .table-scroll .cta_btn_main--plan02 { background: #C0529B; }
#PRICE .table-scroll .cta_btn_main--plan01 { background: #7EAA4D; }

#PRICE .table-scroll .cta_sub {
  font-size: 1.2rem;
  color: #4c4c4c;
  text-align: center;
  margin: 0;
  margin-bottom: 16px;
  margin-top: 4px;
}

#PRICE .table-scroll .cta_sub__link {
  color: #0065b3;
}

/* plan03列（カスタマイズ）青枠線 2026/04
   border-collapse: separate のため各セルに個別付与 */

/* thead: プラン名ヘッダー上辺・左右 */
#PRICE .table-scroll .plan_name.plan03 {
  border-top: 3px solid #1B4DC3;
  border-left: 3px solid #1B4DC3;
  border-right: 3px solid #1B4DC3;
}

/* 不具合2修正（thead）: plan02 の border-left を削除して plan03 の border-right のみで1本線に */
#PRICE .table-scroll .plan_name.plan02 {
  border-left: none;
}

/* 不具合1修正: rowspan="5" によるセレクターずれを回避するため class="plan03_col" に切り替え */
#PRICE .table-scroll tbody td.plan03_col,
#PRICE .table-scroll tbody .can_select {
  border-left: 3px solid #1B4DC3;
  border-right: 3px solid #1B4DC3;
}

/* tbody: plan03列の最終セル（can_select, rowspan=5）下辺 */
#PRICE .table-scroll .can_select {
  border-bottom: 3px solid #1B4DC3;
}

/* 不具合2修正（tbody）: plan03右辺の2本線解消。隣接する plan02 td の border-left を削除 */
#PRICE .table-scroll tbody td.plan03_col + td,
#PRICE .table-scroll tbody .can_select + td {
  border-left: none;
}

/* CRM〜デジタル診察券行: rowspan により td:nth-of-type(2) が plan02 になる行のみ対象 */
#PRICE .table-scroll tbody tr td:nth-of-type(2):not(.plan03_col):not(.can_select) {
  border-left: none;
}

/* ----- SP (max-width: 768px) ----- */

@media (max-width: 768px) {
  /* テーブルスクロール */
  #PRICE .table-scroll {
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #PRICE .table-scroll table {
    margin: 0;
    width: 793px;
  }

  #PRICE .table-scroll table td {
    vertical-align: top;
  }

  /* sticky 列: plan_popular(z-index:2) / plan_name.plan03(z-index:1) より前面に */
  #PRICE .table-scroll .sticky {
    position: -webkit-sticky;
    position: sticky;
    left: -0.5%;
    z-index: 3;
    font-size: 1.2rem;
  }

  /* sticky kara を横スクロール時に最前面に（badge_row / plan_name 行どちらも） */
  #PRICE .table-scroll thead tr:not(.badge_row) .sticky.kara {
    z-index: 10;
  }

  #PRICE .table-scroll .badge_row .sticky.kara {
    z-index: 10;
  }

  /* プラン名サイズ調整 */
  #PRICE .table-scroll .plan_name {
    font-size: 1.2rem;
  }

  #PRICE .table-scroll .plan_name strong {
    font-size: 2rem;
    margin: 12px 0 0px;
  }

  #PRICE .table-scroll .plan_name .price_box {
    font-size: 1.6rem;
    margin-top: -8px;
    padding: 23px 0 24px;
  }

  #PRICE .table-scroll .plan_name .price_box strong {
    font-size: 3.4rem;
  }

  #PRICE .table-scroll .plan_name .this_name {
    padding-top: 24px;
    font-size: 1.1rem;
  }

  /* add_note */
  #PRICE .add_note {
    margin: 10px 0;
    line-height: 1.4;
  }

  #PRICE .add_note strong {
    font-size: 1.6rem;
  }

  /* リボン行ボーダー修正 */
  #PRICE .table-scroll .badge_row th {
    border: none;
  }

  #PRICE .table-scroll table thead tr:first-child th {
    border-top: none;
  }

  /* リボン文字サイズ縮小 */
  #PRICE .table-scroll .plan_popular__label-inner {
    font-size: 1.4rem;
  }

  /* 王冠を少し下げる */
  #PRICE .table-scroll .plan_popular__crown {
    margin-top: 8px;
  }

  /* SP でのリボン被り量調整（PC: -20px → SP: -8px） */
  #PRICE .table-scroll .plan_popular {
    margin-bottom: -8px;
  }

  /* CTA ボタン幅を SP 用に縮小（PC: 208px → SP: 170px） */
  #PRICE .table-scroll .cta_btn_main {
    width: 170px;
  }
}
