/* --- 共通：お気に入りのカラーと形状 --- */
:root {
  --main-blue: #2196f3;
  --bg-blue: #f0f7ff; /* お気に入りの薄い水色 */
  --border-blue: #d0e7ff;
  --main-orange: #e67e22;
  --bg-orange: #fdfaf5; /* お気に入りの薄いオレンジ */
  --border-orange: #fbeedb;
  --radius: 12px; /* お気に入りの角丸設定 */
}

/* --- ヘッダー（グローバルナビ） --- */
#gnav {
  background: #fff;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}
.gnav-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-blue);
  color: var(--main-blue) !important;
  border: 1px solid var(--border-blue);
  border-radius: 50px; /* ヘッダーはより丸くカプセル型に */
  font-weight: bold;
  font-size: 0.9rem;
  text-decoration: none;
  transition: 0.3s;
}
.menu a:hover {
  background: var(--main-blue);
  color: #fff !important;
}

/* --- 記事一覧（タイル型カード） --- */
.archive-entries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px 0;
}
.archive-entry {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #eee;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.archive-entry:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.entry-title a {
  color: #333 !important;
  font-weight: bold;
  text-decoration: none;
}
.entry-thumb {
  height: 180px !important;
  object-fit: cover;
}

/* --- パンくずリスト --- */
#breadcrumb {
  margin-bottom: 25px;
  font-size: 0.8rem;
  color: #999;
}
#breadcrumb a {
  color: var(--main-blue);
}

/* --- 記事内の見出し（h3）もお気に入りの色に --- */
.entry-content h3 {
  padding: 12px 15px;
  border-left: 6px solid var(--main-blue);
  background: var(--bg-blue);
  color: #333;
  border-radius: 0 4px 4px 0;
  margin: 40px 0 20px;
}

/* --- サイドバー：カテゴリー階層化とデザイン統一 --- */
.hatena-module-category .hatena-module-body ul {
    list-style: none;
    padding: 0;
}

.hatena-module-category .hatena-module-body li {
    margin-bottom: 5px;
}

/* 親カテゴリーのデザイン（カードメニューのトーンに合わせる） */
.hatena-module-category .hatena-module-body li a {
    display: block;
    padding: 10px 15px;
    background: #f0f7ff; /* お気に入りの薄い水色 */
    color: #2196f3; /* メインの青色 */
    border: 1px solid #d0e7ff; /* 境界線 */
    border-radius: 8px; /* 角丸 */
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
}

.hatena-module-category .hatena-module-body li a:hover {
    background: #2196f3;
    color: #fff;
}

/* 子カテゴリーの調整（ハイフン「-」が含まれる場合） */
/* ※Minimalistテーマなどの標準機能を活かした字下げ設定 */
.hatena-module-category .hatena-module-body li li {
    margin-left: 15px;
    margin-top: 5px;
}

.hatena-module-category .hatena-module-body li li a {
    background: #fff;
    color: #666;
    border: 1px solid #eee;
    font-weight: normal;
    font-size: 0.8rem;
}

/* --- 記事全体の中央寄せと読みやすい幅の設定 --- */
#content {
    max-width: 1080px; /* 全体の最大幅 */
    margin: 0 auto;    /* 中央寄せ */
    display: flex;
    justify-content: center;
}

#main {
    max-width: 720px;  /* 記事本文の読みやすい幅（toridori基準） */
    width: 100%;
    float: none !important;
    margin: 0 auto;    /* 本文も中央に */
    padding: 20px;
}

/* 記事内の文字を少し内側に入れる（余白の確保） */
.entry-content {
    line-height: 1.8;
    letter-spacing: 0.03em;
    font-size: 17px;   /* 少し大きくするとプロっぽくなります */
}

/* サイドバーがある場合、少し離す */
#box2 {
    width: 300px;
    float: none !important;
}

/* スマホ表示では幅を100%にする */
@media (max-width: 768px) {
    #content {
        display: block;
    }
    #main {
        max-width: 100%;
        padding: 15px;
    }
}

/* --- サイドバー：カテゴリーをイラスト風ボタンに --- */
.hatena-module-category .hatena-module-body ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* ボタン同士の隙間 */
    padding: 0;
}

.hatena-module-category .hatena-module-body li {
    width: 100%; /* 基本は1列（お好みで calc(50% - 4px) にすれば2列） */
    margin: 0 !important;
}

