/* スマホ＆標準用 img設定 */
img {
  width: 100%;
  height: auto;
  display: block;
  margin: 2rem 0;
}

.responsive-img {
  max-width: 600px;
  width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
}

/* 全体基本設定 */
body {
  font-family: sans-serif;
  font-size: 0.9em;
  line-height: 1.6;
  color: #111;
  margin: 0;
  padding: 2rem;
  background-color: #fff;
}

h1 {
  font-size: 1.3em;
  margin-bottom: 1rem;
}

p {
  font-size: 1em;
  margin-bottom: 1rem;
}

/* ナビゲーションバー */
.navbar {
  background-color: #f8f8f8;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  gap: 1rem;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.menu a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

.lang-switch {
  white-space: nowrap;
  font-size: 0.9em;
}

.lang-switch a {
  margin: 0 5px;
  text-decoration: none;
  color: #663399;
  font-weight: bold;
}

/* ▼▼ 追加: プルダウンメニュー用 ▼▼ */
.dropdown {
  position: relative;
}
.dropdown > a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  border: 1px solid #ccc;
  min-width: 200px;
  z-index: 10;
  flex-direction: column;
}
.dropdown-content a {
  padding: 10px;
  text-decoration: none;
  color: #333;
  display: block;
}
.dropdown-content a:hover {
  background-color: #f0f0f0;
}
.dropdown:hover .dropdown-content {
  display: flex;
}

/* 共通設定（PCも含む） */
.notice {
  background-color: #fdf6e3;
  border: 1px solid #e0dccc;
  padding: 1rem;
  border-radius: 8px;
  margin: 2rem auto;
  max-width: 800px; /* ← PCでは広くなりすぎないよう制限 */
}

/* スマホ用notice */
@media (max-width: 768px) {
  .notice {
    width: 98%;
    margin: 0 auto;
    padding: 0.5rem 0.5rem;  /* ← 左右の余白を減らす！ */
    box-sizing: border-box;
  }
}

/* 📱 スマホ用：bodyの余白を調整して .notice が左右ぎりぎりまで広がるようにする */
@media (max-width: 768px) {
  body {
    padding: 1rem 1rem; /* 上下1rem、左右0.5remに縮小 */
  }
}

.notice-small {
  font-size: 0.8em;
  color: #c00;
  margin-top: 5px;
}

/* 📦 メソッド説明ボックス：背景色と視認性改善 */
.method-box {
  background-color: #fff8e1;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  color: #333;
}

/* h2 見出しデザイン */
h2 {
  margin-top: 2em;
  border-left: 5px solid #ff9900;
  padding-left: 0.5em;
  font-size: 1.2em;
  margin-bottom: 0.7em;
}

/* h3 見出しデザイン */
h3 {
  margin-top: 1.5em;
  border-left: 5px solid #ff9900;
  padding-left: 0.5em;
  font-size: 1.0em;
  margin-bottom: 0.7em;
}

/* リスト(ul, li)の調整 */
ul {
  padding-left: 1.2em;
}

li {
  margin-bottom: 0.8em;
}

/* 目次リンクスタイル (.toc a) */
.toc a {
  display: block;
  margin-bottom: 0.7em;
  color: #333;
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

/* テーブルスタイル（枠線あり・単線できれいに表示） */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  border: 1px solid #ccc;
}

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

th {
  background-color: #f7f7f7 !important;
}
table, th, td {
  border: 1px solid #ccc !important;
  border-collapse: collapse !important;
}

/* スマホ用レイアウト調整 */
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: center;
  }
  .menu {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
  .lang-switch {
    margin-top: 0.5rem;
  }
}

/* ← PC用フォントサイズ */
@media (min-width: 769px) {
  body {
    font-size: 1.2em;  /* ← ここでPC用フォントサイズを上書き！ */
  }
}

#loading {
  display: none;
  text-align: center;
  margin-bottom: 1rem;
  font-weight: bold;
  color: #663399;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* アコーディオン開くボタン設定 */
.accordion-btn {
  display: inline-block;
  padding: 14px 24px;
  font-size: 1.05em;
  font-weight: bold;
  background-color: #2196f3; /* 🔵 ブルー */
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.2s, transform 0.1s;
  margin: 2rem auto;
}

.accordion-btn:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

/* アコーディオン閉じるボタン設定 */
.accordion-close-btn {
  padding: 0.8em 1.2em;
  font-size: 1em;
  font-weight: bold;
  background-color: #cccccc;
  color: #000;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.accordion-close-btn:hover {
  background-color: #bbbbbb;
}

html {
  scroll-behavior: smooth;
}
