/* ===== ベース設定 ===== */
html {
  overflow-x: auto;
}

body {
  margin: 0;
  font-family: sans-serif;
  line-height: 1.6;
  background-color: whitesmoke;
  color: #333;
  min-width: 1080px;
  overflow-x: auto;
}

/* ===== 幅固定で中央寄せの共通クラス ===== */
.fixed-width {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ===== ヘッダー ===== */
.hwrapper {
  background-color: #FDE9FB;
  padding: 0 10px;
}
.hwrapper, .menu, .blogroll, .content-wrapper, .fwrapper {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  box-sizing: border-box;
}

.header-img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  display: block;
}

/* ===== メニュー ===== */
.menu {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0;
  background-color: #FFDEC5;
  border-top: 2px solid #333;
  border-bottom: 2px solid #333;
  scrollbar-width: none;
}

.menu a {
  text-decoration: none;
  color: #336699;
  display: block;
  width: 100%;
  height: 100%;
}

.menu a:hover {
  text-decoration: underline;
}

.box {
  flex: 1 1 0%;
  text-align: center;
  padding: 15px 0;
  border-left: 1px solid #333;
  border-right: 1px solid #333;
  background-color: #FFDEC5;
  box-sizing: border-box;
}

.box:first-child {
  border-left: none;
}
.box:last-child {
  border-right: none;
}

/* ===== Blogroll ===== */
.home-title {
  max-width: 900px;
  font-size: 20px;
  margin: 30px auto 10px;
  color: #333;
}

.blogroll {
  padding: 0 20px;
  background-color: white;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
}

.blogroll ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.blogroll li {
  margin-bottom: 10px;
  font-size: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

.blogroll a {
  text-decoration: none;
  color: #336699;
}
.blogroll a:hover {
  text-decoration: underline;
}

/* ===== 本文＋サイドバー ===== */
.content-wrapper {
  display: flex;
  gap: 20px;
  margin: 40px auto;
  overflow-x: auto;
  flex-wrap: nowrap;
  min-width: 600px;
}

.main {
  flex: 1;
  margin-top: 20px;
  background-color: whitesmoke;
}

.main-box {
  border: 2px solid #ccc;
  padding: 20px;
  margin-top: 10px;
  background-color: white;
  box-sizing: border-box;
}

.read-more {
  display: inline-block;
  color: blue;
  text-decoration: underline;
  cursor: pointer;
}
.read-more:hover {
  color: darkblue;
}

.hidden-keyword {
  display: none;
}

/* ===== 本文構造 ===== */
.article-title {
  max-width: 900px;
  font-size: 20px;
  margin: 10px auto 70px;
  color: #333;
}

.main-danraku,
.main-tsuduki,
.main-owari,
.main-danrakudake {
  font-size: 16px;
  margin: 0 0 8px 0;
  text-indent: 1em;
}
.main-tsuduki,
.main-owari {
  margin-top: 50px;
}
.main-owari,
.main-danrakudake {
  margin-bottom: 100px;
}

.underline {
  text-decoration: underline;
}

.main-img {
  width: 100%;
  margin: 50px 0;
  object-fit: cover;
  display: block;
}

.img-caption {
  text-align: center;
  font-size: 1rem;
  margin-top: -30px;
  margin-bottom: 50px;
  color: #555;
}

/* ===== 目次 ===== */
.toc {
  padding: 15px;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  margin: 100px 0;
}
.toc ul {
  padding-left: 20px;
}
.toc li {
  margin-bottom: 10px;
}
.toc a {
  color: #336699;
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

.subtitle {
  border-left: 3px solid blue;
  padding-left: 8px;
  background: linear-gradient(to right, whitesmoke 0%, transparent 100%);
}
.subsubtitle {
  padding-left: 8px;
}

.no-marker {
  list-style: none;
  padding-left: 1em;
}
.no-marker a {
  color: black;
  text-decoration: none;
}
.no-marker a:hover {
  color: blue;
  text-decoration: underline;
}

/* ===== ジャンル展開 ===== */
.category-block {
  margin-bottom: 20px;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

input[type="checkbox"] {
  display: none;
}

.category-label::before {
  content: "▶";
  margin-right: 5px;
  transition: transform 0.2s;
}
input[type="checkbox"]:checked + .category-label::before {
  content: "▼";
}
.category-label {
  cursor: pointer;
  font-weight: bold;
  display: block;
  color: #333;
}
.submenu {
  display: none;
  margin-left: 20px;
  list-style-type: none;
  padding: 0;
}
input[type="checkbox"]:checked + .category-label + .submenu {
  display: block;
}
.article, .home-article {
  margin-bottom: 10px;
}
.article {
  display: none;
}
.article.active {
  display: block;
}

/* ===== お問い合わせフォーム ===== */
.contact-form {
  flex: 1;
  padding: 20px;
  background-color: whitesmoke;
}
.contact-form h2 {
  text-align: center;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}
.form-group textarea {
  resize: vertical;
  min-height: 200px;
}
.contact-form button {
  width: 100%;
  padding: 10px;
  background-color: #336699;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.contact-form button:hover {
  background-color: #264d73;
}

/* ===== サイドバー・プロフィール ===== */
.sidebar {
  width: 250px;
  background-color: whitesmoke;
  box-sizing: border-box;
  margin-top: 20px;
}
.profile-img {
  width: 100%;
  margin-bottom: 15px;
  border: 1px solid #ccc;
}
.namae {
  text-align: center;
  margin-bottom: 15px;
}
.profile-text, .til {
  font-size: 14px;
  margin-bottom: 20px;
}
.til {
  text-indent: 1em;
  margin: 0 0 8px 0;
}

/* ===== 検索フォーム ===== */
.search-form input[type="text"] {
  width: calc(100% - 60px);
  margin: 50px 0 20px 0;
  padding: 5px;
  box-sizing: border-box;
}
.search-form button {
  padding: 6px 10px;
  margin-left: 5px;
}

/* ===== アーカイブ ===== */
.archive ul {
  padding-left: 20px;
  margin: 0;
}
.archive li {
  margin-bottom: 5px;
}

/* ===== フッター ===== */
.fwrapper {
  background-color: #FDE9FB;
  padding: 0 10px;
}
.footer {
  margin: auto;
  max-width: 800px;
  padding: 10px;
  text-align: center;
}