body {
  background-color: #fbf6ee;
  font-family: "Noto Sans JP";
  margin: 0 auto;
}

.q-comments {
  position: relative;
  padding-bottom: 64.29px;
}

.button {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  gap : 18px;
  padding-right: 58px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  translate: 29px;
}

.button.is-show {
  opacity: 1;
  transform: translateY(0);
}

.q-comments li {
  list-style: none;
  border-radius: 100px;
  display: inline-block;
  background-color: #fff;
  text-align: center;
}

.q-comments button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 156px;
  padding: 12px 0;
  border: 1px solid #000000;
  border-radius: 100px;
  color: #282828;
  background: transparent;
  transition: .2s ease;
  font-family: "Noto Sans JP";
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent; /* タップ時のブラウザ特有のハイライトをクリア */
}

/* PC環境でのホバー */
.q-comments button:hover {
  background: #000;
  color: #fff;
}

/* 選択されてアクティブになったときのスタイル（PC・スマホ共通） */
.q-comments button.active {
  background: #000;
  color: #fff;
}

/* ==========================================================================
   ⭕ 【最初のボタンと同じ仕組み】
   【タッチデバイス実機限定】スマホでのホバー残像を強制カット
   ========================================================================== */
@media (hover: none) {
  /* ❌ マウスがない環境（スマホ実機）のときだけ、ホバーの見た目を強制的に通常時に固定 */
  .q-comments button:hover {
    background: transparent !important;
    color: #282828 !important;
  }
}

.q_section {
  max-width: 737px;
  width: 100%;
  margin-top: 50px;
  margin-left: auto;
  margin-right: auto;
  display: none;
  transition: 0.2s ease;
  translate: 28px;
}

.q_section.active {
  display: block;
}

.q_section_title {
  margin-bottom: 43px;
  line-height: 1.46;
}

.q_title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #282828;
}

.q_primary {
  display: flex;
  gap: 11px;
  margin-bottom: 34px;
}

.q_primary p {
  display: flex;
  font-size: 1.25rem;
  font-weight: 700;
  color: #282828;
  align-items: center;
  padding-bottom: 3px;
}

.q_secondary {
  display: flex;
  align-items: flex-start; /* 上揃え */
  position: relative;
  margin-bottom: 58px;
  margin-left: 50px;
}

.q_secondary img {
  position: absolute;
  left: -7px;
  top: -34px;
  max-width: 155px;
  object-fit: cover;
}

.q_secondary:last-of-type {
  margin-bottom: 70px;
}

.chart {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 559px;
  padding: 21px 19px 22px 46px;
  margin-left: 128px;
  background-color: #fff;
  border-radius: 8px 8px 8px 0;
  box-sizing: border-box;
  color: #282828;
  font-weight: 500;
  line-height: 1.41;
}


/* 背景画像 */

.q-comments {
  position: relative;
  overflow: hidden;
}

.q-comments__bg-wrap {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.q-comments__bg {
  position: absolute;
  display: block;
  background-repeat: no-repeat;
  background-size: contain;
}

#faq.l-container {
  position: relative;
  z-index: 1;
}

.q-comments__bg--1 {
  width: 364.24px; /* 適切なサイズに調整 */
  height:423.21px; /* 適切なサイズに調整 */
  top: 91px;
  right: -140px;
  background-image: url('../../img/common-bg_paint11.svg');
}

.q-comments__bg--2 {
  width: 371.24px; /* 適切なサイズに調整 */
  height: 360.59px; /* 適切なサイズに調整 */
  top: 431px;
  left: -117px;
  background-image: url('../../img/common-bg_paint12.svg');
}

.q-comments__bg--3 {
  width: 322.37px; /* 適切なサイズに調整 */
  height: 309.27px; /* 適切なサイズに調整 */
  top: 1108px;
  right:  -97px;
  background-image: url('../../img/common-bg_paint2.svg');
}

.q-comments__bg--4 {
  width: 263.97px; /* 適切なサイズに調整 */
  height: 260.95px; /* 適切なサイズに調整 */
  position: absolute;
  top: 1525px;
  left: -53px;
  background-image: url('../../img/common-bg_paint13.svg');
}

