*/
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
   ========================================================================== */
/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in
 *    IE on Windows Phone and in iOS.
 */
html {
    line-height: 1.15;
    /* 1 */
    -ms-text-size-adjust: 100%;
    /* 2 */
    -webkit-text-size-adjust: 100%;
    /* 2 */
}

/* Sections
   ========================================================================== */
/**
 * Remove the margin in all browsers (opinionated).
 */
body {
    margin: 0;
}

/**
 * Add the correct display in IE 9-.
 */
article,
aside,
footer,
header,
nav,
section {
    display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */
h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

/* Grouping content
   ========================================================================== */
/**
 * Add the correct display in IE 9-.
 * 1. Add the correct display in IE.
 */
figcaption,
figure,
main {
    /* 1 */
    display: block;
}

/**
 * Add the correct margin in IE 8.
 */
figure {
    margin: 1em 40px;
}

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */
hr {
    -webkit-box-sizing: content-box;
            box-sizing: content-box;
    /* 1 */
    height: 0;
    /* 1 */
    overflow: visible;
    /* 2 */
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
pre {
    font-family: monospace, monospace;
    /* 1 */
    font-size: 1em;
    /* 2 */
}

/* Text-level semantics
   ========================================================================== */
/**
 * 1. Remove the gray background on active links in IE 10.
 * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
 */
a {
    background-color: transparent;
    /* 1 */
    -webkit-text-decoration-skip: objects;
    /* 2 */
}

/**
 * 1. Remove the bottom border in Chrome 57- and Firefox 39-.
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */
abbr[title] {
    border-bottom: none;
    /* 1 */
    text-decoration: underline;
    /* 2 */
    -webkit-text-decoration: underline dotted;
            text-decoration: underline dotted;
    /* 2 */
}

/**
 * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
 */
b,
strong {
    font-weight: inherit;
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */
b,
strong {
    font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */
code,
kbd,
samp {
    font-family: monospace, monospace;
    /* 1 */
    font-size: 1em;
    /* 2 */
}

/**
 * Add the correct font style in Android 4.3-.
 */
dfn {
    font-style: italic;
}

/**
 * Add the correct background and color in IE 9-.
 */
mark {
    background-color: #ff0;
    color: #000;
}

/**
 * Add the correct font size in all browsers.
 */
small {
    font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */
sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

/* Embedded content
   ========================================================================== */
/**
 * Add the correct display in IE 9-.
 */
audio,
video {
    display: inline-block;
}

/**
 * Add the correct display in iOS 4-7.
 */
audio:not([controls]) {
    display: none;
    height: 0;
}

/**
 * Remove the border on images inside links in IE 10-.
 */
img {
    border-style: none;
}

/**
 * Hide the overflow in IE.
 */
svg:not(:root) {
    overflow: hidden;
}

/* Forms
   ========================================================================== */
/**
 * 1. Change the font styles in all browsers (opinionated).
 * 2. Remove the margin in Firefox and Safari.
 */
button,
input,
optgroup,
select,
textarea {
    font-family: sans-serif;
    /* 1 */
    font-size: 100%;
    /* 1 */
    line-height: 1.15;
    /* 1 */
    margin: 0;
    /* 2 */
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */
button,
input {
    /* 1 */
    overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */
button,
select {
    /* 1 */
    text-transform: none;
}

/**
 * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
 *    controls in Android 4.
 * 2. Correct the inability to style clickable types in iOS and Safari.
 */
button,
html [type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    /* 2 */
}

/**
 * Remove the inner border and padding in Firefox.
 */
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 */
fieldset {
    padding: 0.35em 0.75em 0.625em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */
legend {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    /* 1 */
    color: inherit;
    /* 2 */
    display: table;
    /* 1 */
    max-width: 100%;
    /* 1 */
    padding: 0;
    /* 3 */
    white-space: normal;
    /* 1 */
}

/**
 * 1. Add the correct display in IE 9-.
 * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */
progress {
    display: inline-block;
    /* 1 */
    vertical-align: baseline;
    /* 2 */
}

/**
 * Remove the default vertical scrollbar in IE.
 */
textarea {
    overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10-.
 * 2. Remove the padding in IE 10-.
 */
[type="checkbox"],
[type="radio"] {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    /* 1 */
    padding: 0;
    /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */
[type="search"] {
    -webkit-appearance: textfield;
    /* 1 */
    outline-offset: -2px;
    /* 2 */
}

/**
 * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
 */
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */
::-webkit-file-upload-button {
    -webkit-appearance: button;
    /* 1 */
    font: inherit;
    /* 2 */
}

/* Interactive
   ========================================================================== */
/*
 * Add the correct display in IE 9-.
 * 1. Add the correct display in Edge, IE, and Firefox.
 */
details,
menu {
    display: block;
}

/*
 * Add the correct display in all browsers.
 */
summary {
    display: list-item;
}

/* Scripting
   ========================================================================== */
/**
 * Add the correct display in IE 9-.
 */
canvas {
    display: inline-block;
}

/**
 * Add the correct display in IE.
 */
template {
    display: none;
}

/* Hidden
   ========================================================================== */
/**
 * Add the correct display in IE 10-.
 */
[hidden] {
    display: none;
}

html,
body {
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', 'Hiragino Kaku Gothic Pro', 'Meiryo', 'MS PGothic';
    color: #454545;
    background-color: #fff;
    line-height: 1.6;
}

a {
    color: #1487bd;
}

a:hover {
    color: #0f668f;
}

a.keyword {
    text-decoration: none;
    border-bottom: 1px dotted #ddd;
    color: #454545;
}

h1, h2, h3, h4, h5, h6 {
    color: #333;
    line-height: 1.3;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: #333;
    text-decoration: none;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
    color: #0f668f;
}

/* ヘッダ（グローバルヘッダ）
  グローバルヘッダの中はiframeですが、
  #globalheader-container に背景色や文字色を指定することでiframeの中にも色が反映されます。
*/
#globalheader-container {
    background-color: #454545;
    color: #fff;
}

/* container */
#container,
#footer {
    padding-left: 10px;
    padding-right: 10px;
}

@media (min-width: 768px) {
    #container,
    #footer {
        width: 720px;
        margin: auto;
        padding-left: 0;
        padding-right: 0;
    }
}

/* 本文領域の大きさ */
@media (min-width: 992px) {
    #container,
    #footer {
        width: 1040px;
    }
}

/* 2カラムレイアウト */
#content-inner {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}

@media (min-width: 768px) {
    #content-inner {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
            -ms-flex-direction: row;
                flex-direction: row;
    }
}

@media (min-width: 768px) {
    #wrapper {
        width: 480px;
    }
}

/* 本文領域の大きさ */
@media (min-width: 992px) {
    #wrapper {
        width: 740px;
    }
}

@media (min-width: 768px) {
    #box2 {
        width: 200px;
    }
}

@media (min-width: 992px) {
    #box2 {
        width: 260px;
    }
}

/* ヘッダ */
#blog-title {
    margin: 2em 0;
    text-align: center;
}

