/* =========================================================
   Base & Reset
========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #fdf8f2;
  color: #333;
  line-height: 1.8;
  font-size: 19px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   Container
========================================================= */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================================
   はじめに セクション
========================================================= */
.intro-section {
  background: linear-gradient(160deg, #fff8ef 0%, #fdf0e0 100%);
  padding: 40px 0 50px;
  border-bottom: 3px dashed #e8d5c0;
}

.intro-inner {
  text-align: center;
}

.intro-lead {
  font-size: 21px;
  color: #888;
  margin-bottom: 8px;
}

.intro-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 34px;
  font-weight: 700;
  color: #3a3a3a;
  line-height: 1.5;
  margin-bottom: 14px;
}

.intro-sub {
  font-size: 20px;
  color: #888;
  margin-bottom: 32px;
}

.intro-body {
  text-align: left;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.intro-body p {
  margin-bottom: 16px;
  color: #444;
  font-size: 19px;
}

.intro-body p:last-child {
  margin-bottom: 0;
}

.intro-quote {
  background: #fff8e1;
  border-left: 4px solid #f5c842;
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  font-weight: 700;
  color: #333;
}

/* =========================================================
   目次
========================================================= */
.toc-section {
  background: #fff;
  padding: 50px 0;
  border-bottom: 2px solid #f0e8de;
}

.toc-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 29px;
  font-weight: 700;
  color: #3a3a3a;
  text-align: center;
  margin-bottom: 28px;
  position: relative;
}

.toc-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #f5c842;
  margin: 8px auto 0;
  border-radius: 2px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fdf8f2;
  border: 1px solid #f0e4d0;
  font-size: 18px;
  color: #555;
  transition: all 0.2s ease;
}

.toc-list li a:hover {
  background: #fff0d6;
  border-color: #f5c842;
  color: #333;
  transform: translateX(4px);
}

.toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: #f5c842;
  color: #fff;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

/* =========================================================
   コンテンツセクション 共通
========================================================= */
.content-section {
  padding: 56px 0;
  border-bottom: 1px solid #ede6dc;
}

.content-section.alt-bg {
  background: #fff;
}

.section-title-wrap {
  margin-bottom: 28px;
  text-align: center;
}

.section-title {
  display: inline-block;
  font-family: 'Noto Serif JP', serif;
  font-size: 23px;
  font-weight: 700;
  color: #3a3a3a;
  background: #e8f3ff;
  padding: 10px 28px;
  border-radius: 40px;
  letter-spacing: 0.04em;
}

.section-image {
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  max-height: 240px;
}

.section-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
}

.section-intro {
  margin-bottom: 28px;
}

.section-intro p {
  font-size: 19px;
  color: #555;
  margin-bottom: 8px;
}

.section-lead {
  text-align: center;
  font-size: 20px;
  color: #666;
  margin-bottom: 28px;
}

.sub-heading {
  font-weight: 700;
  font-size: 20px;
  color: #4a7fc4;
  margin: 28px 0 12px;
  padding-left: 10px;
  border-left: 4px solid #4a7fc4;
}

/* =========================================================
   会話ボックス
========================================================= */
.dialogue-box {
  background: #fff8f0;
  border: 1.5px solid #e8d5c0;
  border-radius: 14px;
  padding: 20px 18px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 1行 = 英語 ＋ 日本語訳 */
.dialogue-row {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-radius: 8px;
  gap: 3px;
}

.dialogue-row.you-row {
  background: #fff3ee;
}

.staff {
  color: #4a90d9;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.6;
}

.you {
  color: #e07a5f;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.6;
}

.ja-text {
  color: #888;
  font-size: 14px;
  line-height: 1.5;
  padding-left: 2px;
}

.dialogue-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 12px 0;
}

.dialogue-ja-label {
  font-size: 17px;
  font-weight: 700;
  color: #888;
  margin-bottom: 10px;
}

.dialogue-note {
  font-size: 14px;
  color: #aaa;
  font-style: italic;
  padding: 4px 10px;
}

/* =========================================================
   フロー
========================================================= */
.flow-block {
  margin-bottom: 24px;
}

.flow-label {
  font-weight: 700;
  font-size: 18px;
  color: #4a90d9;
  margin-bottom: 10px;
}

/* =========================================================
   フレーズリスト
========================================================= */
.phrase-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.phrase-item {
  background: #fff;
  border: 1px solid #e8ddd0;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phrase-en {
  font-size: 20px;
  font-weight: 600;
  color: #3a3a3a;
}

.phrase-ja {
  font-size: 17px;
  color: #888;
}

/* =========================================================
   単語カードグリッド
========================================================= */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.vocab-card {
  background: #fff;
  border: 1px solid #e8ddd0;
  border-radius: 12px;
  padding: 14px 14px;
  text-align: center;
}

.vocab-card.highlight-card {
  background: #fff8e1;
  border-color: #f5c842;
}

.vocab-en {
  font-size: 15px;
  font-weight: 700;
  color: #3a7ac4;
  margin-bottom: 4px;
}

.vocab-ja {
  font-size: 14px;
  color: #777;
}

/* =========================================================
   まとめ表
========================================================= */
.vocab-label {
  font-size: 18px;
  font-weight: 700;
  color: #555;
  margin: 28px 0 12px;
}

.vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
  margin-bottom: 28px;
}

.vocab-table td {
  border: 1px solid #e0d4c0;
  padding: 10px 14px;
  background: #fff;
}

.vocab-table tr:nth-child(even) td {
  background: #fdf8f2;
}

.vocab-table td:first-child {
  font-weight: 600;
  color: #4a7fc4;
  width: 55%;
}

.vocab-table td:last-child {
  color: #555;
}

/* =========================================================
   経験談メモ
========================================================= */
.memo-box {
  background: #fffbf0;
  border: 1.5px solid #f5c842;
  border-radius: 14px;
  padding: 20px 20px;
  margin: 28px 0;
}

.memo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.memo-wakana-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  float: right;
  margin: 0 0 10px 14px;
  border: 3px solid #f5c842;
  shape-outside: circle();
}

.memo-icon {
  font-size: 18px;
}

.memo-title {
  font-weight: 700;
  font-size: 18px;
  color: #b8860b;
}

.memo-box p {
  font-size: 18px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 8px;
}

.memo-box p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   注意ボックス
========================================================= */
.note-box {
  background: #fff0f0;
  border: 1.5px solid #f5a0a0;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 17px;
  color: #c0392b;
  margin: 16px 0 24px;
}

/* =========================================================
   キーフレーズボックス
========================================================= */
.key-phrases-box {
  background: #e8f4ff;
  border: 2px solid #4a90d9;
  border-radius: 14px;
  padding: 20px 22px;
  margin: 20px 0 28px;
  text-align: center;
}

.key-phrases-label {
  font-weight: 700;
  font-size: 17px;
  color: #4a90d9;
  margin-bottom: 12px;
}

.key-phrases-box p {
  font-size: 20px;
  color: #2c6fb8;
  font-weight: 600;
  margin-bottom: 6px;
}

/* =========================================================
   アプリタグ
========================================================= */
.app-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.app-tag {
  display: inline-block;
  background: #4a90d9;
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 17px;
  font-weight: 700;
}

/* =========================================================
   Word Swap（ファストフード）
========================================================= */
.word-swap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 18px;
  color: #555;
}

/* =========================================================
   パターンブロック（最低限フレーズ）
========================================================= */
.pattern-blocks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.pattern-block {
  background: #fff;
  border: 1.5px solid #e8ddd0;
  border-radius: 16px;
  padding: 20px 20px;
  position: relative;
}

.pattern-num {
  position: absolute;
  top: -14px;
  left: 18px;
  background: #f5c842;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.pattern-formula {
  font-size: 23px;
  font-weight: 700;
  color: #4a90d9;
  margin-bottom: 4px;
  margin-top: 4px;
}

.pattern-meaning {
  font-size: 17px;
  color: #888;
  margin-bottom: 14px;
}

.pattern-examples p {
  font-size: 18px;
  color: #555;
  padding: 6px 12px;
  background: #fdf8f2;
  border-radius: 8px;
  margin-bottom: 6px;
}

.pattern-examples p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   おわりに
========================================================= */
.outro-section {
  background: linear-gradient(160deg, #fff8ef 0%, #fdf0e0 100%);
  padding: 60px 0 80px;
}

.outro-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 31px;
  font-weight: 700;
  color: #3a3a3a;
  text-align: center;
  margin-bottom: 36px;
  position: relative;
}

.outro-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #f5c842;
  margin: 8px auto 0;
  border-radius: 2px;
}

.outro-body {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}

.outro-body p {
  font-size: 19px;
  color: #555;
  margin-bottom: 18px;
  line-height: 1.9;
}

.outro-note {
  background: #fdf8f2;
  border-left: 4px solid #f5c842;
  padding: 16px 18px;
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
}

.outro-note p {
  font-size: 18px;
  margin-bottom: 8px;
}

.outro-steps {
  background: #e8f4ff;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 20px 0;
}

.outro-steps p {
  font-size: 18px;
  margin-bottom: 8px;
}

.outro-steps ul {
  list-style: none;
  padding-left: 0;
  margin: 4px 0 12px;
}

.outro-steps ul li {
  font-size: 18px;
  color: #4a90d9;
  font-weight: 600;
  padding: 4px 0 4px 20px;
  position: relative;
}

.outro-steps ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #4a90d9;
}

.outro-final {
  text-align: center;
  font-size: 23px !important;
  font-weight: 700 !important;
  color: #3a3a3a !important;
  margin-top: 24px !important;
  padding-top: 20px;
  border-top: 1px dashed #ddd;
}

/* =========================================================
   Back to Top
========================================================= */
.back-to-top {
  display: block;
  text-align: center;
  background: #4a90d9;
  color: #fff;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  transition: background 0.2s;
}

.back-to-top:hover {
  background: #3a7fc8;
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 480px) {
  .intro-title {
    font-size: 26px;
  }

  .section-title {
    font-size: 20px;
    padding: 8px 20px;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .vocab-card {
    padding: 10px 10px;
  }

  .vocab-en {
    font-size: 14px;
  }

  .vocab-ja {
    font-size: 13px;
  }

  .pattern-formula {
    font-size: 20px;
  }

  .outro-body {
    padding: 24px 18px;
  }

  .dialogue-box {
    padding: 18px 14px;
  }
}
