/* --- Import Boilerplate Reset/Base --- */
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document */
html { line-height: 1.15; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
/* Sections */
body { margin: 0; }
article, aside, footer, header, nav, section { display: block; }
h1 { font-size: 2em; margin: 0.67em 0; }
/* Grouping content */
figcaption, figure, main { display: block; }
figure { margin: 1em 40px; }
hr { box-sizing: content-box; height: 0; overflow: visible; }
pre { font-family: monospace; font-size: 1em; }
/* Text-level semantics */
a { background-color: transparent; -webkit-text-decoration-skip: objects; }
abbr[title] { border-bottom: none; text-decoration: underline; text-decoration: underline dotted; }
b, strong { font-weight: bolder; } /* Simplified */
code, kbd, samp { font-family: monospace; font-size: 1em; }
dfn { font-style: italic; }
mark { background-color: #ff0; color: #000; }
small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }
strong {
    background: linear-gradient(transparent 70%, #a8eaff 50%);
}
/* Embedded content */
audio, video { display: inline-block; }
audio:not([controls]) { display: none; height: 0; }
img { border-style: none; }
svg:not(:root) { overflow: hidden; }
/* Forms */
button, input, optgroup, select, textarea { font-family: sans-serif; font-size: 100%; line-height: 1.15; margin: 0; }
button, input { overflow: visible; }
button, select { text-transform: none; }
button, html [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; }
button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { border-style: none; padding: 0; }
button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { outline: 1px dotted ButtonText; }
fieldset { padding: 0.35em 0.75em 0.625em; }
legend { box-sizing: border-box; color: inherit; display: table; max-width: 100%; padding: 0; white-space: normal; }
progress { display: inline-block; vertical-align: baseline; }
textarea { overflow: auto; }
[type="checkbox"], [type="radio"] { box-sizing: border-box; padding: 0; }
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { height: auto; }
[type="search"] { -webkit-appearance: textfield; outline-offset: -2px; }
[type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }
/* Interactive */
details, menu { display: block; } /* Note: <menu> is deprecated */
summary { display: list-item; }
/* Scripting */
canvas { display: inline-block; }
template { display: none; }
/* Hidden */
[hidden] { display: none; }
/* --- End Boilerplate Reset/Base --- */


/* --- CSS Variables --- */
:root {
    --primary-color: #00A8E8; /* 鮮やかなブルー */
    --primary-dark-color: #007FAF; /* 少し暗いブルー */
    --secondary-color: #333333; /* ダークグレー */
    --base-color: #FFFFFF; /* 白 */
    --light-gray-color: #F9F9F9; /* 薄いグレー */
    --page-bg-color: #eaeaea; /* ページ全体の背景色 */
    --text-color: #333333; /* 主要テキスト */
    --light-text-color: #666666; /* やや薄いテキスト */
    --border-color: #EAEAEA;
    --code-bg-color: #f0f0f0; /* インラインコード背景 */
    --code-text-color: #d63384; /* インラインコードテキスト */
    --pre-bg-color: #2d2d2d; /* preタグ背景 */
    --pre-text-color: #f0f0f0; /* preタグテキスト */
    --blockquote-bg-color: var(--light-gray-color);
    --blockquote-border-color: var(--primary-color);
    --tip-box-bg-color: #E0F6FF;
    --tip-box-border-color: var(--primary-color);

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --font-code: 'Menlo', 'Consolas', 'Courier New', Courier, monospace;

    --header-height: 80px; /* 固定ヘッダー高さ (デフォルト) */
    --header-height-mobile: 60px; /* 固定ヘッダー高さ (モバイル) */
    --border-radius: 8px;
    --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    --box-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* --- Global Styles --- */
html {
    scroll-behavior: smooth;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--page-bg-color); /* ページ全体の背景 */
    line-height: 1.8;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--header-height-mobile);
}

a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark-color); text-decoration: underline; }
a.keyword { text-decoration: none; border-bottom: 1px dotted var(--light-text-color); color: var(--text-color); }
a.keyword:hover { color: var(--primary-color); border-bottom-color: var(--primary-color); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--secondary-color); line-height: 1.4; font-weight: 700; margin-top: 1.8em; margin-bottom: 0.8em; }
:is(h1, h2, h3, h4, h5, h6) a { color: inherit; text-decoration: none; }
:is(h1, h2, h3, h4, h5, h6) a:hover { color: var(--primary-color); }
h1 { font-size: 2.2rem; } h2 { font-size: 1.8rem; } h3 { font-size: 1.5rem; } h4 { font-size: 1.2rem; } h5 { font-size: 1rem; } h6 { font-size: 0.9rem; }