@media (min-width: 768px) {
    #blog-title {
        margin: 3em 0;
        text-align: left;
    }
}

#title {
    margin: 0;
    font-size: 1.5rem;
}

@media (min-width: 992px) {
    #title {
        font-size: 1.7rem;
    }
}

#title a {
    color: #454545;
}

#blog-description {
    font-weight: normal;
    font-size: .8rem;
    margin: 1em 0 0;
}

/* ヘッダ画像を設定したとき */
.header-image-enable #blog-title {
    margin: 0 0 2em;
}

.header-image-enable #blog-title-inner {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.header-image-enable #blog-title-content {
    margin-left: 10px;
    margin-right: 10px;
}

/* タイトル下HTML */
#top-editarea {
    margin-bottom: 1em;
}

/* パンくず（カテゴリー、記事ページで表示されます） */
.breadcrumb {
    font-size: .9rem;
}

/* entry */
.entry {
    position: relative;
    margin-bottom: 4em;
}

.entry-header {
    padding-bottom: 1em;
    margin-bottom: 2em;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.date {
    margin-bottom: .5em;
    font-size: .9rem;
}

.date a {
    color: #999;
    text-decoration: none;
}

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

.entry-title {
    margin: 0 0 .3em;
    font-size: 1.5rem;
}

@media (min-width: 992px) {
    .entry-title {
        font-size: 1.6rem;
    }
}

.categories {
    margin: .5em 0;
    font-size: .9rem;
}

.categories a {
    margin-right: .5em;
}

/* 「編集する」ボタン */
.entry-header-menu {
    position: absolute;
    top: 0;
    right: 0;
}

/* 記事内の書式 */
.entry-content img,
.entry-content video {
    max-width: 100%;
    height: auto;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin: 1em 0 0.8em 0;
}

.entry-content h1 {
    font-size: 1.5rem;
}

@media (min-width: 992px) {
    .entry-content h1 {
        font-size: 1.7rem;
    }
}

.entry-content h2 {
    font-size: 1.4rem;
}

@media (min-width: 992px) {
    .entry-content h2 {
        font-size: 1.5rem;
    }
}

.entry-content h3 {
    font-size: 1.2rem;
}

@media (min-width: 992px) {
    .entry-content h3 {
        font-size: 1.3rem;
    }
}

.entry-content h4 {
    font-size: 1.1rem;
}

.entry-content h5 {
    font-size: 1rem;
}

.entry-content h6 {
    font-size: .9rem;
}

.entry-content ul,
.entry-content ol,
.entry-content dd {
    margin: 0 0 1em 1.5em;
    padding: 0;
}

.entry-content ul li ul, .entry-content ul li ol,
.entry-content ol li ul,
.entry-content ol li ol,
.entry-content dd li ul,
.entry-content dd li ol {
    margin-bottom: 0;
}

.entry-content table {
    border-collapse: collapse;
    border-spacing: 0;
    border-bottom: 1em;
    margin-bottom: 1em;
    width: 100%;
    overflow: auto;
    display: block;
    font-size: .8rem;
}

@media (min-width: 992px) {
    .entry-content table {
        font-size: .9rem;
    }
}

.entry-content table th,
.entry-content table td {
    border: 1px solid #ddd;
    padding: 5px 10px;
}

.entry-content table th {
    background: #f5f5f5;
}

.entry-content blockquote {
    border: 1px solid #ddd;
    margin: 0 0 10px;
    padding: 20px;
}

.entry-content blockquote p:first-child {
    margin-top: 0;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content pre,
.entry-content code {
    font-family: 'Monaco', 'Consolas', 'Courier New', Courier, monospace, sans-serif;
}

.entry-content pre {
    background: #f5f5f5;
    border: none;
    white-space: pre-wrap;
    text-overflow: ellipsis;
    font-size: 100%;
    line-height: 1.3;
    font-size: .8rem;
    padding: 10px;
}

.entry-content pre > code {
    margin: 0;
    padding: 0;
    white-space: pre;
    border: none;
    background-color: transparent;
    font-family: 'Monaco', 'Consolas', 'Courier New', Courier, monospace, sans-serif;
}

.entry-content code {
    font-size: 90%;
    margin: 0 2px;
    padding: 0px 5px;
    background-color: #f5f5f5;
    border-radius: 3px;
}

.entry-content hr {
    width: 50%;
    border: 0;
    border: none;
    border-top: 1px solid #ddd;
    margin: 2em auto;
}

.entry-content .table-of-contents {
    padding: 1em 1em 1em 2em;
    margin: 1em 0;
    border: 1px solid #ddd;
}

/* 記事下 */
.entry-footer .social-buttons {
    margin-bottom: 1em;
}

.entry-footer-section {
    color: #999;
    font-size: .9rem;
}

.entry-footer-section a {
    color: #999;
}

/* コメント */
.comment-box {
    margin: 1em 0;
}

.comment-box .comment {
    list-style: none;
    margin: 0 0 15px 0;
    padding: 0;
    line-height: 1.7;
    font-size: .85rem;
}

@media (min-width: 768px) {
    .comment-box .comment {
        font-size: .9rem;
    }
}

.comment-box .entry-comment {
    padding: 10px 0 10px 60px;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.comment-box .entry-comment:first-child {
    border-top: 1px solid #ddd;
}

.comment-box .read-more-comments {
    padding: 10px 0;
}

.comment-box .hatena-id-icon {
    position: absolute;
    top: 10px;
    left: 0;
    width: 50px !important;
    height: 50px !important;
    border-radius: 3px;
}

.comment-user-name {
    margin: 0 0 .4em 0;
    font-weight: bold;
}

.comment-content {
    margin: 0 0 .4em 0;
    word-wrap: break-word;
    color: #454545;
    font-size: .85rem;
}

.comment-content p {
    margin: 0 0 .6em 0;
}

.comment-metadata {
    color: #999;
    margin: 0;
    font-size: .8rem;
}

.comment-metadata a {
    color: #999;
}

.leave-comment-title {
    padding: .6em 1em;
    font-size: .85rem;
    border: 1px solid #ddd;
}

/* Pager */
.pager {
    margin: 2em 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}

/* サイドバーモジュール */
.hatena-module {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    margin-bottom: 3em;
    font-size: .85rem;
}

@media (min-width: 768px) {
    .hatena-module {
        font-size: .9rem;
    }
}

.hatena-module-title {
    margin-bottom: .6em;
    padding-bottom: .2em;
    border-bottom: 1px solid #ddd;
    font-size: 1rem;
    font-weight: bold;
}

.hatena-module-title a {
    color: #454545;
    text-decoration: none;
}

.hatena-module-title a:hover {
    text-decoration: underline;
}

/* Profile module */
.hatena-module-profile .profile-icon {
    float: left;
    margin: 0 10px 10px 0;
}

.hatena-module-profile .id {
    display: block;
    font-weight: bold;
    margin-bottom: .5em;
}

.hatena-module-profile .profile-description p {
    margin-top: 0;
}

/* urllist module */
.hatena-urllist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hatena-urllist li {
    padding: .5em 0;
}

.hatena-urllist li:last-child {
    padding-bottom: 0;
}

.hatena-urllist li a {
    text-decoration: none;
}

.hatena-urllist li a:hover {
    text-decoration: underline;
}

.hatena-urllist .urllist-category-link {
    font-size: .7rem;
    padding: .1em .3em;
}

.hatena-urllist .urllist-date-link a {
    color: #999;
}

.hatena-urllist .urllist-entry-body {
    margin-top: .3em;
}

/* Search module */
.hatena-module-search-box .search-form {
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 100%;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.hatena-module-search-box .search-module-input {
    -webkit-box-flex: 1;
        -ms-flex: 1 0;
            flex: 1 0;
    padding: 5px;
    color: #454545;
    background: none;
    border: none;
    outline: none;
    height: 20px;
}

.hatena-module-search-box .search-module-button {
    width: 24px;
    height: 24px;
    margin-right: 5px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3Esearch%3C/title%3E%3Cpath d='M16.7,15l-3.4-3.3h-.1a5.4,5.4,0,0,0,.9-3.1,5.6,5.6,0,1,0-5.6,5.6,5.4,5.4,0,0,0,3.1-.9.1.1,0,0,0,.1.1L15,16.7a1.1,1.1,0,0,0,.8.3,1.6,1.6,0,0,0,.9-.3,1.4,1.4,0,0,0,0-1.7M8.5,12.3A3.8,3.8,0,0,1,4.8,8.5,3.8,3.8,0,0,1,8.5,4.7a3.9,3.9,0,0,1,3.8,3.8,3.8,3.8,0,0,1-3.8,3.8'/%3E%3Crect class='a' width='20' height='20'/%3E%3C/svg%3E") no-repeat center;
    background-size: 20px 20px;
    border: none;
    outline: none;
    color: transparent;
    overflow: hidden;
    opacity: .5;
    cursor: pointer;
}

.hatena-module-search-box .search-module-button:hover {
    opacity: .85;
}

/* About ページ */
.page-about .entry-content dt {
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    margin-bottom: .5em;
}

.page-about .entry-content dd {
    margin-left: 0;
    margin-bottom: 2em;
}

/* Archive */
.archive-header-category {
    text-align: center;
}

.page-archive .archive-entry {
    margin-bottom: 3em;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

.page-archive .entry-title {
    margin: .3em auto;
}

.page-archive .entry-thumb {
    width: 80px;
    height: 80px;
    background-size: cover;
}

@media (min-width: 768px) {
    .page-archive .entry-thumb {
        width: 120px;
        height: 120px;
    }
}

.page-archive .entry-description {
    margin: 0;
    font-size: .85rem;
}

@media (min-width: 768px) {
    .page-archive .entry-description {
        font-size: .9rem;
    }
}

.page-archive .social-buttons {
    display: block;
    margin-top: .3em;
}

/* footer */
#footer {
    margin-top: 2em;
    padding-bottom: 2rem;
    text-align: center;
    font-size: .8rem;
    color: #999;
}

#footer a {
    color: #999;
}

#footer p {
    margin: .5em auto;
}
/*# 

/*********************************************************************************/

/* Mermaid用 */
.entry-content pre.code.mermaid {
  background: none;
  border: none;
  padding: 0;
}

.entry-content pre.code.mermaid[data-lang="mermaid"]:before {
  content: none;
}

/* 記事下のはてなID */
.entry-footer .author.vcard { display: none; }










/* --- 全体要素の上下順番入れ替え --- */
#container-inner {
  display: flex;
  flex-direction: column;
}

/* --- 1. 最上部：ロゴエリア（左寄せ設定） --- */
#top-editarea {
  order: 1;
  width: 100%;
  margin-bottom: 64px;
}

