@charset "UTF-8";

/* =========================================================================
   beginner/manga/check-point  運用チェックポイント
   Figma node-id: 2306-43543 (PC 1440px 固定デザイン)
   ========================================================================= */

.manga-page-wrapper {
  background-color: #FFFFFF;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.manga-page-wrapper p,
.manga-page-wrapper h1,
.manga-page-wrapper h2,
.manga-page-wrapper h3 {
  margin: 0;
  padding: 0;
}

.manga-page-wrapper img {
  display: block;
}

/* --- Hero --- */
.manga-hero {
  width: 100%;
  height: 140px;
  background-image: linear-gradient(180.43deg, #3976D5 18.61%, #1F5CBF 74.02%);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.manga-hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0px 4px 7px rgba(30, 95, 173, 0.2));
}

.manga-hero-content h1 {
  font-weight: 700;
  font-size: 40px;
  line-height: 1.7;
  letter-spacing: 1px;
  color: #FFFFFF;
  white-space: nowrap;
}

/* --- Intro & Tab --- */
.manga-intro-section {
  width: 100%;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  flex-shrink: 0;
}

.manga-intro-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  /* hero 下の余白は 40px（top）。左右・下は 36px のまま */
  padding: 4rem 3.6rem 3.6rem;
}

.manga-intro-text {
  box-sizing: border-box;
  max-width: 800px;
  position: relative;
  width: calc(100% - 40px);
  font-weight: 700;
  font-size: 16px; /* /cfd/stocklist/ のリード文（.ta-text-body 16px）と同サイズ */
  text-align: center;
  line-height: 1.7;
  letter-spacing: 1px;
  color: #0A2463;
  padding: 0;
  z-index: 0;
}

.manga-intro-text::before {
  background-color: #FFFFFF;
  content: "";
  height: 100%;
  left: 50%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  z-index: -1;
}

.manga-page-wrapper .manga-intro-text {
  padding: 0;
}

/* SP専用改行（SPでの表示指定は max-width: 939px 内の .manga-intro-br-sp） */
.manga-intro-br-sp {
  display: none;
}

.manga-tab-menu {
  width: min(100%, 838px);
  padding-top: 40px;
  background-color: #FFFFFF;
  border-bottom: 1px solid #D4DCE8;
  display: flex;
  border-radius: 6px;
  margin-top: 0;
}

.manga-tab-item {
  flex: 1 0 0;
  padding: 12px;
  text-align: center;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: #5A6A85;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  min-width: 0;
}

.manga-tab-item.active {
  background-color: transparent;
  border-bottom-color: #1E5FAD;
  color: #1E5FAD;
}

/* --- Manga Content --- */
.manga-content-section {
  width: 100%;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
  gap: 80px;
  flex-shrink: 0;
  overflow: hidden;
}

.manga-content-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.manga-content-header h2 {
  font-weight: 700;
  font-size: 40px;
  line-height: normal;
  color: #0A2463;
  text-align: center;
}

.manga-content-separator {
  width: 100px;
  height: 2px;
  background-color: #FFA54F;
}

.manga-images {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.manga-image-box {
  width: min(620px, calc(100vw - 40px));
  aspect-ratio: 522 / 738;
  height: auto;
  position: relative;
}

.manga-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Full-bleed backgrounds --- */
body.beginner-manga-page {
  margin: 0;
  overflow-x: hidden;
}

.manga-page-wrapper {
  max-width: none;
  overflow-x: clip;
}

.manga-hero,
.manga-intro-section,
.manga-content-section,
.manga-flow-section,
.manga-deposit-section,
.manga-select-section {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

@media (max-width: 939px) {
  body.beginner-manga-page .header-for-triauto .navigation .header__nav--icon {
    bottom: 80px;
  }

  .manga-hero {
    height: 156px;
  }

  .manga-hero-content h1 {
    font-size: 28px;
    line-height: 1.7;
    text-align: center;
  }

  .manga-hero-content h1 span {
    display: block;
  }

  .manga-intro-text {
    box-sizing: border-box;
    font-size: 16px; /* PC同様 /cfd/stocklist/ リード文と同サイズ */
    line-height: 1.7;
    max-width: none;
    padding: 0 20px;
    width: 100%;
  }

  /* PC専用改行はSPでは非表示 */
  .manga-intro-br-pc {
    display: none;
  }

  /* SP専用改行を有効化（PC側の非表示指定はベースの .manga-intro-br-sp） */
  .manga-intro-br-sp {
    display: inline;
  }

  .manga-page-wrapper .manga-intro-text {
    padding: 0 20px;
  }

  .manga-intro-inner {
    align-items: stretch;
    /* SPのタブメニュー⇔h2 の余白は .manga-content-section の padding-top 40px のみで作る
       （PC用の padding-bottom 36px が加算されて 76px になるのを防ぐ） */
    padding-bottom: 0;
  }

  /* SPは h2ブロック⇔マンガ画像の間 40px（PCは基本の gap: 80px のまま） */
  .manga-content-section {
    gap: 40px;
  }

  /* タブ列は常に中央寄せ・下線(border-bottom)はタブ幅ぶんだけ。
     幅が足りない時のみ overflow-x: auto で横スクロール（左寄せ全幅にしない） */
  .manga-tab-menu {
    align-self: center;
    border-radius: 0;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 40px 0 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: fit-content;
  }

  .manga-tab-menu::-webkit-scrollbar {
    display: none;
  }

  .manga-tab-item {
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1.4;
    padding: 12px;
    white-space: nowrap;
  }

  .manga-content-header h2 {
    color: #0A2463;
    font-size: min(28px, calc((100vw - 40px) / 10.5));
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.7;
    max-width: calc(100vw - 40px);
    text-align: center;
    white-space: nowrap;
  }
}

body.beginner-manga-page .cta-area { display: none; }
