* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Yu Gothic", sans-serif;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.site-title {
  margin: 0;
  font-size: 1.2em;
  font-size:24px;
}

.menu-toggle {
  display: none; /* PCでは非表示 */
  font-size: 1.5em;
  background: none;
  border: none;
  cursor: pointer;
}

.container {
  display: flex;
}

/* サイドバー */
.sidebar {
  width: 200px;
  background: #fff;
  border-right: 1px solid #ddd;
  padding: 0;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li {
  padding: 0px;
}

.sidebar .menu-title {
  padding: 10px;
  background: #000;
  color: #fff;
  font-weight: bold;
}

/* コンテンツ */
.content {
  font-size: 16px;
  line-height: 1.6;
  flex: 1;
  padding: 20px;
  width: calc(100% - 200px); /* サイドバーの幅を差し引いた幅 */
}

/* h2のスタイル */
    .content h2 {
      font-size: 22px;
      display: block;         /* h2はブロック要素なので通常不要だけど明示 */
      border-bottom: 2px solid #000; /* 線の太さ・色は調整可 */
      padding-bottom: 0.2em;  /* 文字と線の間に少し余白を入れる */
      margin: 1em 0 1em 0;              /* 必要に応じて調整 */
      width: 90%;
    }

/* スマホ/タブレット用 */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .content {
    font-size: 14px;
    width: 100%; /* スマホでは画面幅いっぱいにする */
    padding: 10px;
  }

  .content h2 {
    font-size: 16px;
  }

  .sidebar {
    position: fixed;
    left: -220px;
    top: 0;
    height: 100%;
    width: 200px;
    background: #fff;
    border-right: 1px solid #ddd;
    transition: left 0.3s;
    z-index: 1000;
    overflow-y: auto;   /* 縦スクロールを有効化 */
    -webkit-overflow-scrolling: touch; /* iOSでのスムーズスクロール */
  }

  .sidebar.open {
    left: 0;
  }

  .menu-toggle {
    display: block;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1100;
    font-size: 1.5em;
    background: #fff;           /* 白背景 */
    border: 2px solid #000;     /* 黒い枠線 */
    border-radius: 8px;         /* 角を少し丸める */
    padding: 8px 12px;          /* 内側の余白（少し広めでボタン感UP） */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* ふんわり影で立体感 */
    transition: background 0.3s, transform 0.2s;
  }

  .menu-toggle:hover {
    background: #f0f0f0;       /* ホバーで少しグレーに */
    transform: scale(1.05);    /* ホバー時に少し大きく */
  }

  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 900;
  }

  .overlay.active {
    display: block;
  }
}

.sidebar a {
  display: block;
  padding: 0px 0px;
  color: #333;
  text-decoration: none; /* 下線を消す */
  transition: background 0.3s, color 0.3s;
}

.sidebar a:hover {
  background: #000;
  color: #fff;
}

.sidebar a.active {
  background: #000;
  color: #fff;
  border-left: 4px solid #ff6600; /* アクセントカラー */
  padding-left: 11px; /* 線ぶん内側に余白調整 */
}

.sidebar a {
  display: block;
  padding: 15px 15px;
  color: #444;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s, transform 0.2s;
}

.sidebar a:hover {
  background: #f0f0f0;
  transform: translateX(5px); /* 少し右に動かす */
}

html, body {
  overflow-x: hidden;
}

/* 自動改行設定 */
.content, .sidebar, body {
  word-wrap: break-word;     /* 長い単語を折り返す */
  overflow-wrap: break-word; /* 推奨される新しい書き方 */
  white-space: normal;       /* 改行可能にする */
}