/* === 全体設定 === */

body {
  font-size: 18px;
  font-family: "Rounded M+ 1c", sans-serif;
  line-height: 1.8;
  padding: 1em;
  margin: 0 auto;
  max-width: 600px;
  background-color: #fff;
  /*color: #0075c1;*/
}

/* === ヘッダー === */
header {
  text-align: center;
  margin-bottom: 2em;
}

/* === 見出しスタイル === */
h1 {
  font-size: 1.3em;
  font-weight: bold;
  color: #333;
  border-bottom: 3px solid #0075c1;
  padding-bottom: 0.5em;
}

h2 {
  font-size: 1.1em;
  color: #0075c1;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  border-left: 6px solid #0075c1;
  padding-left: 0.6em;
  background-color: #ebf1fd;
}

h3 {
  font-size: 1.0em;
  color: #0075c1;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  padding-left: 0.6em;
  /*background-color: #ebf1fd;*/
}
h3 + p {
  margin-left: 0.8em; /* ほんの少し右寄せ */
}
h4 {
  font-size: 1.0em;
  margin-top: 1.2em;
  margin-bottom: 0.3em;
  padding-left: 0.5em;
  background-color: #e3f2fd;
  font-weight: normal; /* 太字を解除 */
}

/* === 画像 === */
img {
  max-width: 100%;
  height: auto;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

/* === フッター === */
footer {
  margin-top: 2em;
  padding: 1em 0 3em;
  text-align: center;
  background-color: #f9f9f9;
  font-size: 0.9em;
}
footer .chapter-nav {
  font-size: 0.85em; /* または 14px などでもOK */
  text-align: center;
  margin-bottom: 12px;
  margin-bottom: 0.5em;
  line-height: 1.8; /* ← ここを追加！ */

}

footer .chapter-nav a {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background-color: #0077cc;
  /*margin: 0 0.3em;*/
  padding: 0.3em 0.6em;
  text-decoration: none;
  border-radius: 0.5em;
  transition: background-color 0.3s;
  display: inline-block; /* 安定表示 */
  margin: 4px 6px;        /* ← 縦方向にも少し余白を追加 */
}

footer .nav-links {
  margin-bottom: 3em;
}

footer .nav-links a:hover {
  background-color: #3aa100;
}
footer .chapter-nav a:hover {
  background-color: #3aa100;
  text-decoration: underline;
}

footer .chapter-nav a.active {
  background-color: #3aa100;
  color: #fff;
  font-weight: bold;
}

/* === クイズ・選択ボタン系 === */
.quiz-section button,
.interest-section button {
  margin: 0.3em;
  padding: 0.5em 1em;
  font-size: 1em;
  border: none;
  border-radius: 0.5em;
  background-color: #f57c00;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s;
}

.quiz-section button:hover,
.interest-section button:hover {
  background-color: #ef6c00;
}

/* === unused block ===
.result {
  font-weight: bold;
  margin-top: 0.5em;
}
=== end unused block === */


/* === unused block ===
.quiz-answer {
  margin-top: 1em;
  font-weight: bold;
  color: #f57c00;
}
=== end unused block === */

/* === unused block ===
.quiz-answer {
  margin-top: 1em;
  font-weight: bold;
  font-size: 1.1em;
}
=== end unused block === */

.quiz-answer.correct {
  color: green;
}

.quiz-answer.incorrect {
  color: red;
}

/* === unused block ===
.box {
  font-size: 18px; !important;
  border: 2px solid #0075c1;
  background-color: #fff8e7;
  padding: 20px;
  border-radius: 12px;
  margin: 30px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
=== end unused block === */
.box h2 {
  font-size: 1.4em;
  margin-bottom: 1em;
  color: #0075c1;
}
section.box > h2 {
  font-size: 1.2em;
  /*color: #0075c1;*/
  border-left: 6px solid #0075c1;
  padding-left: 12px;
  margin-bottom: 1em;
  margin-top: 0;
  font-weight: bold;
  background-color: transparent;
}

/* === unused block ===
.quiz-box {
  border: 2px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  margin: 20px auto;
  max-width: 500px;
  background: #f9f9f9;
  text-align: center;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.05);
}
=== end unused block === */

/* === unused block ===
.quiz-question {
  font-size: 18px;
  margin-bottom: 12px;
}
=== end unused block === */

.quiz-buttons button {
  font-size: 16px;
  padding: 8px 20px;
  margin: 6px;
  border-radius: 8px;
  border: none;
  background-color: #eee;
  cursor: pointer;
  transition: background 0.2s;
}

.quiz-buttons button:hover {
  background-color: #ddd;
}

/* === unused block ===
.result {
  font-size: 16px;
  font-weight: bold;
  margin-top: 10px;
}
=== end unused block === */



/* === unused block ===
.chapter-card {
  background-color: #f9f9ff;
  border: 1px solid #0075c1;
  border-radius: 12px;
  padding: 16px;
  margin: 16px auto;
  max-width: 600px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.05);
  transition: background-color 0.3s;
}
=== end unused block === */

.chapter-card:hover {
  background-color: #eef3ff;
}

.chapter-card h3 {
  font-size: 19px;
  font-weight: bold;
  color: #333;
  margin-bottom: 6px;
  background-color: transparent;
  border-left: none;
  padding-left: 0;
}


.chapter-card p {
  font-size: 18px;
  margin: 0;
  color: #333;
}

/* === unused block ===
.btn {
  display: block;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  margin: 16px auto;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  color: #fff;
}
=== end unused block === */

/* === unused block ===
.btn-green {
  background-color: #0075c1;
}
=== end unused block === */

.btn-green:hover {
  background-color: #2a7b00;
}

/* === unused block ===
.btn-orange {
  background-color: #f6a13c;
}
=== end unused block === */

.btn-orange:hover {
  background-color: #e3841e;
}

textarea {
  width: 100%;
  box-sizing: border-box; /* ← これが重要！ */
  font-size: 18px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
}

/* === unused block ===
.footer-nav-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap; /* ←ここで折り返さないように */
  margin: 24px 0;
  padding: 0 8px;
  overflow-x: auto; /* ←画面に入らないときに横スクロール対応 */
}
=== end unused block === */

