/* =======================================
   書籍詳細ページ固有スタイル (detail.html)
   ======================================= */


body {
  background-color: #f3f3f2;
  padding: unset;
  background-image: unset;
  font-family:
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    "Meiryo", Verdana, "Roboto",
    sans-serif,
    "Helvetica Neue", Helvetica,
    Arial;
}

body::before {
  content: "";
  position: unset;
  inset: 0;
  border: unset;
}

body::after {
  border: unset;
  background: unset;
}


section {
  padding: unset;
  margin-bottom: unset;
}


main {
  background-image: unset;
}

.txt_bold {
  font-weight: 600;
}

.detail-page {
  padding-top: 20px;
}

.detail-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  gap: 40px;
  justify-content: center;
}

/* --- 1. 書影と販売エリア (左側) --- */
.media-purchase-area {
  display: flex;
}

/* 書影ビューア */
.book-media-viewer {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  width: 325px;
  flex-direction: column;
}


.book-cover-btn-area {
  margin: 0 auto 30px;
}

.book-cover-area {
  gap: 20px;
}

.btn-box {
  margin-top: 20px;
  text-align: center;
}

.zenkan_box {
  padding: 20px;
}

.main-cover {
  flex: 1;
  text-align: center;
  border: 1px solid var(--color-black1);
  width: 320px;
  height: auto;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
}

.main-cover img {
  max-width: 100%;
  height: auto;
}

.book_text {
  margin: 20px 0;
}

.book-tokutten {
  text-align: left;
  font-size: 1rem;
}

.sales-link {
  font-size: 1rem;
  height: 55px;
  max-width: 220px;
  width: 48%;
  border: 1px solid;
}

.sales-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 920px;
  margin: auto;
  justify-content: center;
}

/* 販売リンク */
.purchase-links-list {
  display: grid;
  gap: 15px;
  margin-bottom: 20px;
}

/* SNSシェア */
.detail-social-share {
  text-align: center;
  margin-top: 20px;
}

.detail-social-share p {
  margin-bottom: 10px;
}

.share-text {
  font-size: 1.5rem;
  gap: 6px;
  font-weight: 600;
}

.share-button img {
  width: 40px;
  height: 40px;
}

.button-purchase {
  height: 70px;
  width: 320px;
}

/* --- 2. 情報・コンテンツエリア (右側) --- */
.info-content-area {
  flex: 1;
  max-width: 970px;
  margin: auto;
}

.book-text-box {
  width: 100%;
  max-width: 520px;
}

.book-title-series {
  text-align: center;
}

.book-title-sab {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 500;
}

.book-title-main {
  margin: 10px 0;
  font-size: 1.25rem;
  text-align: center;
  font-weight: 800;
  line-height: 1.5;
}

.book-title-main span {
  font-size: 2.125rem
}

.book-author {
  margin: 15px 0;
  color: var(--color-black2);
  text-align: center;
  font-size: 0.85rem;
}

/* 書籍スペックリスト */
.book-spec-list {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  gap: 5px 20px;
  margin: 1rem auto;
  max-width: 800px;
  text-align: left;
  font-size: 0.825rem;
}

.spec-item {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  white-space: nowrap;
  color: var(--color-black1);
}

.spec-item dt {
  color: var(--color-blue);
  font-weight: bold;
}

.spec-item dd {
  margin: 0;
  font-feature-settings: "palt" 1;
}

/* ナビゲーションボタン */
.volume-nav-buttons {
  display: flex;
  margin: 40px auto 20px;
  gap: 30px;
  justify-content: center;
}

.button-nav {
  position: relative;
  padding: 10px 15px;
  text-align: center;
  width: 200px;
  transition: background-color 0.3s;
  background-color: var(--color-blue);
  color: var(--color-white);
  border-radius: 6px;
}

.button-nav:hover {
  background-color: color-mix(in srgb, var(--color-blue) 80%, white 20%);
}

/* ▶ 右矢印 */
.button-nav.next::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  /* ← ボタン右端からの距離 */
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  /* 縦中央で右向き */
}

/* ◀ 左矢印 */
.button-nav.prev::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 15px;
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(-50%) rotate(-45deg);
}

.btn_gry {
  color: var(--color-white);
  background-color: var(--color-gray);
}

.btn_gry:hover {
  background-color: var(--color-gray);
}

.tab-container {
  width: 100%;
  max-width: 940px;
  display: block;
  margin: auto;
}

/* タブ切り替え */

.tab-content-area {
  background-color: var(--color-white);
  width: 100%;
  margin: auto;
  z-index: 5;
  position: relative;
  border-radius: 5px;
}


.tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: auto;
  width: 95%;
}

.tab-button {
  padding: 10px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -8px;
  background-color: var(--color-yellow2);
  border-radius: 5px;
  z-index: 0;
  color: var(--color-black2);
  width: 45%;
  transition: opacity 0.2s ease;
}

.tab-button:hover {
  opacity: 0.6;
}

.tab-button.active {
  font-weight: bold;
  background-color: var(--color-white);
}


.tab-content {
  width: 100%;
  margin: auto;
  display: none;
  padding: 20px;
  border-radius: 8px;
  line-height: 1.75;
  text-align: justify;
  font-weight: 500;
}


.tab-content p+p {
  margin: 10px 0;
}


.tab-content.active {
  display: block;

}

.tab-content h3 {
  margin-bottom: 15px;
}

.tab-content ul {
  list-style-type: none;
  padding-left: 10px;
}