.q-comments__bg--5 {
  width: 284.9px; /* 適切なサイズに調整 */
  height: 441.73px; /* 適切なサイズに調整 */
  top: 2056px;
  right: -70px;
  background-image: url('../../img/common-bg_paint14.svg');
}

.q-comments__bg--6 {
  width: 118.09px; /* 適切なサイズに調整 */
  height: 127.28px; /* 適切なサイズに調整 */
  bottom:46.4px;
  left: 46.19px;
  background-image: url('../../img/common-bg_paint4.svg');
}

.faq_parent > * {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.faq_parent.is-show > * {
  opacity: 1;
  transform: translateY(0);
}

@media screen and (min-width: 1281px) {
  .q-comments__bg--1 {
    left: calc((100vw - 1280px) / 2 + 1056px);
  }  
    .q-comments__bg--2 {
    left: calc((100vw - 1280px) / 2 - 117px);
  }  
    .q-comments__bg--3 {
    left: calc((100vw - 1280px) / 2 + 1055px);
  }  
    .q-comments__bg--4 {
    left: calc((100vw - 1280px) / 2 - 81px);
  }  
    .q-comments__bg--5 {
    left: calc((100vw - 1280px) / 2 + 1095px);
  }  
    .q-comments__bg--6 {
    left: calc((100vw - 1280px) / 2 + 41px);
  }  
}


/* レスポンシブはここから */
@media screen and (max-width: 900px) {
  .l-footer-upper__inner-mini-txt {
      font-size: .9375rem;
  }

  .q_section {
    translate: unset;
  }

  .button {
    translate: unset;
  }
}

@media screen and (max-width: 800px) {
  .button {
    padding-right: unset;
  }
}

@media screen and (max-width: 767px) {
  .q_section {
    max-width: 357px;
    translate: unset;
  }

  .q-comments__bg-wrap {
    display: none;
  }

  .button {
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 12px; /* ボタン同士の隙間 */
    margin: 18px auto 64px;
    max-width: 352px;
    padding: 0; /* ulのデフォルトパディングをリセット */
    translate: unset;
  }

  /* 💡 【重要】Flexアイテムである「li」を2列の可変にする */
  .button li {
    /* 2列（50%）からgapの半分（6px）を引いた幅にし、可変にする */
    width: calc(50% - 6px); 
    flex-shrink: 1;
    min-width: 0; /* はみ出し防止 */
  }

  /* 💡 ボタン自体は「li」の幅100%いっぱいに広げる */
  .q-comments button {
    /* ❌ 固定幅（width: 172px;）をやめて100%にする */
    width: 100%; 
    
    padding: 7px 0;
    /* テキストが溢れたときのア守り（必要に応じて） */
    font-size: .875rem;
    white-space: nowrap;
  }

  /* --- 既存の active などのスタイルはそのまま下へ繋げてOKです --- */
  .q-comments button.active {
    background: #000;
  }

  .q_title {
    font-size: 1.125rem;
  }

  .q_section_title {
    margin-bottom: 21px;
  }

  .q_primary {
    gap: 18px;
    margin-bottom: 37px;
  }

  .q_primary img {
    width: 55.53px;
  }

  .q_primary p {
    font-size: 1rem;
    max-width: 250px;
    line-height: 1.5;
  }

  .q_secondary {
    display: flex;
    align-items: flex-start; /* 上揃え */
    position: relative;
    margin-bottom: 48px;
    margin-left: 8px;
  }

  .q_secondary  img {
    width: 100px;
    z-index: 1;
  }

  .chart {
    width: 276px;
    padding: 13px 0px 13px 33px;
    margin-left: 73px;
    border-radius: 4px;
    transform: translateY(-19px);
    font-size: .875rem;
  }

  /* ⭕ JSで「is-tapped」クラスがついている瞬間（指が触れている間）だけ、最優先で黒背景・白文字にする */
  .q-comments button.is-tapped {
    background: #000 !important;
    color: #fff !important;
  }
  
  /* ⭕ タップが完了して「active」がついたボタンは、スマホでも確実に黒背景・白文字を維持 */
  .q-comments button.active {
    background: #000 !important;
    color: #fff !important;
  }
}