.footer-nav-links a {
  width: 45vw; /* ←画面の横幅に応じて可変！スマホ対応！ */
  max-width: 200px;
  min-width: 100px;
  display: inline-block !important;
  text-align: center;
  white-space: nowrap;
}
/*コラム*/
/* === unused block ===
.liff-column {
    background-color: #f5f5f5;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
=== end unused block === */

/* === unused block ===
.column-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #2f4f4f;
    margin-bottom: 10px;
    background-color: transparent; /* 背景色をクリア */
    padding-left: 0;
    border-left: none;
}
=== end unused block === */

/* === unused block ===
.column-content {
    font-size: 1em;
    color: #333;
    line-height: 1.6;
    word-break: break-word;
}
=== end unused block === */

@media (max-width: 600px) {
/* === unused block ===
    .liff-column {
        padding: 15px;
    }
=== end unused block === */

/* === unused block ===
    .column-title {
        font-size: 1.1em;
    }
=== end unused block === */

/* === unused block ===
    .column-content {
        font-size: 0.95em;
    }
=== end unused block === */
}
/* === サブタイトルスタイル === */

.sub-title {
  font-size: 0.8em;
  color: #0085b2;
  margin-top: -0.5em;
  margin-left: 0.5em;
  margin-bottom: 0.6em; /* ← ここを小さくする */
}
/* リンクの見た目を通常の文字と同じに */
.sub-title a {
  color: inherit;
  text-decoration: none;
}
/* === ボイススタイル === */

.voice-title {
  font-size: 0.8em;
  color: #0085b2;
  text-align: center;
  margin-top: 0.01em;   /* ← ここで上の余白を小さく！ */
  margin-bottom: 0.01em; /* 下の余白もお好みで */
  }
/* リンクの見た目を通常の文字と同じに */
.voice-title a {
  color: inherit;
  text-decoration: none;
}
/* === テーブルスタイル === */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

th, td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

th {
  background-color: #f0f0f0;
  font-weight: bold;
  text-align: center;
}

/* 一列目の幅を最低30%に指定 */
td:first-child, th:first-child {
  width: 30%;
}