/* 最下部トップへボタン */
.back-to-top-container {
  text-align: center;
  padding: 50px 20px;
}

.button-large {
  width: 280px;
  height: 60px;
  border: none;
  border-radius: 6px;
  color: var(--color-white);
  background-color: var(--color-blue);
  font-size: 1.5rem;
  display: flex;
  font-weight: bold;
  margin: auto;
  text-align: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  align-items: center;
}

.button-large:hover {
  background-color: color-mix(in srgb, var(--color-blue) 70%, white 20%);
}

.back-to-list-button {
  background-color: var(--color-red);
  width: 100px;
  height: 100px;
  font-size: 1.25rem;
  margin-top: 5px;
  color: var(--color-white);
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 200px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.back-to-list-button:hover {
  background-color: color-mix(in srgb, var(--color-red) 80%, white 20%);
  transform: translateY(2px);
}

.back-to-list-button:active {
  transform: translateY(3px);
}





/* ===== ボタングリッド（3列×複数行） ===== */
.btn-grid {
  display: flex;
  gap: 12px;
  margin: 12px 0 24px;
  flex-wrap: wrap;
  text-align: center;
  justify-content: center;
  max-width: 940px;
  margin: auto;
}

/* ボタン共通 */
.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* 画像とテキストの間隔 */
  width: 280px;
  height: 65px;
  background: var(--color-white);
  color: var(--color-black1);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: filter .2s ease, transform .08s ease;
  overflow: hidden;
  box-sizing: border-box;
}

.site-btn img {
  height: 24px;
  /* ← ロゴの高さ（揃える） */
  width: auto;
  object-fit: contain;
  /* 比率保持 */
  vertical-align: middle;
}

.site-btn:hover {
  filter: brightness(1.07);
}

.site-btn:active {
  transform: translateY(1px);
}

.js-float-sub {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.js-float-sub.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}


/* =======================================
   レスポンシブ対応 (Max-width: 767px)
   ======================================= */
@media (max-width: 767px) {

  .detail-page {
    padding-top: 0px;
  }

  .book-tokutten {
    font-size: 0.875rem;
    margin: 0 10px;
}


  .sales-link {
    width: 31%;
    font-size: 0.8125rem;
    height: 40px;
  }

  .sales-links {
    gap: 5px;
  }

  .btn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* SPは2列 */
  }

  .book_text {
    margin: 10px 0 0 0;
  }

  .tab-content {
    border-radius: unset;
  }

  .detail-container {
    flex-direction: column;
    gap: 5px;
    padding: 0px;
  }

  /* 書影と販売エリア */

  .tmb {
    width: 35px;
    height: 35px;

  }

  .media-purchase-area {
    flex: auto;
    width: 100%;
    /* 幅を画面いっぱいに */
    order: 1;
    /* SPで上に配置 */
  }

  .book-media-viewer {
    width: 50%;
    margin: 20px auto;
  }

  .main-cover {
    width: 100%;
    flex: 1;
    height: unset;
  }

  .tmb-list {
    justify-content: center;
    margin-bottom: unset;
  }

  .purchase-links-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .button-purchase {
    width: 47%;
    font-size: 0.825rem;
    margin: unset;
    height: 50px;
  }

  .share-text {
    font-size: 1rem;
    margin: unset;
  }

  .volume-nav-buttons {
    gap: 10px;
    margin: 20px auto 20px;
  }

  .button-nav {
    font-size: 0.825rem;
    padding: 8px 15px;
  }

  .social-icons {
    gap: 5px;
  }

  .share-button img {
    width: 40px;
    height: 40px;
  }

  .info-separator {
    width: 95%;
    margin: 5px auto;
  }

  .social-share-buttons {
    text-align: center;
    display: flex;
    margin: auto;
    justify-content: center;
    gap: 10px;
    padding: 5px 0;
  }


  .book-title-sab {
    font-size: 1.125rem;
  }

  .site-btn {
    width: 48%;
    height: 50px;
  }

  /* 情報・コンテンツエリア */
  .info-content-area {
    flex: auto;
    order: 2;
  }

  .book-title-series {
    font-size: 0.75rem;
  }


  .book-title-main {
    font-size: 1rem;
    line-height: 1.25;
    margin: 5px 0;
  }

  .book-title-main span {
    font-size: 1.75rem;
  }

  .book-spec-list {
    gap: 5px 15px;
    font-size: 0.75rem;
    margin: 10px auto;
  }

  .button-large {
    width: 240px;
    height: 50px;
    font-size: 1.25rem;
  }

  .book-author {
    font-size: 0.75rem;
    margin: 10px 0;
  }

  .btn-box {
    margin: 20px 0;
  }

  /* タブ */
  .tab-button {
    flex: 1;
    /* タブを均等幅に */
    text-align: center;
  }

  .tab-content ul {
    padding-left: 5px;
  }

  .js-float-sub {
    right: 10px;
    bottom: 10px;
  }

  .tabs {
    gap: 10px;
  }

  .back-to-list-button {
    width: 80px;
    height: 80px;
    font-size: 1rem;
  }

  .tab-content.active {
    font-size: 0.825rem;
    padding: 10px;
  }

  .button-nav.next::after {
    width: 10px;
    height: 10px;
  }

  .button-nav.prev::before {
    width: 10px;
    height: 10px;
  }

  .tab-button {
    font-size: 0.875rem;
  }


  .button-detail {
    width: 180px;
  }

  #index-footer {
    padding: 20px 0px 150px 0px;
  }


}