img, video, canvas, svg { max-width: 100%; height: auto; display: block; }
img { border-radius: var(--border-radius); }

/* --- Layout --- */
#container {
    padding: 2em 15px; max-width: 1140px; margin-left: auto; margin-right: auto; margin-top:-30px

}

#content-inner { display: flex; flex-direction: column; }

#wrapper {
    width: 100%;
    order: 1;
    /* --- 追記: デフォルトで box-sizing を設定 --- */
    box-sizing: border-box;
}

/* 記事詳細ページで #wrapper をカード化 */
.page-entry #wrapper {
    background-color: var(--base-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2em 1.5em; /* デフォルト (タブレット以上を想定) */
    margin-bottom: 2em;
    /* box-sizing: border-box; は基本スタイルに追加済み */
}
.page-entry #wrapper > *:first-child { margin-top: 0; }
.page-entry #wrapper > *:last-child { margin-bottom: 0; }

#box2 { width: 100%; order: 2; margin-top: 3em; display: none; }
.footer-mobile-sidebar { display: block; margin-bottom: 3em; border-top: 1px solid var(--border-color); padding-top: 2.5em; }

/* Tablet Layout */
@media (min-width: 768px) {
    body { padding-top: var(--header-height); }
    #container { padding: 3em 15px; max-width: 720px; }
    #content-inner { flex-direction: row; justify-content: space-between; gap: 30px; }
    #wrapper { width: calc(100% - 220px - 30px); order: 1; }
    .page-entry #wrapper { padding: 2.5em 2em; margin-bottom: 0; }
    #box2 { display: block; width: 220px; margin-top: 0; order: 2; }
    .footer-mobile-sidebar { display: none; }
    h1 { font-size: 2rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.4rem; }
}

/* Desktop Layout */
@media (min-width: 992px) {
    #container { padding: 3em 20px; max-width: 1140px; }
    #content-inner { gap: 40px; }
    #wrapper { width: calc(100% - 300px - 40px); }
    .page-entry #wrapper { padding: 3em; }
    #box2 { width: 300px; }
    h1 { font-size: 2.2rem; } h2 { font-size: 1.8rem; } h3 { font-size: 1.5rem; }
}

/* Mobile-specific adjustments */
@media (max-width: 767px) {
    body { font-size: 15px; }
    h1 { font-size: 1.8rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.3rem; } h4 { font-size: 1.1rem; } p{font-size:16px; }

    /* --- 修正: 記事詳細ページのwrapperのモバイル表示調整 --- */
    .page-entry #wrapper {
        /* 幅は基本スタイルの100%を継承、box-sizing: border-box も継承 */
        /* 左右のマージンを明示的にリセット */
        margin-left: 0;
        margin-right: 0;
        /* パディングをモバイル用に調整 */
        padding: 1.8em 1.2em;
        margin-bottom: 1.5em; /* 下マージンも調整 */
    }
}


/* --- Header --- */
#globalheader-container { display: none; }
#common-header { position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height-mobile); background-color: var(--base-color); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); z-index: 1000; border-bottom: 1px solid var(--border-color); }
#common-header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; max-width: 1140px; margin: 0 auto; padding: 0 15px; }
.page-index #common-header-inner { position: relative; justify-content: center; }
#blog-title {
    margin: 0;
    padding: 0;
    border: none;
    text-align: center;
    /* display: flex
; */
    align-items: center;
    height: 100%;
}
.page-index #common-header-inner #blog-title { flex-grow: 1; text-align: center; justify-content: center; }
#title { margin: 0; font-size: 1.4rem; font-family: var(--font-heading); font-weight: 700; letter-spacing: 1px; line-height: 1; text-transform: uppercase; }
#title a {
    color: black;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease;
    font-size: 40px;
    padding: 5px;
    letter-spacing: 1px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
