/* ========= Kosugi Maru フォントの読み込み ========= */
@import url('https://fonts.googleapis.com/css2?family=Kosugi+Maru&display=swap');

/* ========= サイト全体に Kosugi Maru を適用 ========= */
body,
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.entry-content,
.hatena-module-title,
.hatena-body h1,
.hatena-body h2,
.hatena-body h3,
.hatena-body h4,
.hatena-body h5,
.hatena-body h6,
.hatena-entry-title,
.hatena-entry-content,
.hatena-module,
.hatena-module-title,
.hatena-article-title {
  font-family: 'Kosugi Maru', sans-serif !important;
}

/* ========= 基本設定 ========= */
body {
  background-color: #fff8e7;
  background-image: url("https://cdn-ak.f.st-hatena.com/images/fotolife/k/kaiyano/20250802/20250802232217.png");
  background-repeat: repeat-y;
  background-position: right top;
  background-size: 100px auto;
  background-attachment: fixed;
  font-family: 'Kosugi Maru', sans-serif;
}

/* ========= 横並びレイアウト調整 ========= */
#content-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2em;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  margin-left: 280px;
}

/* ========= サイドバー：左固定 ========= */
#box2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 260px;
  z-index: 10;
}

#box2 .hatena-module {
  background: rgba(255, 255, 255, 0.8);
  border: 1px dotted #ccc;
  border-radius: 1em;
  padding: 1em;
  margin-bottom: 1.5em;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.05);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

.hatena-module-title {
  font-weight: bold;
  color: #3B2C1A;
  background: linear-gradient(to right, #f7f0e3, transparent);
  padding-left: 0.5em;
  margin-bottom: 0.5em;
  border-left: 4px solid #bfa987;
}

.hatena-module-body ul {
  list-style: none;
  padding-left: 0;
}

.hatena-module-body li {
  padding-left: 1em;
  position: relative;
  margin-bottom: 0.3em;
}

.hatena-module-body li::before {
  content: "❖";
  position: absolute;
  left: 0;
  color: #bfa987;
}

.hatena-module,
.hatena-module * {
  color: #5B4636;
}

.hatena-module a {
  color: #41627E;
  text-decoration: none;
}

.hatena-module a:hover {
  color: #254E70;
  text-decoration: underline;
}

/* ========= 本文エリア ========= */
#main {
  flex: 1;
  order: 1;
  margin-left: 280px;
}

#main-inner {
  width: 100%;
}

.entry-content {
  position: relative;
  margin: 2em auto;
  max-width: 650px;
  padding: 1.2em 1.2em 1.2em 180px;
  color: #323232;
  background-image: url("https://cdn-ak.f.st-hatena.com/images/fotolife/k/kaiyano/20250803/20250803054728.png");
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: center top;
  border: dotted 3px #323232;
  border-radius: 1.5em;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  line-height: 1.7;
}

.entry-content::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -20px;
  width: 160px;
  height: 160px;
  background-image: url("https://cdn-ak.f.st-hatena.com/images/fotolife/k/kaiyano/20250803/20250803052631.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 11;
}

.entry-content::after {
  content: "";
  display: block;
  width: 900px;
  aspect-ratio: 900 / 52.5;
  max-width: 100%;
  background-image: url("https://cdn-ak.f.st-hatena.com/images/fotolife/k/kaiyano/20250803/20250803002859.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: left;
  margin-top: 20px;
}

/* ========= フォント（見出し） ========= */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: 'Hachi Maru Pop', cursive;
  font-weight: normal;
}

/* ========= 不要要素非表示 ========= */
#blog-title,
.date,
.entry-date,
.entry-title,
.entry-footer .entry-edit,
.entry-footer .hatena-star-add-button,
.entry-footer .hatena-star-comment-button,
.footer,
#footer {
  display: none !important;
}

/* ========= タグ・カテゴリ装飾 ========= */
.entry-footer-categories,
.entry-footer .entry-categories,
.entry-footer .hatena-tag-links,
.entry-footer .entry-tags {
  display: flex !important;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-top: 1.5em;
  padding: 0;
  text-align: center;
  font-family: 'Kosugi Maru', sans-serif;
}