#top-editarea #header {
  display: flex;
  justify-content: flex-start; /* 左寄せ */
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #e5e5e5; /* 下の区切り線 */
  background-color: #fff;
}

#top-editarea #logo img {
  height: 28px; /* ロゴの高さ */
  width: auto;
  display: block;
}

#blog-title {
  order: 2;
}

#content {
  order: 3;
}

.breadcrumb, #top-box {
  display: none !important;
}










/* ============================================================
   LeadingMark Tech Blog / カスタムスタイル
   ※ この上のテーマ標準部分（normalize〜#footer）は変更しない
   ============================================================ */

/* ---------- 0. トークン ---------- */
:root {
  /* ブランド指定: #231815 (C:40 M:40 Y:40 K:100) */
  --lm-fg:        #231815;
  --lm-fg-sub:    #6b625f;
  --lm-fg-mute:   #9b938f;
  --lm-line:      #e3e0df;
  --lm-bg:        #ffffff;
  --lm-radius:    6px;
}

html { overflow-x: clip; }


/* ---------- 1. 全体の並び順 ---------- */
/* タイトル下HTML（ヒーロー）を最上部へ持ち上げる */
#container-inner {
  display: flex;
  flex-direction: column;
}

#top-editarea { order: 1; }
#blog-title   { order: 2; }
#content      { order: 3; }

