/* ------------------------------
   ベース設定
------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI",
    "YuGothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.7;
  color: #222;
  background-color: #f7f7f9;
}

/* リンク */

a {
  color: #1565c0;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* レイアウト用共通ラッパー */

.p-chapter__inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ------------------------------
   ヘッダー
------------------------------ */

.p-chapter__header {
  background: linear-gradient(135deg, #ffb6c1 0%, #ffd6a5 50%, #fff 100%);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.p-chapter__label {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  color: #555;
}

.p-chapter__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 700;
  color: #222;
}

.p-chapter__lead {
  margin: 0;
  font-size: 0.95rem;
  color: #444;
}

/* ------------------------------
   メイン領域
------------------------------ */

.p-chapter__main {
  padding: 2rem 0 3rem;
}

/* セクション */

.c-chapter-section {
  background-color: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
}

.c-chapter-section__title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-left: 4px solid #ff8a80;
  padding-left: 0.6rem;
}

.c-chapter-section__subtitle {
  margin: 1.4rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

/* テキスト要素 */

.c-chapter-section p {
  margin: 0.4rem 0;
}

.c-chapter-section ul,
.c-chapter-section ol {
  margin: 0.4rem 0 0.8rem 1.25rem;
  padding: 0;
}

.c-chapter-section li {
  margin-bottom: 0.25rem;
}

/* 引用・補足・ボックス */

.c-quote {
  margin: 0.8rem 0;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid #ffb74d;
  background-color: #fff8e1;
  border-radius: 0.5rem;
  font-size: 0.95rem;
}

.c-note {
  margin: 0.9rem 0 0.3rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 0.5rem;
  background-color: #e3f2fd;
  color: #134b86;
}

.c-box {
  margin: 0.9rem 0;
  padding: 0.9rem 0.95rem;
  border-radius: 0.75rem;
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  font-size: 0.95rem;
}

/* 章末まとめ */

.c-chapter-summary {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem 1.25rem;
  border-radius: 0.75rem;
  background-color: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
}

.c-chapter-summary__title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-left: 4px solid #90caf9;
  padding-left: 0.6rem;
}

.c-chapter-summary ul {
  margin: 0.4rem 0 0.4rem 1.25rem;
}

.c-chapter-summary li {
  margin-bottom: 0.3rem;
}

/* ------------------------------
   ナビゲーション
------------------------------ */

.c-chapter-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

.c-chapter-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid #cfd8dc;
  background-color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.c-chapter-nav__link--prev {
  align-self: flex-start;
}

.c-chapter-nav__link--next {
  align-self: flex-end;
}

.c-chapter-nav__link:hover,
.c-chapter-nav__link:focus {
  text-decoration: none;
  background-color: #e3f2fd;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

/* ------------------------------
   フッター
------------------------------ */

.p-chapter__footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1rem 0 1.5rem;
  background-color: #f2f4f7;
  font-size: 0.8rem;
  color: #666;
}

.p-chapter__credit {
  margin: 0;
}

/* ------------------------------
   モバイル用微調整（〜599px）
   ※基本モバイルファーストなので、ここは細かい調整だけ
------------------------------ */

@media (max-width: 599px) {
  .p-chapter__header {
    padding: 2rem 0 1.6rem;
  }

  .p-chapter__title {
    font-size: 1.35rem;
  }

  .p-chapter__lead {
    font-size: 0.9rem;
  }

  .c-chapter-section {
    padding: 1.25rem 1rem;
  }

  .c-chapter-summary {
    padding: 1.25rem 1rem;
  }

  .c-chapter-nav__link {
    width: 100%;
  }
}

/* ------------------------------
   タブレット以上（600px〜）
------------------------------ */

@media (min-width: 600px) {
  .p-chapter__header {
    padding: 3rem 0 2.5rem;
  }

  .p-chapter__title {
    font-size: 1.8rem;
  }

  .p-chapter__lead {
    font-size: 1rem;
    max-width: 46rem;
  }

  .c-chapter-section {
    padding: 1.75rem 1.8rem;
    margin-bottom: 1.75rem;
  }

  .c-chapter-summary {
    padding: 1.75rem 1.8rem;
  }

  .c-chapter-section__title,
  .c-chapter-summary__title {
    font-size: 1.2rem;
  }

  .c-chapter-section__subtitle {
    font-size: 1.05rem;
  }

  .c-chapter-nav {
    flex-direction: row;
    justify-content: space-between;
  }

  .c-chapter-nav__link {
    min-width: 13rem;
  }
}

/* ------------------------------
   PCレイアウト（960px〜）
------------------------------ */

@media (min-width: 960px) {
  .p-chapter__main {
    padding: 2.5rem 0 4rem;
  }

  .p-chapter__inner {
    padding: 0 1.5rem;
  }

  body {
    background: radial-gradient(circle at top, #ffffff 0, #f5f6fa 55%, #edf0f5 100%);
  }
}