@media (max-width: 600px) {
  th, td {
    font-size: 0.9em;
    padding: 6px;
  }
}
/* === ポイントテーブルスタイル === */
/* === unused block ===
.point-box {
  border: 3px solid #0075c1;
  border-radius: 12px;
  background: #fffaf0; /* ← テーブルと同じ背景にする */
  overflow: hidden;
  width: 100%;
  margin: 1em 0;
}
=== end unused block === */

/* タイトル部分だけ上を丸くする */
/* === unused block ===
.point-title {
  background: #0075c1;
  color: white;
  font-size: 1.2em;
  padding: 0.8em 1em;
  border-bottom: 1px solid #0075c1;
}
=== end unused block === */

/* テーブル本体 */
/* === unused block ===
.point-table {
  width: 100%;
  border-collapse: collapse;
  background: #fffaf0;
}
=== end unused block === */

.point-table td {
  border-bottom: 1px solid #cce5f5;
  /*padding: 0.8em 1em;*/
  padding: 0.4em 1em; /* ← 上下を少し縮める */
  font-size: 1em;
  line-height: 1.6;
}
.point-table tr:first-child td {
  border-top: none;
}

.point-table tr:last-child td {
  border-bottom: none;
}
/* === 吹き出しスタイル === */
/* === unused block ===
.chat {
  display: flex;
  align-items: flex-start;
  margin: 1em 0;
}
=== end unused block === */

.chat.left {
  flex-direction: row;
}

.chat.right {
  flex-direction: row-reverse;
}

/* === unused block ===
.icon {
  width: 64px;
  height: 64px;
  border-radius: 0;
  margin: 0 10px;
}
=== end unused block === */

/* === unused block ===
.bubble {
  max-width: 90%;
  background: #f0f0f0;
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
  font-size: 0.95em;
  line-height: 1.4;
}
=== end unused block === */

/* 吹き出しの矢印（左） */
.chat.left .bubble::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 10px;
  border: 10px solid transparent;
  border-right-color: #f0f0f0;
}

/* 吹き出しの矢印（右） */
.chat.right .bubble::before {
  content: "";
  position: absolute;
  right: -10px;
  top: 10px;
  border: 10px solid transparent;
  border-left-color: #f0f0f0;
}

/* === 雲の枠スタイル === */
/* === unused block ===
.cloud-box {
  background: #fffaf0; /* 雲っぽい淡い水色 */
  padding: 0.8em 1.5em; /* ← 上下を小さく、左右はそのまま */
  border-radius: 2em; /* 角を丸く＝雲っぽさのコツ */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05); /* ふわっとした影 */
  list-style-type: none;
  margin: 1em 0;
  border: 2px solid  #0075c1;
  /*border: 2px dashed #0075c1;*/ /* ちょっとポップに */
}
=== end unused block === */

.cloud-box li {
  margin: 0.5em 0;
  font-size: 1em;
  position: relative;
  padding-left: 1.2em;
}

/* 任意：ふきだしっぽい点をつける */
.cloud-box li::before {
  content: "☁️";
  position: absolute;
  left: 0;
  top: 0;
}
/* === 画像レイアウト === */

/* === unused block ===
.image-grid {
  display: grid;
  /*grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));*/
  grid-template-columns: repeat(2, 1fr); /* ← 横2列に固定！ */
  gap: 1em;
  max-width: 800px;
  margin: 0 auto;
}
=== end unused block === */

.image-grid figure {
  margin: 0;
  text-align: center;
}

.image-grid img {
  width: 100%;
  border-radius: 12px;
}

.image-grid figcaption {
  margin-top: 0.5em;
  font-size: 0.9em;
  color: #444;
}
/* スマホで一列にした場合コメントアウト
@media (max-width: 600px) {
/* === unused block ===
  .image-grid {
    grid-template-columns: 1fr; /* スマホは1列に */
  }
=== end unused block === */
}
*/

/* === ちょっとしたスペースレイアウト === */
/* === unused block ===
.space-half {
  height: 0.75em;
}
=== end unused block === */

/* === ページ毎の目次 === */
/* === unused block ===
  .mini-toc {
    font-size: 0.85em;
    background: #fffaf0;
    border: 1px solid #ccc;
    padding: 0.8em 1em;
    margin: 1.5em 0 2em;
    border-radius: 8px;
  }
=== end unused block === */

