/* 全体的なコンテナのスタイル */ body { font-family: 'Inter', sans-serif; /* フォントの指定 */ background-color: #f8f8f8; /* 背景色をより柔らかく */ color: #333; /* 基本の文字色 */ font-size: 16px; /* はてなブログ標準に近い基本サイズに設定 */ padding: 5px; /* すべて5pxに統一 */ line-height: 1.0; /* 行間を1.0に統一 */ margin: 0; /* bodyのデフォルトマージンをリセット */ } /* タイトル(h2)のスタイル */ h2 { color: #2c3e50; font-size: 2em; /* 16px基準で32px */ margin-top: 5px; /* 上下の間隔を狭く */ margin-bottom: 5px; /* 上下の間隔を狭く */ text-align: center; border-bottom: 3px solid #e0e0e0; /* 境界線を少し太く */ padding-bottom: 5px; /* 5pxに統一 */ font-weight: 700; /* 太字を強調 */ letter-spacing: 0.05em; /* 文字間隔を少し開ける */ line-height: 1.0; /* 行間を1.0に統一 */ } /* メインコンテンツを囲むラッパー */ #main-content-wrapper { max-width: 900px; /* 最大幅を少し広げる */ margin: 5px auto; /* 上下5px、左右中央寄せ */ background-color: #ffffff; /* 背景色を追加 */ border-radius: 6px; /* 角の丸みを半分に (12px -> 6px) */ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08); /* 影を強調 */ padding: 10px; /* 左右の余白を確保するため10pxに増やす */ box-sizing: border-box; /* パディングを幅に含める */ } /* カテゴリリスト全体のスタイル */ #category-list { list-style: none; padding: 0; margin: 0; /* リストのデフォルトマージンをリセット */ } /* 各カテゴリ項目(親li要素)のスタイル */ #category-list li { display: flex; /* 子要素をflexコンテナとして扱う */ justify-content: flex-end; flex-direction: column; /* 子要素を縦に並べる */ align-items: flex-start; /* 子要素を左揃えにする */ margin-bottom: 1px; /* 縦方向の間隔をさらに狭く (1px) */ border-bottom: 1px solid #eee; position: relative; padding-top: 2px; /* li内のパディングを調整 */ padding-bottom: 2px; /* li内のパディングを調整 */ padding-right: 0; /* li自体の右パディングは不要に */ box-sizing: border-box; /* パディングを幅に含める */ width: 100%; /* 親要素の幅いっぱいに広げる /////////////////////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@////////////////////////////*/ } #category-list > li:last-child { border-bottom: none; margin-bottom: 0; } /* カテゴリリンクと説明ボタンを囲むヘッダー */ .category-header { display: flex; align-items: center; width: 100%; /* 親liの幅いっぱいに広げる ////////////////////////////////////////////////////////////*/ margin-bottom: 2px; /* ヘッダーと次の要素の間隔 */ gap: 5px; /* aタグとボタンの間に5pxのギャップを設定 */ box-sizing: border-box; /* パディングを幅に含める */ } /* カテゴリリンクの共通ボタン化スタイル */ #category-list li a { background-color: #3498db; color: white; border: none; border-radius: 4px; /* 角の丸みを半分に (8px -> 4px) */ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); padding: 5px 10px; /* 上下5px、左右10pxに調整 */ font-weight: bold; font-size: 1em; text-decoration: none; display: inline-flex; /* flexにして中央寄せ可能に */ align-items: center; /* アイコンなどとの垂直中央揃え */ justify-content: space-between; /* 記事数を右端に配置 */ transition: background-color 0.3s ease, transform 0.2s ease; /* white-space: nowrap; */ /* ← ここをコメントアウトしてテキストの折り返しを許可 */ overflow: hidden; /* ← 追加: コンテンツがはみ出た場合に隠す */ text-overflow: ellipsis; /* ← 追加: はみ出たテキストを「...」で省略 */ line-height: 1.0; /* 行間を1.0に統一 */ flex: 1; /* 利用可能なスペースを埋めるように伸びる///////////////////////////////////////////////////////// */ } /* 全記事数表示のリンク(1行目)のスタイル */ #total-articles-row a { background-color: #28a745; /* 緑色に変更 */ } #total-articles-row a:hover { background-color: #218838; /* ホバー時の色 */ } #category-list li a:hover { background-color: #2980b9; transform: translateY(-1px); } #category-list li a:active { transform: translateY(0); } /* 記事数のspanのスタイル (青いボタンの中) */ #category-list span.article-count { font-size: 0.9375em; color: rgba(255, 255, 255, 0.8); /* 白に近い色でコントラストを出す */ margin-left: 10px; /* カテゴリ名との間隔 */ white-space: nowrap; /* こちらはカウントなので nowrap を維持 */ line-height: 1.0; /* 行間を1.0に統一 */ flex-shrink: 0; } /* ネストされたカテゴリリストのスタイル */ #category-list ul { width: calc(100% - 40px);/*100% /////////////////////////////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@////*/ margin-top: 2px; /* 縦方向の間隔をさらに狭く */ margin-bottom: 2px; /* 縦方向の間隔をさらに狭く */ padding-left: 40px; /* インデントを40pxに */ list-style: none; } #category-list ul li { margin-bottom: 2px; /* 縦方向の間隔をさらに狭く */ padding-top: 2px; /* li内のパディングを調整 */ padding-bottom: 2px; /* li内のパディングを調整 */ } /* 記事リストのラッパー(インデントと幅を制御) */ .article-list-wrapper { margin-left: 45px; /* ボタンの左端から45pxの位置に開始 */ width: calc(100% - 45px); /* 親liの幅 (100%) からmargin-left分を引く */ box-sizing: border-box; /* パディングを幅に含める */ } /* 記事リスト(.article-list-container)のスタイル */ .article-list-container { margin-top: 4px; /* 縦方向の間隔を倍に (2px -> 4px) */ margin-bottom: 4px; /* 縦方向の間隔を倍に (2px -> 4px) */ background-color: #fdfdfd; border-left: 4px solid #bdc3c7; /* 縦線 */ padding-top: 5px; /* 5pxに統一 */ padding-bottom: 5px; /* 5pxに統一 */ padding-left: 5px; /* 縦線から記事リストの内容を5px離す */ border-radius: 3px; /* 角の丸みを半分に (6px -> 3px) */ width: 100%; /* 親のarticle-list-wrapperの幅いっぱいに広がる */ box-sizing: border-box; /* パディングとボーダーを幅に含める */ box-shadow: inset 0 0 5px rgba(0,0,0,0.05); display: none; /* 初期状態では非表示 */ } /* 全記事リスト内の個別記事のスタイル調整 */ .article-list-container ul { padding: 0; list-style: disc; margin: 0; } .article-list-container ul li { margin-bottom: 4px; /* 縦方向の間隔を倍に (2px -> 4px) */ font-size: 0.9375em; line-height: 1.0; /* 行間を1.0に統一 */ padding-top: 2px; /* li内のパディングを調整 */ padding-bottom: 2px; /* li内のパディングを調整 */ } /* 記事リスト内のリンクのスタイルをリセットを強化 */ .article-list-container ul li a { background-color: transparent !important; color: #555 !important; border: none !important; box-shadow: none !important; padding: 0 !important; /* 個別の記事リンクは下線のためパディング0を維持 */ font-weight: normal !important; font-size: 1em !important; text-decoration: underline !important; display: inline !important; margin-right: 0 !important; white-space: normal !important; transform: none !important; line-height: inherit !important; /* 親要素の行間を継承 */ justify-content: flex-start !important; /* 記事リスト内のリンクは左寄せ */ } .article-list-container ul li a:hover { background-color: transparent !important; color: #3498db !important; transform: none !important; } .article-list-container ul li a:active { transform: none !important; } /* 読み込み中のメッセージのスタイル */ #sitemap-loading-indicator { text-align: center; font-size: 1em; font-weight: bold; color: #7f8c8d; margin-top: 5px; /* 5pxに統一 */ display: none; padding: 5px; /* 5pxに統一 */ background-color: #fff; border-radius: 4px; /* 角の丸みを半分に (8px -> 4px) */ box-shadow: 0 2px 4px rgba(0,0,0,0.05); max-width: 400px; margin-left: auto; margin-right: auto; line-height: 1.0; /* 行間を1.0に統一 */ } /* 説明表示ボタンのスタイル (絵文字に置き換え) */ .show-description-btn { background-color: transparent; /* 背景を透明に */ color: #555; /* 文字色を調整 */ border: none; /* 枠線なし */ border-radius: 0; /* 角丸なし */ cursor: pointer; font-size: 1.2em; /* 絵文字が見えるようにサイズ調整 */ transition: none; /* トランジションを削除 */ vertical-align: middle; white-space: nowrap; line-height: 1.0; /* 行間を1.0に統一 */ box-shadow: none; /* 影なし */ flex-shrink: 0; /* 縮まないようにする */ display: inline-flex; /* 絵文字を中央寄せするため */ align-items: center; justify-content: center; width: 24px; /* 固定幅を設定してレイアウトのずれを防ぐ */ height: 24px; /* 固定高さを設定 */ margin-right: 0; /* ボタン自体の右マージンは不要 */ } .show-description-btn:hover { color: #3498db; /* ホバー時の色変更 */ transform: none; /* ホバー時の変形なし */ } .show-description-btn:active { transform: none; /* アクティブ時の変形なし */ } /* メッセージ形式の表示スタイル */ .category-description-output { margin-top: 2px; /* 縦方向の間隔をさらに狭く */ margin-bottom: 2px; /* 縦方向の間隔をさらに狭く */ padding: 5px; /* 5pxに統一 */ background-color: #e8f5e9; border: 1px solid #66bb6a; border-radius: 5px; /* 角の丸みを半分に (10px -> 5px) */ font-size: 0.9375em; color: #388e3c; line-height: 1.0; /* 行間を1.0に統一 */ word-break: break-word; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08); margin-left: 45px; /* ボタンの左端から45pxの位置に開始 */ width: calc(100% - (45px + 24px + 5px)); /* (45 + 24 + 5 = 74) */ box-sizing: border-box; /* パディングを幅に含める */ display: none; /* 初期状態では非表示 */ } /* 「全記事数」の説明欄を非表示にするためのスタイル */ #total-articles-row .category-description-output { display: none !important; /* 完全に非表示 */ } /* JavaScriptによって非表示にするクラス (今回はCSSで初期非表示にしたため、ほぼ未使用) */ .js-hidden { display: none !important; } /* レスポンシブ対応 */ @media (max-width: 768px) { body { padding: 5px; /* 5pxに統一 */ } h2 { font-size: 1.6em; margin-bottom: 5px; /* 5pxに統一 */ padding-bottom: 5px; /* 5pxに統一 */ line-height: 1.0; /* 行間を1.0に統一 */ } #main-content-wrapper { padding: 10px; /* 10pxに統一 */ margin: 5px auto; /* 上下5px、左右中央寄せ */ } #category-list li { margin-bottom: 1px; /* 縦方向の間隔をさらに狭く (1px) */ padding-top: 2px; /* li内のパディングを調整 */ padding-bottom: 2px; /* li内のパディングを調整 */ padding-right: 0; /* li自体の右パディングは不要に */ width:100%; /* 親要素の幅いっぱいに広げる */ } #category-list ul { padding-left: 40px; /* インデントを40pxに */ margin-top: 2px; /* 縦方向の間隔をさらに狭く */ margin-bottom: 2px; /* 縦方向の間隔をさらに狭く */ } .article-list-wrapper { margin-left: 45px; /* ボタンの左端から45pxの位置に開始 */ width: calc(100% - 45px); /* 親liの幅 (100%) からmargin-left分を引く@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */ } .article-list-container { padding-left: 5px; /* 縦線から記事リストの内容を5px離す */ margin-top: 4px; /* 縦方向の間隔を倍に (2px -> 4px) */ margin-bottom: 4px; /* 縦方向の間隔を倍に (2px -> 4px) */ } #category-list li { flex-direction: column; align-items: flex-start; margin-bottom: 1px; /* 縦方向の間隔をさらに狭く (1px) */ } .category-header { width: 100%; /* 親liの幅いっぱいに広げる */ margin-bottom: 2px; gap: 5px; /* aタグとボタンの間に5pxのギャップを設定 */ } #category-list li a { width: 100%; /* 全幅を使用 */ margin-bottom: 0; /* 縦方向のボタン間隔は不要 */ text-align: left; justify-content: space-between; /* 記事数を右端に配置 */ font-size: 1em; line-height: 1.0; /* 行間を1.0に統一 */ padding: 5px 10px; /* 上下5px、左右10pxに調整 */ } #category-list span.article-count { margin-left: 10px; /* カテゴリ名との間隔 */ font-size: 0.9375em; line-height: 1.0; /* 行間を1.0に統一 */ } .show-description-btn { margin-top: 0; /* 縦方向のボタン間隔は不要 */ display: inline-flex; /* header内で横並び */ width: 24px; /* 固定幅を設定 */ font-size: 1.2em; /* 絵文字が見えるようにサイズ調整 */ line-height: 1.0; /* 行間を1.0に統一 */ height: 24px; /* 固定高さを設定 */ margin-right: 0; /* ボタン自体の右マージンは不要 */ } .category-description-output { margin-top: 2px; /* 縦方向の間隔をさらに狭く */ margin-bottom: 2px; /* 縦方向の間隔をさらに狭く */ padding: 5px; /* 5pxに統一 */ font-size: 0.9375em; line-height: 1.0; /* 行間を1.0に統一 */ margin-left: 45px; /* ボタンの左端から45pxの位置に開始 */ width: calc(100% - (45px + 24px + 5px)); /* (45 + 24 + 5 = 74) */ } /* 「全記事数」の説明欄を非表示にするためのスタイル */ #total-articles-row .category-description-output { display: none !important; /* 完全に非表示 */ } }