.entry-footer-categories a,
.entry-footer .entry-categories a,
.entry-footer .hatena-tag-links a,
.entry-footer .entry-tags a {
  background-color: #fff0da;
  color: #5B4636;
  padding: 5px 12px;
  border-radius: 15px;
  text-decoration: none;
  font-size: 0.9em;
  border: 1px dotted #d9c0a6;
  transition: background-color 0.3s ease;
}

.entry-footer-categories a:hover,
.entry-footer .entry-categories a:hover,
.entry-footer .hatena-tag-links a:hover,
.entry-footer .entry-tags a:hover {
  background-color: #f0dfc8;
}

/* ========= コメント欄スタイル ========= */
.hatena-comment-container {
  background-color: #fff8e7;
  border: 1px dotted #e5d8c3;
  border-radius: 0.8em;
  padding: 1.2em;
  margin: 2em auto;
  max-width: 650px;
  opacity: 0.95;
  font-size: 0.95em;
  font-family: 'Kosugi Maru', sans-serif;
  color: #5B4636;
  display: block;
}

.hatena-comment-container::before {
  content: "ご感想など、ふと浮かんだら書いてみてくださいね。";
  display: block;
  text-align: center;
  font-size: 0.9em;
  color: #7a6a58;
  margin: 0 0 1em;
  opacity: 0.7;
  font-family: 'Kosugi Maru', sans-serif;
}

/* ========= スマホ対応 ========= */
@media (max-width: 768px) {
  #content-inner {
    display: block;
    margin-left: 0;
  }

  #box2 {
    position: static;
    width: 100%;
    margin-bottom: 2em;
  }

  #main,
  .entry-content {
    width: 100%;
    margin: 0;
    padding: 1em;
    position: relative;
  }

  .entry-content {
    padding-left: 1em !important;
  }

  .hatena-comment-container {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ========= コメント欄の装飾 ========= */
.comment-box.js-comment-box {
  background-color: #fffaf0;
  border: 1px dotted #e0cfa5;
  border-radius: 12px;
  padding: 1.5em;
  margin: 2em auto;
  max-width: 650px;
  font-family: 'Kosugi Maru', sans-serif;
  color: #5B4636;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.03);
}

.leave-comment-title.js-leave-comment-title {
  display: block;
  text-align: center;
  font-size: 1em;
  color: #6b5642;
  margin-top: 1em;
  text-decoration: none;
  cursor: pointer;
  padding: 0.5em;
  border-radius: 8px;
  background-color: #fef4e8;
  border: 1px solid #e6d7c3;
}

.leave-comment-title.js-leave-comment-title:hover {
  background-color: #f3e5ce;
  color: #3b2c1a;
}

/* ========= カテゴリ・タグの装飾 ========= */
.entry-footer .entry-categories a,
.entry-footer .entry-tags a,
.entry-footer .hatena-tag-links a {
  background-color: #f7f0e3;
  color: #5B4636;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9em;
  border: 1px dashed #bfa987;
  margin: 3px;
  transition: background-color 0.3s ease;
}

.entry-footer .entry-categories a:hover,
.entry-footer .entry-tags a:hover,
.entry-footer .hatena-tag-links a:hover {
  background-color: #ede0cc;
  color: #3B2C1A;
}

/* ========= カテゴリ・タグの装飾：セレクタ補強 ========= */
.entry-footer .entry-categories a,
.entry-footer-categories a,
.hatena-article-footer .entry-categories a,
.hatena-article-footer .entry-tags a {
  background-color: #f7f0e3;
  color: #5B4636;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9em;
  border: 1px dashed #bfa987;
  margin: 3px;
  transition: background-color 0.3s ease;
}

.entry-footer .entry-categories a:hover,
.entry-footer-categories a:hover,
.hatena-article-footer .entry-categories a:hover,
.hatena-article-footer .entry-tags a:hover {
  background-color: #ede0cc;
  color: #3B2C1A;
}

/* ========= カテゴリ表示の装飾修正 ========= */
.entry-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-top: 2em;
  padding: 0;
  text-align: center;
}

.entry-categories a {
  background-color: #fff0da;
  color: #5B4636;
  padding: 5px 12px;
  border-radius: 15px;
  text-decoration: none;
  font-size: 0.9em;
  border: 1px dotted #d9c0a6;
  font-family: 'Kosugi Maru', sans-serif;
  transition: background-color 0.3s ease;
}

.entry-categories a:hover {
  background-color: #f0dfc8;
}

