/* ページ全体の幅と中央寄せ */
.parallel-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.parallel-container h1 {
  font-family: "Georgia", serif;
  font-size: 1.8rem;
  color: #1a252f;
  margin-bottom: 24px;
  text-align: center;
}

/* 2. 左右並び（2列レイアウト）を作るFlexbox設定 */
.layout-wrapper {
  display: flex;
  gap: 24px; /* 左と右の間隔 */
  align-items: flex-start; /* 上揃えにする */
}

/* 3. 左側（メインエリア）の幅設定 */
.main-content {
  flex: 1; /* 残りの幅を全部使う */
  min-width: 0;
}

/* 1段落（対訳）の枠組 */
.parallel-card {
  background: #ffffff;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ① 原文エリアの装飾 */
.original-text {
  margin-bottom: 20px;
}

.original-text p {
  font-family: "Georgia", "Times New Roman", serif; /* 英文学にピッタリな書体 */
  font-size: 1.1rem;
  line-height: 1.75;
  color: #1a1a1a;
  margin: 8px 0 0 0;
}

/* 引用元・リンクエリアをカードのフッターとして装飾 */
.original-text .source-link {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0; /* 点線の区切り線 */
  text-align: right;
  font-family: "Georgia", serif;
  font-size: 0.85rem;
  color: #718096;
}

.original-text .source-link a {
  color: #3182ce;
  text-decoration: none;
  font-weight: 500;
}

.original-text .source-link a:hover {
  text-decoration: underline;
}

/* ② 翻訳エリアの装飾 */
.translation-text {
  border-top: 1px dashed #cbd5e1; /* 原文と訳の区切り点線 */
  padding-top: 16px;
}

.translation-text p {
  font-size: 0.98rem;
  line-height: 1.85;
  color: #475569;                 /* 原文より少しマイルドな色にして主従をつける */
  margin: 8px 0 0 0;
}

/* 「Original」「Translation」の小さなラベルタグ */
.label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background-color: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
}

/* 3. 左側（サイドバー）の幅設定 */
.sidebar {
  flex: 0 0 280px; /* 幅固定：280px */
  /* 固定幅ではなく割合にしたい場合は width: 30%; などでもOK */
}

/* 折りたたみ全体 */
.vocab-accordion {
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  overflow: hidden;
}

/* クリックする見出し部分 */
.vocab-summary {
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: bold;
  color: #334155;
  background-color: #f8fafc;
  cursor: pointer;          /* マウスポインターを指マークにする */
  user-select: none;        /* 連打したときに文字が選択されないようにする */
  transition: background-color 0.2s ease;
}

.vocab-summary:hover {
  background-color: #f1f5f9; /* ホバー時に少し暗くして押しやすく */
}

/* 折りたたみの開閉コンテンツ */
.vocab-content {
  padding: 20px;
  border-top: 1px solid #e0e6ed;
}

/* 単語リスト（<dl>タグのスタイル） */
.vocab-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* レスポンシブ2列配置 */
  gap: 12px 24px;
}

/* 単語と意味のペア */
.vocab-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

/* 単語（見出し） */
.vocab-item dt {
  font-family: "Georgia", serif;
  font-weight: bold;
  color: #0f172a;
  min-width: 110px;
}

/* 意味（説明） */
.vocab-item dd {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
}

/* 折りたたみ和訳全体 */
.transl-accordion {
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  overflow: hidden;
}

.transl-summary {
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: bold;
  color: #334155;
  background-color: #f8fafc;
  cursor: pointer;          /* マウスポインターを指マークにする */
  user-select: none;        /* 連打したときに文字が選択されないようにする */
  transition: background-color 0.2s ease;
}

/* 折りたたみの開閉コンテンツ */
.transl-content {  
  border-top: 1px solid #e0e6ed;
  padding: 20px 28px; /* ★ 上段のカードと同じパディング（横幅28px等）を設定 */
}

/* ★ アコーディオン内の和訳テキストのスタイル調整 */
.transl-content p {
  font-size: 0.98rem;
  line-height: 1.85;
  color: #475569;
  margin: 0;
}

/* ----------------------------------
   レスポンシブ対応（スマホ表示時）
   ---------------------------------- */
@media (max-width: 768px) {
  /* 画面幅が768px以下（スマホ・タブレット等）になったら縦並びに戻す */
  .layout-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    flex: none;
  }
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: #e0e6ed; /* ボタンの背景色 */
  color: #334155;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.pdf-download-btn:hover {
  background-color: #f1f5f9; /* ホバー時の背景色 */
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  padding: 10px 20px;
  
  font-size: 0.9rem;
  font-weight: bold;
  color: #475569;             /* メインテキストに馴染む落ち着いたグレー */
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  text-decoration: none;      /* 下線を消す */
  
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;  /* ホバー時の変化をなめらかに */
}

/* ホバー（マウスを乗せた時）のスタイル */
.back-link:hover {
  color: #1e293b;
  background-color: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-2px); /* ほんの少し上に浮かび上がる */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}