/* 標準のブログタイトル領域は非表示。
   ブログ名はタイトル下HTMLのヒーローが担う */
#blog-title { display: none; }


/* ---------- 2. ヒーローヘッダー ---------- */
/* 全ページ共通。記事ページでも一覧と同じサイズで表示する */
#top-editarea {
  width: 100%;
  margin-bottom: 40px;
}

#top-editarea #header {
  display: block;
  padding: 0;
  border: none;
  background-color: var(--lm-fg);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, .028) 0 2px,
    transparent 2px 14px
  );
  /* コンテナ幅を越えて画面端まで背景を伸ばす */
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
}

.lm-hero {
  max-width: 1040px;
  margin-inline: auto;
  padding: 32px 0 30px;
  text-align: center;
  /* 親の line-height 1.6 を継承するとロゴ下にベースライン余白が出る */
  line-height: 1;
}

.lm-hero__logo {
  /* inline-block だとベースライン下に余白が残るため block にする */
  display: block;
  width: -webkit-fit-content;
  width: fit-content;
  margin: 0 auto 14px;
  line-height: 0;
}
.lm-hero__logo img {
  height: 60px;
  width: auto;
  display: block;
  /* 濃色ロゴを白へ反転。白版画像を用意できるならこの行は削除 */
  filter: brightness(0) invert(1);
}