#title a:hover { color: var(--primary-color); text-decoration: none; letter-spacing: 1px; }
#blog-description { display: none; }
#header-nav { display: none; }
#header-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5em; }
#header-nav li { margin: 0; padding: 0; }
#header-nav a { font-size: 0.95rem; font-weight: 700; color: var(--text-color); text-decoration: none; padding: 0.5em 0; position: relative; transition: color 0.3s ease; }
#header-nav a:hover { color: var(--primary-color); }
#header-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--primary-color); transition: width 0.3s ease; }
#header-nav a:hover::after { width: 100%; }
#header-menu-button { display: block; cursor: pointer; border: none; background: none; padding: 10px; }
.page-index #common-header-inner #header-nav, .page-index #common-header-inner #header-menu-button { order: 3; flex-shrink: 0; }
.page-index #common-header-inner::before { content: ''; display: block; width: 80px; order: 1; }
@media (min-width: 768px) { .page-index #common-header-inner::before { width: 150px; } }
@media (min-width: 768px) { #common-header { height: var(--header-height); } #common-header-inner { padding: 0 15px; max-width: 720px; } #title { font-size: 1.6rem; } #header-nav { display: block; } #header-menu-button { display: none; } }
@media (min-width: 992px) { #common-header-inner { padding: 0 20px; max-width: 1140px; } }

/* Header Image Styles */
.header-image-enable #common-header { }
.header-image-enable body { padding-top: 0; }
.header-image-enable #blog-title { margin: 0; padding: 0; border: none; text-align: center; height: auto; display: block; }
.header-image-enable #blog-title-inner { height: 250px; background-size: cover; background-position: center; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--border-radius); overflow: hidden; margin-bottom: 2em; position: relative; }
.header-image-enable #blog-title-inner #title, .header-image-enable #blog-title-inner #blog-description { display: block; color: var(--base-color); text-shadow: 0 1px 3px rgba(0,0,0,0.5); position: relative; z-index: 1; text-align: center; }
.header-image-enable #blog-title-inner #title { font-size: 2.5rem; margin-bottom: 0.3em; text-transform: uppercase; line-height: 1.2; }
.header-image-enable #blog-title-inner #title a { color: inherit; letter-spacing: 2px; text-transform: uppercase; }
.header-image-enable #blog-title-inner #blog-description { font-size: 1rem; font-weight: 400; color: var(--base-color); display: block; }
@media (max-width: 767px) { .header-image-enable #blog-title-inner { height: 200px; margin-bottom: 1.5em; } .header-image-enable #blog-title-inner #title { font-size: 2rem; } .header-image-enable #blog-title-inner #blog-description { font-size: 0.9rem; } }
#top-editarea { margin-bottom: 2em; }

/* --- Breadcrumbs --- */
.breadcrumb {
    font-size: 0.85rem; color: var(--light-text-color); margin-bottom: 1.5em;
    padding: 0.5em 0; border-bottom: 1px solid var(--border-color);
    /* 背景、影、左右マージン、角丸は削除 (親: #wrapper でスタイル適用) */
}
.breadcrumb a { color: var(--light-text-color); }
.breadcrumb a:hover { color: var(--primary-color); }
/* @media (min-width: 768px) 内の .breadcrumb スタイルも不要 */


/* --- Entry (Article) --- */
.entry { margin-bottom: 4em; } /* トップページ等での記事間隔 */
.page-entry .entry { margin-bottom: 0; } /* 記事詳細ページでは .entry 自体のマージン不要 */

/* --- Index / Archive Page Entry Card --- */
.page-index .entry,
.page-archive .entry {
    background-color: var(--base-color); border-radius: var(--border-radius); padding: 1.5em; margin-bottom: 2em;
    box-shadow: var(--box-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column; gap: 1em; margin-left: 10px; margin-right: 10px;
}
.page-index .entry:hover, .page-archive .entry:hover { transform: translateY(-5px); box-shadow: var(--box-shadow-hover); }
.page-index .entry-thumb-link, .page-archive .entry-thumb-link { display: block; margin-bottom: 0; }
.page-index .entry-thumb, .page-archive .entry-thumb { border-radius: var(--border-radius); display: block; width: 100%; height: auto; object-fit: cover; }
.page-archive .entry-thumb { height: 150px; }
.page-index .entry-body, .page-archive .entry-body { display: flex; flex-direction: column; gap: 0.5em; }
.page-index .entry-header, .page-archive .entry-header { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.page-index .entry-title, .page-archive .entry-title { font-size: 1.3rem; margin: 0; }
.page-index .entry-title a, .page-archive .entry-title a { color: inherit; }
.page-index .date, .page-archive .date { font-size: 0.8rem; color: var(--light-text-color); margin-bottom: 0; }
.page-index .categories, .page-archive .categories { margin: 0; font-size: 0.8rem; line-height: 1.5; }
.page-index .categories a, .page-archive .categories a { margin-right: 0.5em; margin-bottom: 0.3em; background-color: var(--primary-color); color: var(--base-color); padding: 0.1em 0.5em; border-radius: 3px; text-decoration: none; font-size: 0.75rem; font-weight: 700; display: inline-block; transition: background-color 0.3s ease; }
.page-index .categories a:hover, .page-archive .categories a:hover { background-color: var(--primary-dark-color); color: var(--base-color); }
.page-index .entry-description, .page-archive .entry-description { font-size: 0.9rem; color: var(--light-text-color); line-height: 1.7; margin-top: 0; }
@media (min-width: 768px) { .page-index .entry, .page-archive .entry { flex-direction: row; gap: 1.5em; padding: 2em; align-items: flex-start; margin-left: 0; margin-right: 0; } .page-index .entry-thumb-link, .page-archive .entry-thumb-link { flex: 0 0 200px; } .page-index .entry-thumb, .page-archive .entry-thumb { width: 200px; height: 130px; } .page-index .entry-body, .page-archive .entry-body { flex: 1; gap: 0.6em; } .page-index .entry-title, .page-archive .entry-title { font-size: 1.5rem; } .page-archive .entry-thumb-link { flex-basis: 150px; } .page-archive .entry-thumb { width: 150px; height: 100px; } .page-archive .entry-title { font-size: 1.2rem; } }
@media (min-width: 992px) { .page-index .entry-thumb-link { flex-basis: 250px; } .page-index .entry-thumb { width: 250px; height: 160px; } }


/* --- Single Entry Page (.page-entry) --- */
.page-entry .entry-figure {
    margin: 0 0 1.5em; position: relative; z-index: 0;
}
.page-entry .entry-figure img { border-radius: var(--border-radius); width: 100%; display: block; }

.page-entry .entry-meta-card {
    padding: 0 0 1.5em; margin: 0; position: static;
}
.page-entry .entry-meta-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em 1em; margin-bottom: 1em; font-size: 0.85rem; color: var(--light-text-color); }
.page-entry .categories { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.5em; order: 1; }
.page-entry .categories a { display: inline-block; background-color: var(--primary-color); color: var(--base-color); font-size: 0.75rem; padding: 0.2em 0.8em; border-radius: 4px; text-decoration: none; font-weight: 700; transition: background-color 0.3s ease; }
.page-entry .categories a:hover { background-color: var(--primary-dark-color); color: var(--base-color); }
.page-entry .date { margin: 0; font-size: inherit; display: flex; align-items: center; gap: 0.3em; order: 2; }
.page-entry .reading-time { margin: 0; font-size: inherit; display: flex; align-items: center; gap: 0.3em; order: 3; }
.page-entry .entry-title { margin: 0 0 0.5em; font-size: 1.6rem; font-weight: 700; font-family: var(--font-heading); color: var(--secondary-color); }
.page-entry .entry-title a { color: inherit; text-decoration: none; }
.page-entry .entry-author { display: flex; align-items: center; gap: 0.8em; font-size: 0.9rem; margin-top: 1em; padding-top: 1em; border-top: 1px solid var(--border-color); }
.page-entry .entry-author .author-icon img { width: 40px; height: 40px; border-radius: 50%; }
.page-entry .entry-author .author-name { font-weight: 700; color: var(--secondary-color); }
.page-entry .entry-author .author-name a { color: inherit; }
.page-entry .entry-author .author-name a:hover { color: var(--primary-color); }
@media (min-width: 768px) { .page-entry .entry-title { font-size: 2rem; } }
/* 他のレスポンシブスタイル削除 */
@media (max-width: 767px) {
    .page-entry .entry-meta-header { font-size: 0.8rem; gap: 0.3em 0.8em; }
    .page-entry .categories a { font-size: 0.7rem; padding: 0.15em 0.6em; }
    .page-entry .entry-author { margin-top: 0.8em; padding-top: 0.8em; }
}

/* --- Entry Content (.entry-content) --- */
.entry-content { line-height: 1.8; font-size: 1.125rem; word-wrap: break-word; }
.page-entry .entry-content { padding: 0 0 2em; margin: 0; }
.entry-content p { margin-top: 0; margin-bottom: 1.2em; }
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  position: relative;
  padding-bottom: 10px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--secondary-color);
}

/* 下線の装飾 */
.entry-content h2::after,
.entry-content h3::after,
.entry-content h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: #00A8E8;
  border-radius: 2px;
}

/* サイズ・マージン・パディングはそのまま維持 */
.entry-content h2 {
  font-size: 1.5rem;
  margin-top: 1.8em;
  margin-bottom: 0.8em;
}

.entry-content h3 {
  font-size: 1.3rem;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
}

.entry-content h4 {
  font-size: 1.1rem;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  padding: 4px 10px;
}

.entry-content h5 { font-size: 1rem; margin-top: 1.5em; margin-bottom: 0.8em; }
.entry-content h6 { font-size: 0.9rem; margin-top: 1.5em; margin-bottom: 0.8em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em 1.2em; padding: 0; }
.entry-content li { margin-bottom: 0.6em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content :is(ul, ol) :is(ul, ol) { margin: 0.6em 0 0.6em 1.2em; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: 0.85rem; color: var(--light-text-color); text-align: center; margin-top: 0.5em; }
.entry-content blockquote { border-left: 4px solid var(--blockquote-border-color); margin: 1.5em 0; padding: 0.8em 1.2em; background-color: var(--blockquote-bg-color); color: var(--light-text-color); font-style: italic; border-radius: 0 var(--border-radius) var(--border-radius) 0; }
.entry-content blockquote p:first-child { margin-top: 0; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content pre { background-color: var(--pre-bg-color); color: var(--pre-text-color); border: none; white-space: pre; word-wrap: break-word; font-size: 0.8rem; line-height: 1.6; padding: 1.2em; border-radius: var(--border-radius); overflow-x: auto; font-family: var(--font-code); margin: 1.5em 0; }
.entry-content pre code { padding: 0; background-color: transparent; color: inherit; font-size: inherit; border-radius: 0; margin: 0; white-space: pre; display: block; }
.entry-content code { font-family: var(--font-code); font-size: 0.85em; margin: 0 2px; padding: 0.2em 0.4em; background-color: var(--code-bg-color); border-radius: 4px; color: var(--code-text-color); }
.entry-content hr { border: 0; border-top: 1px solid var(--border-color); margin: 3em auto; width: 60%; }
.entry-content table { border-collapse: collapse; border-spacing: 0; margin-bottom: 1.5em; width: 100%; overflow-x: auto; display: block; font-size: 0.85rem; border: 1px solid var(--border-color); border-radius: var(--border-radius); }
.entry-content thead, .entry-content tbody { display: block; }
.entry-content tr { display: table; width: 100%; table-layout: fixed; }
.entry-content th, .entry-content td { border: 1px solid var(--border-color); padding: 0.6em 0.8em; text-align: left; border-top: none; border-left: none; border-right: none; }
.entry-content tr:last-child th, .entry-content tr:last-child td { border-bottom: none; }
.entry-content th { background-color: var(--light-gray-color); font-weight: 700; color: var(--secondary-color); }
.entry-content tr:nth-child(even) td { background-color: var(--light-gray-color); }
.entry-content .tip-box { background-color: var(--tip-box-bg-color); border-left: 5px solid var(--tip-box-border-color); padding: 1.2em; margin: 1.5em 0; border-radius: 0 var(--border-radius) var(--border-radius) 0; box-shadow: var(--box-shadow); }
.entry-content .tip-box p:first-child { margin-top: 0; }
.entry-content .tip-box p:last-child { margin-bottom: 0; }
.entry-content .tip-box strong { color: var(--primary-color); }
.entry-content .table-of-contents { padding: 1.2em; margin: 1.5em 0; border: 1px solid var(--border-color); background-color: var(--light-gray-color); border-radius: var(--border-radius); }
.entry-content ul.table-of-contents { font-size: 1.125rem !important; line-height: 1.6; color: var(--light-text-color) !important; display: block; border: 1px solid #c0c0c0 !important; margin: 0; padding-left: 1.2em; list-style: none; display: inline-block; }
.entry-content ul.table-of-contents li { margin: 5px 0 10px 6px !important; padding: 0; list-style-type: none !important; position: relative; line-height: 1.5; }
.entry-content ul.table-of-contents li::before { font-family: blogicon; content: "\f008"; position: absolute; left: -1.2em; top: 0.1em; color: #5a6dba; font-size: 0.9em; }
.entry-content ul.table-of-contents a { color: #4169e1 !important; text-decoration: none !important; font-weight: 600; }
.entry-content ul.table-of-contents a:hover { color: #000000 !important; text-decoration: underline !important; }
.entry-content ul.table-of-contents a::after { display: none !important; }
@media (min-width: 768px) {
    .entry-content { font-size: 1.125rem; padding-bottom: 2.5em; }
    .entry-content p { margin-bottom: 1.5em; }
    .entry-content h2 { font-size: 1.6rem; margin-top: 2em; margin-bottom: 1em; }
    .entry-content h3 { font-size: 1.4rem; margin-top: 1.8em; margin-bottom: 1em; }
    .entry-content h4 { font-size: 1.2rem; margin-top: 1.6em; margin-bottom: 0.8em;}
    .entry-content ul, .entry-content ol { margin-left: 1.5em; margin-bottom: 1.5em; }
    .entry-content blockquote { padding: 1em 1.5em; }
    .entry-content pre { padding: 1.5em; font-size: 0.85rem; }
    .entry-content table { font-size: 0.9rem; }
    .entry-content th, .entry-content td { padding: 0.8em 1em; }
    .entry-content .tip-box { padding: 1.5em; margin: 2em 0; }
    .entry-content .table-of-contents { padding: 1.5em; margin: 2em 0; }
    .entry-content ul.table-of-contents { padding-left: 1.5em; }
}
@media (min-width: 992px) { .entry-content { padding-bottom: 3em; } }


/* --- Entry Footer --- */
.entry-footer {
    padding-top: 2em; border-top: 1px solid var(--border-color); font-size: 0.9rem;
    color: var(--light-text-color); padding: 2em 0 1.5em; margin-bottom: 2em;
    /* 背景、影、マージン、角丸削除 */
}
.entry-footer .social-buttons { margin-bottom: 1.5em; }
.entry-footer-section { margin-bottom: 1em; }
.entry-footer-section a { color: var(--light-text-color); margin-right: 1em; }
.entry-footer-section a:hover { color: var(--primary-color); }
@media (min-width: 768px) { .entry-footer { padding: 2em 0 1.5em; } }


/* --- Comments --- */
.comment-box {
    margin-top: 2em; padding-top: 2em; border-top: 1px solid var(--border-color);
    padding: 2em 0 1.5em; margin-bottom: 2em;
    /* 背景、影、マージン、角丸削除 */
}
.comment-box h2.comment-box-title { font-size: 1.4rem; margin-top: 0; margin-bottom: 1.5em; text-align: center; color: var(--secondary-color); }
.comment-box .comment { list-style: none; margin: 0 0 1.5em 0; padding: 0; }
.comment-box .entry-comment { padding: 1.5em 0 1.5em 65px; border-bottom: 1px solid var(--border-color); position: relative; min-height: 50px; }
.comment-box .entry-comment:first-child { border-top: 1px solid var(--border-color); }
.comment-box .hatena-id-icon { position: absolute; top: 1.5em; left: 0; width: 50px !important; height: 50px !important; border-radius: 50%; }
.comment-user-name { margin: 0 0 0.4em 0; font-weight: 700; color: var(--secondary-color); font-size: 0.95rem; }
.comment-user-name a { color: inherit; }
.comment-content { margin: 0 0 0.6em 0; word-wrap: break-word; color: var(--text-color); font-size: 0.9rem; line-height: 1.7; }
.comment-content p { margin: 0 0 0.8em 0; }
.comment-metadata { color: var(--light-text-color); margin: 0; font-size: 0.8rem; }
.comment-metadata a { color: var(--light-text-color); }
.comment-metadata a:hover { color: var(--primary-color); }
/* Comment Form */
.leave-comment-title { padding: 0.8em 1.2em; font-size: 0.9rem; border: 1px solid var(--border-color); background-color: var(--light-gray-color); border-radius: var(--border-radius) var(--border-radius) 0 0; margin-bottom: 0; font-weight: 700; color: var(--secondary-color); }
.comment-form-textarea { width: 100%; padding: 1em; border: 1px solid var(--border-color); border-top: none; border-radius: 0 0 var(--border-radius) var(--border-radius); box-sizing: border-box; min-height: 100px; font-family: var(--font-body); font-size: 0.9rem; margin-bottom: 1em; background-color: var(--base-color); }
.comment-form-submit { display: inline-block; background-color: var(--primary-color); color: var(--base-color); border: none; padding: 0.8em 1.8em; font-size: 0.9rem; font-family: var(--font-heading); font-weight: 700; border-radius: var(--border-radius); cursor: pointer; transition: var(--transition); }
.comment-form-submit:hover { background-color: var(--primary-dark-color); }
@media (min-width: 768px) { .comment-box { padding: 2em 0 1.5em; } }


/* --- Pager (Prev/Next Links) --- */
.pager {
    margin-top: 2em; margin-bottom: 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1em;
    padding: 1.5em 0; border-top: 1px solid var(--border-color);
    /* 背景、影、マージン、角丸削除 */
}
.pager a { display: inline-flex; align-items: center; gap: 0.5em; padding: 0.6em 1.2em; border: 1px solid var(--border-color); border-radius: var(--border-radius); color: var(--secondary-color); text-decoration: none; transition: var(--transition); font-size: 0.9rem; font-weight: 700; background-color: var(--light-gray-color); }
.pager a:hover { background-color: #e9ecef; border-color: #dee2e6; color: var(--primary-color); }
.pager .pager-prev a::before { content: '<'; margin-right: 0.3em; font-weight: bold; }
.pager .pager-next a::after { content: '>'; margin-left: 0.3em; font-weight: bold; }
.pager .pager-arrow { display: none; }
@media (min-width: 768px) { .pager { padding: 1.5em 0; } }


/* --- Sidebar (#box2 & .footer-mobile-sidebar) --- */
/* サイドバーはカードスタイル維持 */
#box2 .hatena-module,
.footer-mobile-sidebar .hatena-module {
    margin-bottom: 2.5em; font-size: 0.9rem;
    background-color: var(--base-color); padding: 1.5em; border-radius: var(--border-radius); box-shadow: var(--box-shadow);
}
#box2 .hatena-module:last-child,
.footer-mobile-sidebar .hatena-module:last-child { margin-bottom: 0; }
#box2 .hatena-module-title,
.footer-mobile-sidebar .hatena-module-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--secondary-color); margin: 0 0 1em 0; padding-bottom: 0.5em; border-bottom: 2px solid var(--primary-color); display: inline-block; }
#box2 .hatena-module-title a,
.footer-mobile-sidebar .hatena-module-title a { color: inherit; text-decoration: none; }
#box2 .hatena-module-title a:hover,
.footer-mobile-sidebar .hatena-module-title a:hover { color: var(--primary-color); }
#box2 .hatena-module-profile { text-align: center; }
#box2 .hatena-module-profile .profile-icon { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 1em; display: block; float: none; }
#box2 .hatena-module-profile .id { display: block; font-weight: 700; margin-bottom: 0.5em; font-size: 1rem; text-align: center; }
#box2 .hatena-module-profile .id a { color: var(--secondary-color); }
#box2 .hatena-module-profile .id a:hover { color: var(--primary-color); }
#box2 .hatena-module-profile .profile-description { font-size: 0.85rem; color: var(--light-text-color); line-height: 1.7; text-align: center; }
#box2 .hatena-module-profile .profile-description p { margin: 0 0 0.8em 0; }
#box2 .hatena-module-profile .profile-description p:last-child { margin-bottom: 0; }
.footer-mobile-sidebar .hatena-module-profile { text-align: left; overflow: hidden; }
.footer-mobile-sidebar .hatena-module-profile .profile-icon { float: left; margin: 0 10px 10px 0; width: 60px; height: 60px; }
.footer-mobile-sidebar .hatena-module-profile .id { text-align: left; margin-bottom: 0.5em; display: block; }
.footer-mobile-sidebar .hatena-module-profile .profile-description { clear: left; text-align: left; }
.hatena-urllist { list-style: none; margin: 0; padding: 0; }
.hatena-urllist li { padding: 0.6em 0; border-bottom: 1px dashed var(--border-color); position: relative; }
.hatena-urllist li:first-child { padding-top: 0; }
.hatena-urllist li:last-child { padding-bottom: 0; border-bottom: none; }
.hatena-urllist li a { text-decoration: none; color: var(--secondary-color); display: block; padding-left: 1.2em; transition: color 0.3s ease; }
.hatena-urllist li a:hover { color: var(--primary-color); }
.hatena-urllist li::before { position: absolute; left: 0; top: 0.6em; color: var(--primary-color); font-size: 0.8em; width: 1em; text-align: center; font-family: blogicon; }
.hatena-module-recent-entries .hatena-urllist li::before { content: '\f016'; }
.hatena-module-category .hatena-urllist li::before { content: '\f07c'; }
.hatena-module-archive .hatena-urllist li::before { content: '\f187'; }
.hatena-module-search-box .search-form { border: 1px solid var(--border-color); border-radius: var(--border-radius); width: 100%; box-sizing: border-box; display: flex; align-items: center; background-color: var(--base-color); overflow: hidden; }
.hatena-module-search-box .search-module-input { flex: 1 1 auto; padding: 0.8em 1em; color: var(--text-color); background: none; border: none; outline: none; height: auto; font-size: 0.9rem; font-family: var(--font-body); min-width: 0; }
.hatena-module-search-box .search-module-button { flex: 0 0 40px; width: 40px; height: 40px; margin: 0; background-color: var(--primary-color); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffffff'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z' clip-rule='evenodd'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 20px 20px; border: none; outline: none; color: transparent; overflow: hidden; cursor: pointer; transition: var(--transition); opacity: 1; }
.hatena-module-search-box .search-module-button:hover { background-color: var(--primary-dark-color); opacity: 1; }


/* --- Archive Page Specifics --- */
/* アーカイブページはカードスタイル維持 */
.page-archive .archive-header { text-align: center; margin-bottom: 2em; padding-bottom: 1em; border-bottom: 1px solid var(--border-color); background-color: var(--base-color); padding: 1.5em; border-radius: var(--border-radius); box-shadow: var(--box-shadow); margin-left: 10px; margin-right: 10px; }
.page-archive .archive-header h1 { margin-bottom: 0.2em; font-size: 1.8rem; }
.page-archive .archive-header p { color: var(--light-text-color); font-size: 0.9rem; margin-top: 0; }
@media (min-width: 768px) { .page-archive .archive-header { margin-left: 0; margin-right: 0; padding: 2em; } }


/* --- Footer --- */
#footer { margin-top: 0; padding: 3em 15px 1.5em; text-align: left; font-size: 0.9rem; color: var(--secondary-color); background-color: var(--base-color); border-top: 1px solid var(--border-color); }
#footer .footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-columns { display: flex; flex-direction: column; gap: 2.5em; margin-bottom: 2.5em; }
.footer-column { flex: 1; min-width: 0; }
.footer-column h4 { font-size: 1.1rem; font-family: var(--font-heading); font-weight: 700; color: var(--secondary-color); margin: 0 0 1em 0; padding-bottom: 0.5em; border-bottom: 2px solid var(--primary-color); display: inline-block; }
.footer-column p { font-size: 0.85rem; line-height: 1.7; color: var(--light-text-color); margin: 0 0 1em 0; }
.footer-column ul { list-style: none; margin: 0; padding: 0; }
.footer-column li { margin-bottom: 0.6em; }
.footer-column a { color: var(--text-color); text-decoration: none; transition: color 0.3s ease; font-size: 0.9rem; }
.footer-column a:hover { color: var(--primary-color); text-decoration: underline; }
.footer-sns { display: flex; gap: 1em; margin-top: 1.5em; }
.footer-sns a { display: inline-block; color: var(--secondary-color); text-decoration: none; }
.footer-sns a:hover { color: var(--primary-color); }
.footer-sns svg { width: 24px; height: 24px; fill: currentColor; vertical-align: middle; }
.copyright { text-align: center; font-size: 0.8rem; color: var(--light-text-color); padding-top: 1.5em; border-top: 1px solid var(--border-color); margin-top: 0; }
.copyright a { color: var(--light-text-color); text-decoration: underline; }
.copyright a:hover { color: var(--primary-color); }
@media (min-width: 768px) { #footer { padding: 4em 15px 2em; } .footer-columns { flex-direction: row; gap: 40px; margin-bottom: 3em; } .footer-column { min-width: 200px; } }
@media (min-width: 992px) { #footer { padding-left: 20px; padding-right: 20px; } }