.hatena-module-category .hatena-module-body li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f0f7ff; /* お気に入りの薄い水色 */
    color: #2196f3 !important; /* メインの青 */
    border: 1px solid #d0e7ff;
    border-radius: 12px; /* タイルと同じ角丸 */
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* 疑似要素で「イラスト風アイコン」を自動追加 */
.hatena-module-category .hatena-module-body li a::before {
    content: "\f054"; /* FontAwesomeの矢印アイコン */
    font-family: FontAwesome;
    margin-right: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ホバー時の動き */
.hatena-module-category .hatena-module-body li a:hover {
    background: #2196f3;
    color: #fff !important;
    transform: translateX(5px); /* 右にスッと動くアニメーション */
}

/* 子カテゴリー（階層化）がある場合の見た目 */
.hatena-module-category .hatena-module-body li li a {
    background: #fff;
    color: #666 !important;
    border-color: #eee;
    font-size: 0.8rem;
    margin-left: 15px; /* 親より右に寄せる */
}

/* サイドバー全体の調整 */
#box2 {
    padding: 0 10px;
}

/* モジュール（カテゴリーやプロフィール）ごとの余白 */
.hatena-module {
    margin-bottom: 40px;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    /* ほんのり影をつけて浮かせる */
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

/* --- サイドバーのカテゴリーを強制的にボタン化 --- */
.hatena-module-category .hatena-module-body ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* 中央に寄せる */
    padding: 0 !important;
    list-style-type: none !important; /* 黒丸を消す */
}

.hatena-module-category .hatena-module-body li {
    width: 90% !important; /* ボタンの幅 */
    margin: 5px 0 !important;
    padding: 0 !important;
    text-indent: 0 !important; /* 左の隙間を消す */
}

.hatena-module-category .hatena-module-body li a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 12px !important;
    background: #f0f7ff !important; /* あの水色 */
    color: #2196f3 !important;
    border: 1px solid #d0e7ff !important;
    border-radius: 12px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    transition: 0.3s !important;
}

/* アイコン（イラスト風）を左に追加 */
.hatena-module-category .hatena-module-body li a::before {
    content: "\f07b" !important; /* フォルダのアイコン */
    font-family: FontAwesome !important;
    margin-right: 10px !important;
}

/* ホバー時に色を変える動き */
.hatena-module-category .hatena-module-body li a:hover {
    background: #2196f3 !important;
    color: #fff !important;
    transform: scale(1.05); /* 少し大きく見せる動き */
}

/* --- サイドバー全体の「左詰め」を解消して中央へ --- */
#box2 {
    padding: 0 20px !important;
    text-align: center !important;
}

.hatena-module-title {
    text-align: center !important;
    border-bottom: 2px solid #2196f3 !important;
    padding-bottom: 5px !important;
    margin-bottom: 15px !important;
}

/* --- サイドバー：カテゴリーを中央寄せ・イラストボタン化 --- */
.hatena-module-category {
    text-align: center !important;
}

.hatena-module-category .hatena-module-body ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 0 !important;
    list-style: none !important;
}

.hatena-module-category .hatena-module-body li {
    width: 85% !important; /* ボタンの横幅 */
    margin: 8px 0 !important;
    text-indent: 0 !important;
}

.hatena-module-category .hatena-module-body li a {
    display: block !important;
    padding: 12px !important;
    background: #f0f7ff !important; /* お気に入りの薄い青 */
    color: #2196f3 !important;
    border: 1px solid #d0e7ff !important;
    border-radius: 12px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    transition: 0.3s !important;
}

/* アイコンを自動で追加 */
.hatena-module-category .hatena-module-body li a::before {
    content: "\f114" !important; /* フォルダアイコン */
    font-family: FontAwesome !important;
    margin-right: 8px !important;
    font-size: 1rem !important;
}

/* ホバー時の動き */
.hatena-module-category .hatena-module-body li a:hover {
    background: #2196f3 !important;
    color: #fff !important;
    transform: scale(1.03);
}

/* 全体の中央寄せ */
#container {
    max-width: 1100px !important;
    margin: 0 auto !important;
}

#content {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

#main {
    float: none !important;
    margin: 0 auto !important;
}

#box2 {
    float: none !important;
    margin: 40px auto !important; /* サイドバーも中央に */
    width: 100% !important;
    max-width: 400px !important;
}