.lm-hero__title {
  margin: 0 0 8px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.2;
  color: #fff;
}

.lm-hero__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .7);
}


/* ---------- 3. 記事一覧: 縦1列 ---------- */
/* サイドバーと併存させるため、カードは横に割らず縦に積む */
.archive-entries {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.archive-entry {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius);
  background: var(--lm-bg);
  transition: border-color .2s ease;
}
.archive-entry:hover { border-color: var(--lm-fg-mute); }

.archive-entry .archive-date {
  font-size: 12px;
  color: var(--lm-fg-mute);
  margin-bottom: 8px;
}

.archive-entry .entry-title {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
  margin: 0 0 12px;
}
.archive-entry .entry-title a {
  color: var(--lm-fg);
  text-decoration: none;
}
.archive-entry .entry-title a:hover { text-decoration: underline; }

.archive-entry .entry-description {
  font-size: 14px;
  line-height: 1.9;
  color: var(--lm-fg-sub);
  margin: 0;
  /* サムネが左に回り込むためクランプはかけない
     （floatと干渉して不自然に切れる） */
}

/* カテゴリのピル。一覧カード・記事詳細の両方に適用する */
.archive-entry .categories,
.entry-header .categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.archive-entry .categories a,
.entry-header .categories a {
  font-size: 11px;
  line-height: 1.6;
  padding: 3px 12px;
  margin-right: 0;   /* テーマ標準の margin-right: .5em を打ち消す */
  border: 1px solid var(--lm-line);
  border-radius: 999px;
  color: var(--lm-fg-sub);
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
}
.archive-entry .categories a:hover,
.entry-header .categories a:hover {
  border-color: var(--lm-fg-mute);
  color: var(--lm-fg);
}