.entry-categories a::before {
  content: "🐾";
  margin-right: 0.4em;
  font-size: 1em;
}
.breadcrumb {
  font-size: 0.85em;
  background-color: #fff8e7;
  border: 1px dotted #d9c0a6;
  padding: 0.4em 1em;
  border-radius: 0.8em;
  margin: 1.5em auto 1em;
  max-width: 650px;
  font-family: 'Kosugi Maru', sans-serif;
  color: #5B4636;
}

.breadcrumb a {
  color: #41627E;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb {
  font-size: 0.9em;
  text-align: center;
  background-color: #fff0da;
  padding: 0.6em 1em;
  margin: 1.5em auto;
  border-radius: 1em;
  max-width: 90%;
  color: #5B4636;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}
.breadcrumb a {
  color: #41627E;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb:empty {
  display: none;
}

/* ========= パンくずリストのデザイン ========= */
.breadcrumb {
  background-color: #fff6e5; /* やさしいミルクベージュ */
  background-image: radial-gradient(#e5d4bc 1px, transparent 1px);
  background-size: 8px 8px;
  border: 1px dotted #d2bfa4;
  border-radius: 1em;
  padding: 0.7em 1em;
  font-size: 0.9em;
  color: #5B4636;
  font-family: 'Kosugi Maru', sans-serif;
  text-align: center;
  margin: 1.5em auto;
  max-width: 700px;
  line-height: 1.6;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.04);
}

.breadcrumb a {
  color: #5B4636;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: #8b6b4e;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  background-color: #fff7ec;
  border: 1px dotted #e5d8c3;
  border-radius: 1em;
  padding: 0.6em 1em;
  font-size: 0.95em;
  font-family: 'Kosugi Maru', sans-serif;
  color: #5B4636;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
  margin: 1.5em auto;
  max-width: 900px;
}

/* パンくずの前後にアイコンを表示 */
.breadcrumb::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 36px;
  background-image: url("https://cdn-ak.f.st-hatena.com/images/fotolife/k/kaiyano/20250803/20250803223406.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.breadcrumb::after {
  content: "";
  display: inline-block;
  width: 36px;
  height: 36px;
  background-image: url("https://cdn-ak.f.st-hatena.com/images/fotolife/k/kaiyano/20250803/20250803223413.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

@media (max-width: 768px) {
  body {
    background-color: #ffffff; /* 白背景でスッキリ */
    background-image: none;    /* 背景画像オフ */
  }

  #content-inner {
    display: block;
    margin: 0;
  }

  #box2 {
    display: none; /* サイドバー非表示で軽く */
  }

  #main,
  .entry-content {
    width: 100%;
    margin: 0 auto;
    padding: 1em;
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .entry-content::before,
  .entry-content::after,
  .breadcrumb {
    display: none !important; /* パンくず・装飾非表示 */
  }

  .entry-footer .entry-categories,
  .entry-footer .entry-tags,
  .hatena-comment-container {
    background-color: #f9f9f9;
    border: 1px dotted #ddd;
    padding: 1em;
    margin: 1.5em auto;
    border-radius: 0.8em;
    font-size: 0.95em;
    color: #444;
  }

  .entry-footer .entry-categories a,
  .entry-footer .entry-tags a {
    background: #fff;
    padding: 4px 10px;
    border-radius: 1em;
    text-decoration: none;
    color: #444;
    border: 1px solid #ccc;
    display: inline-block;
    margin: 0.2em;
  }

  .entry-footer .entry-categories a:hover,
  .entry-footer .entry-tags a:hover {
    background-color: #eee;
  }

  .hatena-comment-container::before {
    display: none !important; /* コメントの前文も非表示でスッキリ */
  }
}

/* スマホ用：カテゴリ装飾 */
.entry-categories a {
  background-color: #fff8e7;
  padding: 4px 10px;
  border-radius: 12px;
  color: #5B4636;
  font-size: 0.9em;
  border: 1px dotted #d9c0a6;
  text-decoration: none;
}

.entry-categories a::before {
  content: "🐾 ";
}

/* スマホ用：コメント装飾 */
.hatena-comment-container {
  background-color: #fff8e7;
  border: 1px dotted #e5d8c3;
  border-radius: 0.8em;
  padding: 1em;
  margin: 2em 0;
  font-family: 'Kosugi Maru', sans-serif;
  color: #5B4636;
  font-size: 0.95em;
}