/* === unused block ===
  .mini-toc-title {
    font-weight: bold;
    color: #ffffff;               /* フォント白 */
    font-size: 1em;
    margin: 0 0 0.6em 0;
    padding: 0.4em 0.6em;
    background: #1578d6;          /* 濃い青の背景 */
    border-radius: 6px;
  }
=== end unused block === */

  .mini-toc ul {
    list-style-type: none;
    margin: 0;
    padding-left: 0;
  }

  .mini-toc li {
    margin: 0;
    padding: 0.4em 0;
    border-bottom: 1px solid #ddd;
  }

  .mini-toc li:last-child {
    border-bottom: none;
  }

  .mini-toc a {
    color: #000000;               /* 黒文字に変更 */
    text-decoration: none;
  }

  .mini-toc a:hover {
    text-decoration: underline;
  }

.card-container {
  perspective: 1000px;
  width: 80%; /* ← 画面幅の90%にする（好きな数字でOK） */
  /*max-width: 300px;  ← 最大幅も設定するときれい */
  aspect-ratio: 4 / 5; /* ← インスタ投稿用1080×1350の比率にピッタリ！ */
  /*margin: 20px auto;*/
  margin: 5px auto; /* ← さらに縮めてテスト */
  cursor: pointer;
}
.card-container * {
  margin: 0;
  padding: 0;
}
  @media screen and (max-width: 768px) {
.card-container {
  width: 100%; /* ← 画面幅の90%にする（好きな数字でOK） */
}
  }
.card {
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  position: relative;
}

.card.is-flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
}

.card-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

/* 裏面 */
.card-back {
  transform: rotateY(180deg);
}

.sc01-text {
  background-color: #f0f8ff;
  padding: 1em;
  border-radius: 8px;
  margin-bottom: 1.5em;
}

.sc02-text {
  background-color: #fff8dc;
  padding: 1em;
  border-radius: 8px;
  margin-bottom: 2em;
}

.sc03-text {
  background-color: #f8fff4;
  padding: 1em;
  border-radius: 8px;
  margin-bottom: 2em;
}

.sc04-text {
  background-color: #fff3f3;
  padding: 1em;
  border-radius: 8px;
  margin-bottom: 2em;
}

/* === unused block ===
.next-card-link {
  text-align: center;
  margin-top: 2em;
}
=== end unused block === */

.next-card-link a {
  display: inline-block;
  background-color: #ffa726;
  color: #ffffff !important;
  padding: 0.7em 1.5em;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: bold;
}

.next-card-link a:hover {
  background-color: #fb8c00;
}
/* === unused block ===
.download-button {
  text-align: center;
  margin-top: 2em;
}
=== end unused block === */

.download-button a {
  display: inline-block;
  background-color: #4caf50;
  color: #ffffff !important;
  padding: 0.7em 1.5em;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: bold;
}

.download-button a:hover {
  background-color: #388e3c;
}
/*ボタン*/
/* === unused block ===
.btn {
    background-color: #00b900;
    color: white !important;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin: 10px 0;
}
=== end unused block === */
/* === unused block ===
.section {
    margin-bottom: 60px;
}
=== end unused block === */
/*音声ファイル用*/
.audio-wrapper {
  margin-top: 1em;
  margin-bottom: 1em;
  text-align: center;
}
.audio-wrapper audio {
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
}

/*add*/

.card-detail {
  max-width: 600px;
  margin: 2em auto;
  text-align: center;
}

.toggle-button {
  background-color: #3aa100;
  color: #fff;
  padding: 0.6em 1.2em;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  margin-bottom: 1em;
}

.detail-box {
  display: none;
  text-align: left;
  margin: 1em 0;
}

.detail-box.open {
  display: block;
}

.card-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2em;
}

.nav-button {
  background-color: #f57c00;  /* ← オレンジ色に変更 */
  color: #ffffff;             /* ← 白文字！ */
  text-decoration: none;
  padding: 0.5em 1em;
  border-radius: 6px;
  font-weight: bold;
}
.nav-button.disabled {
  background-color: #ccc;      /* グレー */
  color: #666;                 /* 薄い文字色 */
  pointer-events: none;       /* クリック不可にする */
  cursor: default;            /* カーソルを通常に */
}

.nav-button:hover {
  background-color: #ef6c00;  /* 濃いめオレンジでホバー */
}