/* ---------- 4. アイキャッチ（小さめ・左配置） ---------- */
.archive-entry .entry-thumb-link {
  float: left;
  margin: 0 16px 12px 0;
}

.archive-entry .entry-thumb {
  width: 180px;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
}

/* サムネが <img> で出力される場合の保険 */
.archive-entry .entry-thumb-link img,
.archive-entry .entry-thumb img {
  width: 180px;
  height: 101px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* floatを閉じてカードの高さを確保 */
.archive-entry::after {
  content: "";
  display: block;
  clear: both;
}


/* ---------- 5. ページャ ---------- */
/* .pager は flex + space-between。prev が左、next が右に分かれる */
.pager {
  margin: 32px 0 0;
  gap: 12px;
}

.pager-prev a,
.pager-next a {
  display: block;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--lm-fg);
  text-decoration: none;
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.pager-prev a:hover,
.pager-next a:hover {
  background: var(--lm-fg);
  border-color: var(--lm-fg);
  color: var(--lm-bg);
}

/* 片方しか無いとき（最初・最後のページ）でも左右の位置を保つ */
.pager-prev { margin-right: auto; }
.pager-next { margin-left: auto; }


/* ---------- 6. サイドバー ---------- */
#box2 .hatena-module {
  border: 1px solid var(--lm-line);
  border-radius: var(--lm-radius);
  padding: 20px;
  margin-bottom: 20px;
  background: var(--lm-bg);
}
#box2 .hatena-module-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 14px;
  padding: 0;
  border: none;
}
#box2 .hatena-module-body a { color: var(--lm-fg-sub); }
#box2 .hatena-module-title a {
  color: var(--lm-fg);
}

/* ---------- 7. 記事本文 ---------- */
/* 大見出しは前セクションと十分に離す */
.entry-content h1 {
  margin-top: 4rem;
  font-size: 2.0em;
}

/* Mermaid図はコードブロックの装飾を外す */
.entry-content pre.code.mermaid {
  background: none;
  border: none;
  padding: 0;
}
.entry-content pre.code.mermaid[data-lang="mermaid"]:before {
  content: none;
}
.entry-content p {
  color: var(--lm-fg-sub);
}

/* ---------- 8. 著者情報 ---------- */
/* 記事下のはてなIDは著者カードと重複するため非表示 */
.entry-footer .author.vcard { display: none; }

.author-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  margin-top: 32px;
  border: 1px solid var(--lm-line);
  border-radius: 8px;
}
.author-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
}
.author-card__name { font-weight: bold; margin: 0 0 4px; color: var(--lm-fg); }
.author-card__bio  { font-size: .9em; margin: 0 0 8px; }


/* ---------- 9. レスポンシブ ---------- */
@media (max-width: 991px) {
  .lm-hero { padding: 28px 24px 26px; }
  .lm-hero__logo img { height: 50px; }
  .lm-hero__title { font-size: 30px; }
}

@media (max-width: 767px) {
  #top-editarea { margin-bottom: 28px; }
  .lm-hero { padding: 24px 20px 22px; }
  .lm-hero__logo { margin-bottom: 12px; }
  .lm-hero__logo img { height: 40px; }
  .lm-hero__title { font-size: 24px; margin-bottom: 6px; }
  .lm-hero__desc { font-size: 13px; }
}

@media (max-width: 640px) {
  .archive-entry { padding: 20px; }
  .archive-entry .entry-title { font-size: 18px; }
}


/* ---------- 10. アクセシビリティの床 ---------- */
a:focus-visible { outline: 2px solid var(--lm-fg); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}