/* <system section="theme" selected="26006613659732769"> */
/* <system section="theme" selected="26006613652605202"> */
@charset "UTF-8";
/*
  Theme: Cuppuccino
  Author: fujiguchi
  Responsive: yes
  Description:
    大人可愛い（かっこいい）デザインのはてなブログテーマです。
    カスタマイズが苦手な方でもすぐに使えるようになっています。
*/
@import url('https://fonts.googleapis.com/css2?family=Fredericka+the+Great&display=swap');
:root {
  --theme-color: #2a2922;
  --navigation-color: #7d5642;
  --navigation-hover-color: #9a725d;
  --main-color: #7d5642;
  --main-text-color: #fff;
  --font-color: #5f5750;
  --accent-color: #57a085;
  --shadow1-color: rgba(0,0,0,.1);
  --shadow2-color: rgba(0,0,0,.06);
}
/*! 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 */
    scroll-behavior: smooth;
}

/* 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: 0;
}

/**
 * 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: -apple-system, BlinkMacSystemFont, Segoe UI, 'Helvetica Neue', 'Helvetica', 'Arial', 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
    color: #454545;
    background: #f3ebdd;
    line-height: 1.6;
}

a {
    color: #454545;
    text-decoration: none;
    -webkit-transition: .1s;
    transition: .1s;
}

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: #5f5750;
    color: var(--font-color);
    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;
}

#globalheader-container {
    background: var(--theme-color);  
}

/* container */
#content {
    margin-top: 2rem;
}

/* 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;
    max-width: 1200px;
    margin: 0 auto;
}

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

#top-box {
    max-width: 1200px;
    margin: 0 auto 1em;
    box-sizing: border-box;
}

#main {
    width: 100%;
}

#main-inner, #box2-inner, .breadcrumb {
    padding: 0 10px;
}

.page-entry #main-inner {
  padding: 0;
}

#box2 {
    word-wrap: break-word;
}
@media (min-width: 992px) {
    #box2 {
        width: 370px;
    }
}

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

@media (min-width: 768px) {
    #blog-title {
      padding: 3em;
    }
    #title {
        font-size: 2.5rem;
    }
    .page-archive #content {
        margin-top: 3rem;
    }
    .page-archive-category #content {
    margin-top: 0;
}
}

#title {
    margin: 0;
    font-weight: normal;
    font-family: 'Fredericka the Great', cursive;
}

@media (min-width: 992px) {
    #title {
        font-size: 3rem;
    }
    #wrapper {
        width: calc( 100% - 370px);
    }
    #box2-inner {
      padding: 0;
    }
}

#title a {
    color: #454545;
    color: #fff;
    text-shadow: 3px 3px 5px black;
}

#blog-description {
    font-weight: normal;
    font-size: .8rem;
    margin: .5em 0 0;
    text-shadow: 1px 1px 2px black;
    color: #fff;
}

/* ヘッダ画像を設定したとき */
.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: 0 auto;
}

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

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

/* entry */
.entry {
    position: relative;
    margin-bottom: 3em;
    line-height: 1.8;
    padding: 1rem 4.5vw;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 5px 10px var(--shadow-color);
    box-shadow: rgba(0,0,0,.1), rgba(0,0,0,.06);
    box-shadow: var(--shadow1-color) 0px 4px 6px -1px, var(--shadow2-color) 0px 2px 4px -1px;
    word-break: break-word;
}

.entry-header {
    margin-bottom: 2em;
    position: relative;
}


time[title*="-01-"] .date-month::before {
  content: 'JANUARY';
}

time[title*="-02-"] .date-month::before {
  content: 'FEBRUARY';
}

time[title*="-03-"] .date-month::before {
  content: 'MARCH';
}

time[title*="-04-"] .date-month::before {
  content: 'APRIL';
}

time[title*="-05-"] .date-month::before {
  content: 'MAY';
}

time[title*="-06-"] .date-month::before {
  content: 'JUNE';
}

time[title*="-07-"] .date-month::before {
  content: 'JULY';
}

time[title*="-08-"] .date-month::before {
  content: 'AUGUST';
}

time[title*="-09-"] .date-month::before {
  content: 'SEPTEMBER';
}

time[title*="-10-"] .date-month::before {
  content: 'OCTOBER';
}

time[title*="-11-"] .date-month::before {
  content: 'NOVEMBER';
}

time[title*="-12-"] .date-month::before {
  content: 'DECEMBER';
}

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

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

.entry-title {
    margin: 0 0 .3em;
    padding-bottom: .5em;
    font-size: 1.5rem;
    border-bottom: solid 2px #5f5750;
    border-bottom: solid 2px var(--font-color);
}

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

.page-archive .categories {
    position: absolute;
    bottom: 0;
    font-size: .75rem;
    z-index: 2;
}

 .archive-entry:nth-child(odd) .categories {
    right: 0;
}

.entry .categories a {
    margin-bottom: .2em;
}

.categories a, .urllist-categories a {
    text-decoration: none;
    padding: .1em .5em;
    background: #57a085;
    background: var(--accent-color);
    border-radius: 4px;
    color: #fff;
    display: inline-block;
}

.urllist-title-link {
    font-size: .9rem;
}

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

 @media (max-width: 767px) {
    .archive-entry:nth-child(even) .categories {
        left: 0;
    }
    .page-archive .archive-entry:nth-child(odd) .archive-date {
        left: 0;
    }

    .page-archive .archive-entry:nth-child(even) .archive-date {
        right: 0;
    }
}

/* 「編集する」ボタン */
.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;
    padding: 0 .7em;
    background: linear-gradient(-45deg,transparent 25%, #7d5642 25%, #7d5642 50%,transparent 50%,transparent 75%, #7d5642 75%)left bottom/ 7px 7px repeat-y; 
    background: linear-gradient(-45deg,transparent 25%,var(--main-color) 25%,var(--main-color) 50%,transparent 50%,transparent 75%,var(--main-color) 75%)left bottom/ 7px 7px repeat-y;
}

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

.entry-content h4 {
    font-size: 1.2rem;
    padding: .6em 0;
    background: linear-gradient(-45deg,transparent 25%, #7d5642 25%, #7d5642 50%,transparent 50%,transparent 75%, #7d5642 75%)left bottom/ 7px 7px repeat-x; 
    background: linear-gradient(-45deg,transparent 25%,var( --main-color) 25%,var(--main-color) 50%,transparent 50%,transparent 75%,var(--main-color) 75%)left bottom/ 7px 7px repeat-x;
}
@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 a {
    color: #3583b0;
    text-decoration: underline;
}
.entry-content a:hover {
    color: #1d6a96;
    text-decoration: none;
}
.entry-content ul:not(.table-of-contents),
.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;
    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: 25px 20px;
    position: relative;
    background: #fbfbfb;
    margin: 2em 0;
}

.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;
}

.table-of-contents {
    padding: 2.5em 1em 1em 2em;
    margin: 1em 0;
    border: 1px solid #ddd;
    position: relative;
    background: #343434;
    border: solid 5px #b58c6a;
    border-radius: 4px;
    color: #fff;
    list-style: decimal;
}

.table-of-contents::before {
    content: "CONTENTS";
    display: inline-block;
    padding: 0 1em;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 120%;
    font-family: 'Fredericka the Great', cursive;
    letter-spacing: .05em;
    color: #fff;
    background: #343434;
    white-space: nowrap;
    z-index: 1;
}

.table-of-contents::after {
    content: "";
    display: block;
    position: absolute;
    top: 1em;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2em);
    height: 10px;
    background: linear-gradient(-45deg,transparent 25%, #8e7250 25%, #8e7250 50%,transparent 50%,transparent 75%, #8e7250 75%)left bottom/ 7px 7px repeat-x;
}

.table-of-contents a {
    color: #fff;
    text-decoration: none;
}

.table-of-contents li {
    margin: .3em 0;
    position: relative;
}

.table-of-contents li ul {
    margin: 0 0 .3em 2em;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents ul li::before {
    content: "";
    width: 4px;
    height: 10px;
    border-left: solid 2px #fff;
    border-bottom: solid 2px #fff;
    position: absolute;
    top: 2px;
    left: -12px;
}

/* 記事下 */
.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: 2em 0 15px 0;
    padding: 0;
    line-height: 1.7;
    font-size: .85rem;
}

.comment-box .entry-comment {
    padding: 1em;
    border: solid #ddd 1px;
    border-radius: 6px;
    margin: 10px 0 10px 65px;
}

ul.comment li::before {
    content: "";
    display: block;
    height: calc(100% - 45px);
    width: 2px;
    background: #eee;
    position: absolute;
    left: -45px;
    bottom: -10px;
}

.comment-box .entry-comment::after {
    content: "";
    display: inline-block;
    width: .6rem;
    height: .6rem;
    background: #fff;
    border-left: solid 1px #ddd;
    border-top: solid 1px #ddd;
    position: absolute;
    top: 20px;
    left: -6px;
    transform: rotate(-45deg);
}

.comment-box .hatena-id-icon {
    position: absolute;
    top: 0;
    left: -70px;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    border: solid #ddd 1px;
}
ul.comment li:nth-last-child(2)::before, ul.comment li:last-child::before {
    display: none;
}

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

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

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

.read-more-comments a {
    cursor: pointer;
    text-decoration: underline;
}

.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 {
    font-size: .85rem;
    padding: .8em 1.3em;
    border-radius: 2em;
    background: #7d5642;
    background: var(--main-color);
    color: #fff;
    color: var(--main-text-color);
    box-shadow: 0 4px 15px 0 #d2c2ac;
}

.leave-comment-title:hover {
    color: #fff;
    color: var(--main-text-color);
    text-decoration: underline;
    box-shadow: 0 0 5px 0 #ccaa7d;
}

/* Pager */
.pager {
    margin: 2em 1em 3em;
    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;
    position: relative;
    margin-bottom: 2em;
    padding: 1rem;
    background: #fff;
    font-size: .85rem;
    border-radius: 2px;
    box-shadow: rgba(0,0,0,.1) 0px 4px 6px -1px, rgba(0,0,0,.06) 0px 2px 4px -1px;
    box-shadow: var(--shadow1-color) 0px 4px 6px -1px, var(--shadow2-color) 0px 2px 4px -1px;
}

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

.hatena-module-title {
    margin-bottom: 1em;
    padding-top: .3em;
    color: #5f5750;
    color: var(--font-color);
    font-size: 1rem;
    font-weight: bold;
    font-style: italic;
    text-align: center;
    letter-spacing: .1em;
    border-bottom: solid 2px;
}

.hatena-module-title a {
    text-decoration: none;
    color: #5f5750;
    color: var(--font-color);
}

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

/* Profile module */
.hatena-module-profile .profile-icon {
    display: block;
    width: 100px;
    margin: 0 auto;
    border: solid 1px #ddd;
    border-radius: 50%;
}

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

.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;
}
.hatena-urllist .archive-module-year .archive-module-month {
    margin: .2em 0 .1em 2.5em;
    padding: 0;
    border: none;
    list-style-type: none!important;
    background: none;
}

.hatena-module-category .hatena-urllist li {
    padding: 0;
    display: inline-block;
}

.hatena-module-category .hatena-urllist li a {
    display: inline-block;
    font-size: .8rem;
    margin: 0 .2rem .8rem;
    padding: .3rem 1rem;
    border: solid 1px #7d5642;
    border: solid 1px var(--main-color);
    border-radius: 2rem;
    transition: .3s;
}

.hatena-module-category .hatena-urllist li a:hover {
    background: #7d5642;
    background: var(--main-color);
    color: #fff;
    color: var(--main-text-color);
    text-decoration: none;
}

.hatena-module-related-entries .hatena-module-title {
    padding: 1em 0 .5em;
}

.entry .hatena-module-related-entries {
    box-shadow: none;
    border: none;
    padding: 0;
}


/***階層化デザイン修正コード***/
.hatena-module-category ul li.on-border {
    border: none!important;
}

.recent-entries li:not(:last-child), .entries-access-ranking li:not(:last-child) {
    border-bottom: solid 1px #ddd;
}


/*サイドバーもっと見るボタン*/
.urllist-see-more-link {
    display: inline-block;
    padding: .3em .8em;
    background: #7d5642;
    background: var(--main-color);
    color: #fff;
    color: var(--main-text-color);
    border-radius: 2em;
}

.urllist-see-more-link:hover {
    color: #fff;
    text-decoration: underline;
}

.urllist-with-thumbnails li .urllist-image {
    margin: 0 .7em .7em 0;
    float: left;
    border-radius: 6px;
    box-shadow: rgba(0,0,0,.1), rgba(0,0,0,.06);
    box-shadow: var(--shadow1-color) 0px 4px 6px -1px, var(--shadow2-color) 0px 2px 4px -1px;
    transition: .3s;
}

.urllist-with-thumbnails li .urllist-image:hover {
    transform: translateY(4px);
    box-shadow: none;
}

.archive-module-calendar-highlight {
    background: var(--accent-color);
    color: #fff;
    padding: .2em .8em;
    border-radius: 1em;
}

.archive-module-calendar, .archive-module-calendar .archive-module-calendar-selector {
    font-family: 'Fredericka the Great', cursive;
}

/* Search module */
.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;
}

.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;
}

.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;
}

.search-module-button:hover, .search-result-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 */
.entry-thumb-link {
    order: 0;
    width: 100%;
    margin: -4vw auto 1vw;
}

.entry-thumb-link::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.archive-entry-header {
    order: 1;
    width: 100%;
}

.page-archive .entry-title {
    font-size: calc(1rem - 1px);
    position: relative;
}

.page-archive .archive-entry:nth-child(odd) .entry-title {
    margin: 0 0 1.6em 1em;
}

.page-archive .archive-entry:nth-child(even) .entry-title {
    margin: 0 1em 1.6em 0;
}

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

.archive-entry-body {
    display: none;
}

.page-archive .archive-entry {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    position: relative;
    padding: 3vw;
    margin: 0 auto 6vw;
    background: #fff;
    border-radius: 2px;
    box-shadow: rgba(0,0,0,.1), rgba(0,0,0,.06);
    box-shadow: var(--shadow1-color) 0px 4px 6px -1px, var(--shadow2-color) 0px 2px 4px -1px;
    width: 100%;
    transition: .5s;
    box-sizing: border-box;
}

.page-archive .entry-thumb {
    position: relative;
    background-size: cover;
    width: 100%;
    transition: .5s;
    height: 0;
    padding-top: 56.25%;
    border-radius: 4px 4px 0 0;
    box-shadow: rgba(0,0,0,.2) 0px 10px 10px -4px, rgba(0,0,0,.01) 0px 4px 6px -2px;
}

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


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

.page-index .archive-date, .page-archive .archive-date {
    position: absolute;
    display: inline-block;
}

.page-index .archive-date a, .entry-date a, .page-archive .archive-date a {
    color: #5f5750;
    color: var(--font-color);
    font-family: 'Fredericka the Great', cursive;
    position: relative;
    display: inline-block;
    text-decoration: none;
    pointer-events: none;
}

.page-index .archive-date a .hyphen, .entry-date a .hyphen, .page-archive a .hyphen {
    display: none;
}

.page-index .archive-date time, .entry-date time, .page-archive time {
    display: flex;
    align-items: flex-end;
}

.entry-date .date-day {
    order: 1;
    font-size: 7vw;
    line-height: 1;
}
.page-index .archive-date .date-day, .page-archive .date-day {
    order: 1;
    font-size: 5vw;
    line-height: 1;
}

.page-index .archive-date .date-year, .entry-date .date-year, .page-archive .date-year {
    display: none;
}

.page-index .archive-date .date-month, .entry-date .date-month, .page-archive .date-month {
    order: 2;
    font-size: 0;
}

.entry-date .date-month::before {
    font-size: 3vw;
    display: inline-block;
    margin: 0 .5em;
    letter-spacing: .1em;
}

.page-index .archive-date .date-month::before, .page-archive .date-month::before {
    font-size: 2vw;
    display: inline-block;
    margin: 0 .5em;
    letter-spacing: .1em;
}

.page-archive .archive-entry .archive-date {
    position: absolute;
    bottom: 0;
    padding: .2em 1em .2em 1em;
    border-radius: 2px;
    background: rgba(255,255,255,.8);
    z-index: 1;
}

.page-archive .archive-entry:nth-child(n+3):nth-child(2n) .archive-date {
    right: 0;
}

.page-archive .archive-entry:nth-child(n+3):nth-child(2n+1) .archive-date {
    left: 0;
}

.page-archive .archive-entry:nth-child(even) {
    flex-direction: row-reverse;
}

.archive-entry-tags-wrapper {
    display: none;
}

@media (min-width: 768px) {
    .page-archive .entry-description {
        font-size: .9rem;
    }
}
@media (min-width: 992px) {
    .page-index .archive-date .date-month::before, .entry-date .date-month::before {
        font-size: 1vw;
    }
    .page-index .archive-date .date-day, .entry-date .date-day {
        font-size: 3vw;
    }
    .page-archive .archive-entry .date-day {
        font-size: 3vw;
        font-size: min(3vw, 46px);
    }
    .page-archive .archive-entry .date-month::before {
        font-size: 1vw;
        font-size: min(1vw, 18px);
    }
}

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

#footer a {
    color: #999;
}

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

@media (min-width: 768px) {
  #main-inner, .breadcrumb {
      padding: 0 2vw;
  }
  .archive-entries {
      display: flex;
      flex-wrap: wrap;
  }
  .page-archive .archive-entry {
    margin-bottom: 4vw;
    padding: 2vw;
  }
  .page-archive .archive-entry:nth-child(-n+2) {
    flex-direction: column;
    width: calc(50% - 10px);
  }
  .page-archive .archive-entry:nth-child(2) {
      margin-left: 20px;
  }
  .page-archive .archive-entry:nth-child(-n+2) .entry-title {
      margin: .3em 0 1.6em;
  }
  .entry-thumb-link {
      margin: -3vw auto 1vw;
  }

  .page-archive .archive-entry:nth-child(2) .categories {
      right: 0;
  }
  .archive-entry:nth-child(even).archive-entry:nth-child(n+3) .categories {
      left: 0;
  }
  .page-archive .archive-entry:nth-child(-n+2) .archive-date {
      left: 0;
  }
  .page-archive .archive-entry:nth-child(even) .archive-entry:nth-child(n+3) .archive-date {
      right: 0;
  }
  .page-archive .archive-entry:nth-child(-n+2) .archive-date {
      padding: .15em 1em;
  }
  .page-archive .entry-title {
      font-size: 2vw;
  }
  .archive-entry:nth-child(n+3) .entry-title-link::before {
      content: "READ MORE";
      display: inline-block;
      position: absolute;
      bottom: -3em;
      font-family: 'Fredericka the Great', cursive;
      font-weight: normal;
      font-size: .8em;
      padding: .5em 1em;
      background: #7d5642;
      background: var(--main-color);
      color: #fff;
      color: var(--main-text-color);
      border-radius: 2em;
      z-index: 2;
  }
  .archive-entry:nth-child(even):nth-child(n+3) .entry-title-link::before {
      right: 0;
  }
  .archive-entry:nth-child(odd):nth-child(n+3) .entry-title-link::before {
      left: 0;
  }
}

.page-archive .entry-title::before {
    content: "";
    width: 15%;
    border-top: solid 2px #5f5750;
    border-top: solid 2px var(--font-color);
    position: absolute;
    bottom: .2em;
    right: 0;
}

@media screen and (min-width:768px) and ( max-width:991px) {
    #box2 {
        word-wrap: break-word;
        background: none;
        padding: 0;
    }
    #box2-inner {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0 40px;
    }
    .page-entry #main-inner {
        padding: 0 2vw;
    }
    .page-archive .archive-entry .date-day {
        font-size: 3.5vw;
    }
    .page-archive .archive-entry .date-month::before {
        font-size: 1.5vw;
    }
    .hatena-module {
        width: 49%;
        background: #fff;
        margin-bottom: 2rem;
    }
}

@media (min-width: 992px) {
  .page-archive .archive-entry {
      margin-bottom: 3vw;
  }
  .page-archive .archive-entry:nth-child(-n+2) {
      padding: 1vw;
  }
  .page-archive .archive-entry:nth-child(-n+2) .entry-title {
      margin: .3em 0 2em;
  }
  .page-archive .archive-entry:nth-child(-n+2) .entry-thumb-link {
      margin-top: -2vw;
  }
  .page-archive .entry-title {
      font-size: 17px;
}
}

@media (min-width: 1200px) {
    .page-archive .archive-entry {
      margin-bottom: 36px;
      padding: 24px;
    }
    .entry-thumb-link {
      margin: -36px auto 12px;
    }
    .page-archive .archive-entry:nth-child(-n+2) {
      padding: 12px;
    }
    .page-archive .archive-entry:nth-child(-n+2) .entry-thumb-link {
      margin-top: -24px;
    }
}

.entry-content h3 {
    border-bottom: solid 3px;
    position: relative;
    margin: 2em 0 1.5em;
    padding: .3em 0;
}

.entry-content h3::brfore {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    width: 15%;
    border-bottom: solid 3px #7dc3a3;
}

.page-archive .categories a:nth-child(n+2) {
    display: none;/*最初のカテゴリのみ表示*/
}

.archive-entry:hover .entry-thumb {
    transform: translateY(.5vw);
    box-shadow: none;
    opacity: .7;
}
.archive-entry:hover .entry-thumb-link::before {
    background: rgba(255,255,255,.3);
}

a.entry-see-more {
    display: inline-block;
    background: #7d5642;
    background: var(--main-color);
    color: #fff;
    color: var(--main-text-color);
    padding: .3rem 1rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: .3s;
}

a.entry-see-more:hover {
    opacity: .8;
    text-decoration: underline;
    color: #fff;
}

.entry-categories {
    margin: 1em 0;
}

.pager-prev, .pager-next {
    position: relative;
    width: 40%;
    text-align: center;
}

.pager-next a, .pager-prev a {
    display: block;
}

.pager-prev a::before, .pager-next a::before {
    display: block;
    font-family: 'Fredericka the Great', cursive;
    font-size: 25px;
    font-style: italic;
    text-align: center;
    line-height: 1;
    margin-bottom: .3em;
    border-bottom: solid 1px #777;
}

.pager-prev a::before {
    content: "NEW";
}

.pager-next a::before {
    content: "OLD";
}

.pager-prev a::after, .pager-next a::after {
    content: "";
    display: inline-block;
    width: 15px;
    height: 1px;
    background: #777;
    position: absolute;
}

.pager-prev a::after {
    left: 0;
    top: 21px;
    transform: rotate(-30deg);
}

.pager-next a::after {
    right: 0;
    top: 21px;
    transform: rotate(30deg);
}

.pager-arrow {
    display: none;
}

.entry-title {
    position: relative;
}
.entry-title::before {
    content: "";
    width: 10%;
    border-top: solid 2px #5f5750;
    border-top: solid 2px var(--font-color);
    position: absolute;
    bottom: .2em;
    right: 0;
}

.entry-content ul:not(.table-of-contents), .entry-content ol, .entry-content dd {
    margin: 1em 0 1em 1.5em;
}


.archive-module-month {
    transition: .3s;
    text-decoration: none;
}

.archive-module-month:hover {
    transform: translateX(4px);
    text-decoration: none;
}

.archive-module-month-title {
    position: relative;
    transition: .3s;
}

.archive-module-month-title:hover {
    text-decoration: none;
}

.archive-module-month a::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-top: solid 2px #777;
    border-right: solid 2px #777;
    transform: rotate(45deg);
    position: absolute;
    top: .4em;
    left: -1em;
}

@media (min-width: 768px) {
  .entry {
    padding: 2rem;
  }
  #main-inner, .page-entry #main-inner, .breadcrumb {
    padding: 0 40px;
  }
}

#blog-title, #footer, #header #header-body  {
    background: #2a2922;
    background: var(--theme-color);
}

#footer, #footer a {
    color: #fff;
}
.page-entry .breadcrumb {
    margin-bottom: 1em;
}

blockquote::before, blockquote::after {
    color: #eee;
    content: "\f704";
    font-family: 'blogicon';
    position: absolute;
    font-size: 3em;
}
blockquote::before {
    top: -35px;
    left: 10px;
}
blockquote::after {
    bottom: -35px;
    right: 10px;
    transform: rotate(180deg);
}

/***記事内コード用***/
.entry-content pre {
    background: #000;
    white-space: pre;
    text-overflow: ellipsis;
    line-height: 1.3;
    font-size: .8rem;
    position: relative;
    padding: 1.5em 1em .5em;
    border: solid 1px #ddd;
    font-size: 1em;
    text-overflow: unset;
}

.entry-content pre.lang-html::before {
    content: " html ";
    position: absolute;
    top: 0;
    left: 0;
    background: #5e6bff;
    color: #fff;
}

.entry-content pre.lang-css::before {
    content: " CSS ";
    position: absolute;
    top: 0;
    left: 0;
    background: #fff75e;
}

/***グローバルナビゲーション***/

.g-nav {
    list-style: none;
    text-align: center;
    padding: 0;
    margin: 0;
}

.g-nav li a {
    display: block;
    padding: .8em 0;
    color: #555;
    font-weight: bold;
    transition: .3s;
}

.g-nav li {
    width: 100%;
}

.g-nav li a:hover {
  background: #9a725d;
    background: var(--navigation-hover-color);
}

@media (max-width: 767px) {
  #nav-drawer {
      position: fixed;
      top: 10px;
      right: 10px;
      z-index: 9999;
  }

.nav-unshown {
  display:none;
}

#nav-open {
    display: flex;
    flex-direction: column;
    text-align: center;
    line-height: 1;
    background: rgba(255,255,255,.7);
    padding: .5em;
    border-radius: 6px;
    color: #2a2922;
    font-weight: bold;
}

.g-nav-icon {
    font-size: 25px;
}

.mini-text {
    font-size: 10px;
}

#nav-close {
  display: none;
  position: fixed;
  z-index: 99;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  opacity: 0;
  transition: .3s ease-in-out;
}

#nav-content {
    overflow: auto;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 85%;
    max-width: 500px;
    height: 100%;
    background: #fff;
    transition: .3s ease-in-out;
    -webkit-transform: translateX(-130%);
    transform: translateX(-130%);
}

#nav-input:checked ~ #nav-close {
  display: block;
  opacity: .5;
}

#nav-input:checked ~ #nav-content {
  -webkit-transform: translateX(0%);
  transform: translateX(0%);
  box-shadow: 6px 0 25px rgba(0,0,0,.15);
}

.nav-close {
    text-align: center;
    display: flex;
    flex-direction: column;
    padding: 1em;
    font-size: .85rem;
    font-weight: bold;
    letter-spacing: .05em;
    line-height: 1;
}

.nav-close i {
    font-size: 2rem;
}
}

@media (min-width: 768px) {
  #nav-input, .nav-close {
      display: none;
  }
  #nav-content {
      position: relative;
      background: #7d5642;
      background: var(--navigation-color);
      box-shadow: rgba(0,0,0,.1), rgba(0,0,0,.06);
      box-shadow: var(--shadow1-color) 0px 4px 6px -1px, var(--shadow2-color) 0px 2px 4px -1px;
  }
  #nav-open {
    display: none;
  }
  .g-nav {
      display: flex;
      justify-content: space-around;
      margin: 0 auto;
      padding: 0;
      max-width: 1200px;
  }
  .g-nav li a {
      color: #fff;
      font-size: .85rem;
  }
}
/***シェアボタン***/
.sharebtn{margin:0 0 1em 0;}
.sharebtn a{display: block;width: 48px;height: 48px;line-height: 48px;color: #fff;text-align: center;border-radius: 4px;background: #fff;box-sizing: border-box;transition: .2s;box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;*/}
.sharebtn a i{margin: 0;font-size: 25px;line-height: 48px;}

.sharebtn .btn_fb{background:#1877f2;}
.sharebtn .btn_tw{background:#1da1f2;}
.sharebtn .btn_po{background:#ee4056;}
.sharebtn .btn_hb{background:#00a4de;}
.sharebtn .btn_li{background:#06c755;}
.sharebtn a:hover {opacity: .7;box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 10px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;}
.sharebtn .blogicon-bookmark {font-size: 33px;line-height: 1.3em;vertical-align: -11%;}
.sharebtn_list {padding: 0;list-style: none;display: flex;margin: .5em 0 2em;}

.sharebtn_item:not(:last-child) {margin-right: 8px;}
/***ボーダーボタン***/
.sharebtn .bd:not(:hover) {background: none;border: solid 1px;}
.sharebtn a.bd:hover {color:#fff;opacity: 1;}
.sharebtn .btn_fb.bd{color: #1877f2;}
.sharebtn .btn_tw.bd{color: #1da1f2;}
.sharebtn .btn_po.bd{color: #ee4056;}
.sharebtn .btn_hb.bd{color: #00a4de;}
.sharebtn .btn_li.bd{color: #06c755;}

/***おすすめ記事***/
.c_recommend-container {
  margin: 0;
  padding: 2em 2.5vw 0;
  background: #fff;
}
#top-editarea .c_recommend-container {
    box-shadow: rgba(0,0,0,.1) 0px 4px 6px -1px, rgba(0,0,0,.06) 0px 2px 4px -1px;
    box-shadow: var(--shadow1-color) 0px 4px 6px -1px, var(--shadow2-color) 0px 2px 4px -1px;
}
.c_recommend {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0!important;
  list-style: none;
}
.c_recommend-item {
  width: 50%;
  margin-bottom: 1.5em;
  padding: 0 .5em;
  box-sizing: border-box;
  border-radius: 4px;
}
.c_recommend-thumb {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding-top: 56.25%;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
}
.c_recommend-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
    transition: .5s;
    -webkit-transform: scale(1.01);
    transform: scale(1.01);
}
.c_recommend-item:hover .c_recommend-img {
    transform: scale(1.06);
    opacity: .8;
}
.c_recommend-item-body {}

.c_recommend-item-title {
    display: block;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    padding: .5em 0 0;
}
@media (min-width: 600px) {
  .c_recommend-item-title {
    font-size: 1rem;
}
}
@media (min-width: 768px) {
  .g-nav {
    margin: 0 auto;
}
  .c_recommend-item {
    width: 25%;
}
  .entry .c_recommend-item {
    width: 33.3%;
}
}
.entry .c_recommend-container {
    padding: 0;
    margin: 1em -.5em 0;
}

.hatena-module-html .c_recommend-container {
    padding: 0;
}

.hatena-module-html .c_recommend-item {
    width: 50%;
}

.hatena-module-html .c_recommend-item-title {
    font-size: 14px;
}

.hatena-module-html .c_recommend-item:nth-child(odd) {
    padding-left: 0;
}

.hatena-module-html .c_recommend-item:nth-child(even) {
    padding-right: 0;
}

/***おすすめ記事カード型***/
.c_recommend-thumb.card, .c_recommend-thumb .c_recommend-img {
    border-radius: 3px 3px 0 0;
    box-shadow: none;
}
.c_recommend-item-body.card {
    padding: 0 .5em .5em;
}
.c_recommend-item.card, .entry .c_recommend-item.card {
    border: solid 1px #acacac;
    padding: 0;
    width: 48%;
    margin: 0 1% 1.5em;
}
@media (min-width:768px) {
.c_recommend-item.card {
    margin: 0 .5% 2em;
    width: 24%;
}
.entry .c_recommend-item.card {
    width: 31%;
}
}
.hatena-module-html .c_recommend {
    justify-content: space-between;
}
.hatena-module-html .c_recommend-item.card {
    width: 48%;
    margin-bottom: 1.5em;
}

/* </system> */
.entry-content .l-fuki,
.entry-content .r-fuki {
position: relative;
width: 80%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
padding: 20px;
border-radius: 6px;
border: 2px solid #999;
box-shadow: 1px 1px 5px #aaa;
background-color: #fff;
z-index: 1;
}
.entry-content .l-fuki {
margin: 20px 20% 40px 0;
}
.entry-content .r-fuki {
margin: 20px 0 40px 19%;
}
.entry-content .l-fuki::before,
.entry-content .r-fuki::before {
position: absolute;
content: "";
top: 16px;
width: 10px;
height: 10px;
border-right: 2px solid #999;
border-bottom: 2px solid #999;
background-color: #fff;
z-index: 2;
}
.entry-content .l-fuki::before {
right: -7px;
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
}
.entry-content .r-fuki::before {
left: -7px;
transform: rotate(135deg);
-webkit-transform: rotate(135deg);
}
.entry-content .l-fuki::after,
.entry-content .r-fuki::after {
position: absolute;
content: "";
width: 80px;
height: 80px;
top: -10px;
border-radius: 40px;
border: 3px solid #fff;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
box-shadow: 1px 1px 5px #aaa;
}
.entry-content .l-fuki::after {
right: -110px;
}
.entry-content .r-fuki::after {
left: -110px;
}
@media screen and (max-width: 620px) {
.entry-content .l-fuki,
.entry-content .r-fuki {
width: 70%
}
.entry-content .l-fuki {
margin-right: 30%;
}
.entry-content .r-fuki {
margin-left: 30%;
}
}
@media screen and (max-width: 478px) {
.entry-content .l-fuki::after,
.entry-content .r-fuki::after {
width: 60px;
height: 60px;
border-radius: 30px;
}
.entry-content .l-fuki::after {
right: -84px;
}
.entry-content .r-fuki::after {
left: -84px;
}
}
.fukidashi1::after {background-image:url(https://cdn-ak.f.st-hatena.com/images/fotolife/a/axialife/20201218/20201218020222.png);}
.fukidashi2::after {background-image:url(https://cdn-ak.f.st-hatena.com/images/fotolife/a/axialife/20201218/20201218022018.png);}
.table-of-contents ul ul{
  display: none;
}
/*上に戻るボタン*/
#page_top{
   width: 60px;
   height: 60px;
   position: fixed;
   right: 5px;
   bottom: 5px;
   background: #deceee;
   border-radius: 50%;
   display:none;
}
#page_top a{
   position: relative;
   display: block;
   width: 60px;
   height: 60px;
   text-decoration: none;
}
#page_top a::before{
   font-family: 'Font Awesome 5 Free';
   font-weight: 900;
   content: '\f102';
   font-size: 20px;
   color: #fff;
   position: absolute;
   width: 20px;
   height: 20px;
   top: -28px;
   bottom: 0;
   right: 0;
   left: 0;
   margin: auto;
   text-align: center;
}
#page_top a::after{
   content: 'PAGE TOP';
   font-size: 10px;
   color: #fff;
   position: absolute;
   top: 32px;
   bottom: 0;
   right: 0;
   left: 0;
   margin: auto;
   text-align: center;
}
/*-------------*/
/*  追尾する目次  */
/*-------------*/
#stoc-module {
  backface-visibility: hidden;
}
#stoc-module.tracking {
  margin-bottom: 0;
}
#stoc-module.fixed {
  position: fixed;
}
#stoc-module.absolute {
  position: absolute;
}
#stoc-module.sticky {
  position: -webkit-sticky;
  position: sticky;
}
#stoc-module.fade-in {
  animation: fadeIn 300ms;
}
@keyframes fadeIn {
  0% {opacity: 0}
  100% {opacity: 1}
}

#stoc {
  overflow-y: auto;
}
#stoc.shadow {
  /* Shadows */
  background:
    radial-gradient(farthest-side at top, rgba(0,0,0,.17), transparent) top / 100% 11px,
    radial-gradient(farthest-side at bottom, rgba(0,0,0,.17), transparent) bottom / 100% 11px;
  background-repeat: no-repeat;
  background-attachment: scroll;
}
#stoc ol {
  margin: 0;
  padding: 0 0 0 1em;
  list-style-type: none;
}
#stoc > ol {
  padding-left: 0;
}
#stoc.shadow > ol {
  /* Shadow covers */
  background:
    linear-gradient(#fff 30%, transparent) top / 100% 40px,
    linear-gradient(transparent, #fff 70%) bottom / 100% 40px;
  background-repeat: no-repeat;
  background-attachment: local;
  overflow-y: hidden;
}
#stoc li {
  /*margin: 3px 0;*/
}
#stoc a {
  padding: 2px 2px 2px 6px;
  display: block;
  text-decoration: none;
  /*color: #999;*/
}
#stoc:not(.touch) a:hover {
  background-color: rgba(0,0,0,.05);
  text-decoration: underline;
  /*color: #333;*/
}
#stoc .active {
  background-color: rgba(0,0,0,.05);
  /*color: #333;*/
}

#stoc::-webkit-scrollbar {
  width: 8px;
  background: #ececec;
}
#stoc::-webkit-scrollbar-button {
  display: none;
}
#stoc::-webkit-scrollbar-thumb {
  background: #b1b1b1;
}
sidebar_toc.html
<!-- 追尾する目次 -->
<nav id='stoc'></nav>
sidebar_toc_footer.html
<!-- 追尾する目次 ver3.3.0  https://git.io/stoc -->
<script>
(function() {
'use strict';
//----------------------
// ↓設定ここから↓

const PAGES = [
  {
    class    : 'page-entry',
    title    : '目次',
    display  : true
  },
  {
    class    : 'page-index',
    title    : 'このページの記事一覧',
    listPage : true,
    display  : true
  },
  {
    class    : 'page-archive',
    title    : 'このページの記事一覧',
    listPage : true,
    display  : true
  },
  {
    class    : 'page-static_page',
    title    : 'entry-title',
    display  : false
  },
];
const MATCH_MEDIA         = false;
const MEDIA_QUERY_SIDEBAR = '(min-width: 768px)';
const MARGIN_TOP     = 10;
const MARGIN_BOTTOM  = 0;
const CURRENT_MARGIN = 50;
const ADJUST_FIXED   = 0;
const MAX_HEIGHT     = 0;
const HEADLINE_QUERY = ['h3', 'h4', 'h5'];
const HEADLINE_MIN   = 1;
const ADJUST_SCROLL  = 0;
const SCROLL_TIME_PC    = 400;
const SCROLL_TIME_TOUCH = 0;
const TOC_INSIDE_SCROLL = true;
const TOC_TITLE_TOP   = true;
const SCROLL_SHADOW   = false;
const LINK_HISTORY    = true;
const DELAY_GET_DOM   = false;
const DELAY_TIME_DOM  = 250;
const DELAY_TIME_LOAD = 1000;
const GLOBAL_HEADER   = ['#globalheader-container'];
const CLICK_UPDATE    = [];
const CLICK_UPDATE_DELAY = 500;
const USE_LIST        = 'ol';
const TOUCH_DEVICE    = 'ontouchstart' in window;
const TOUCH_DEVICE_DISABLE = false;
const F_STICKY_MODE   = false;
const PAUSE_NO_SIDEBAR = true;
const PAUSE_MAIN_SMALL = true;

// ↑設定ここまで↑
//----------------------

// Define
const win = window;
const doc = document;
const ID_TOC = 'stoc';
const ID_TOC_MODULE = 'stoc-module';
const ID_TOC_TITLE = 'stoc-title';
const ID_TOC_BODY = 'stoc-body';
const ID_TOC_GUIDE = 'stoc-guide';
const ID_TOC_SUB_GUIDE = 'stoc-sub-guide';
const CLASS_HMT = 'hatena-module-title';
const CLASS_ENTRY = 'entry-title';
const CLASS_ENTRY_LINK = 'entry-title-link';
const CLASS_FADE_IN = 'fade-in';
const CLASS_TOUCH = 'touch';
const CLASS_SHADOW = 'shadow';
const CLASS_ACTIVE = 'active';
const CLASS_TRACKING = 'tracking';
const CLASS_FIXED = 'fixed';
const CLASS_ABSOLUTE = 'absolute';
const POSITION_STATIC = 'static';
const POSITION_FIXED = 'fixed';
const POSITION_ABSOLUTE = 'absolute';
const POSITION_STICKY = 'sticky';
const SUM_MARGIN_HEIGHT = ['marginTop', 'marginBottom'];
const SUM_PADDING_HEIGHT = ['paddingTop', 'borderTopWidth', 'paddingBottom', 'borderBottomWidth'];
const SCROLL_TIME = TOUCH_DEVICE ? SCROLL_TIME_TOUCH : SCROLL_TIME_PC;
const SMOOTH_SCROLL = SCROLL_TIME > 0 ? true : false;

function convPX(num) {
  return num + 'px';
}

function createDiv() {
  return doc.createElement('div');
}

const escapeHtml = (function() {
  const re = /[&'"<>]/g;
  const replaceObj = {
    '&'  : '&amp;',
    '\'' : '&#39;',
    '"'  : '&quot;',
    '<'  : '&lt;',
    '>'  : '&gt;',
  };
  function replaceFunc(match) {
    return replaceObj[match];
  }
  return function(str) {
    if (typeof str !== 'string')
      return str;
    return str.replace(re, replaceFunc);
  };
}());

// 簡易シングルトンなgetComputedStyle（IDが設定されてない場合は毎回取得）
const getComputedStyleWrap = (function() {
  const data = {};
  return function(elem) {
    const id = hyphen2camel(elem.id);
    if (!data[id]) {
      console.assert(id, 'No id：%o', elem);
      const style = getComputedStyle(elem, null);
      if (id)
        data[id] = style;
      else
        return style;
    }
    return data[id];
  };
}());

// 1文字目によってidかclass要素を取得する
function getElementsSelector(idORclass) {
  let elems = [];
  const first = idORclass.charAt(0);
  const name = idORclass.slice(1);
  if (first === '#')
    elems[0] = doc.getElementById(name);
  else if (first === '.')
    elems = doc.getElementsByClassName(name);
  return elems;
}

// 指定したスタイルを数値に変換して取得
function getStyleFloat(elem, styleName) {
  const ret = parseFloat(getComputedStyleWrap(elem)[styleName]);
  console.assert(!isNaN(ret), elem.id + ' [' + styleName + '] NaN');
  return ret;
}

// 特定のクラスが設定されていない状態の値を取得
function getUnsetClassStyleFloat(elem, styleNames, targetClassNames) {
  let ret = [];
  const classList = elem.classList;
  const existClassNames = targetClassNames.filter(function(e) {
    return classList.contains(e);
  });

  existClassNames.forEach(function(e) {
    classList.remove(e);
  });
  styleNames.forEach(function(e) {
    ret.push(getStyleFloat(elem, e));
  });
  existClassNames.forEach(function(e) {
    classList.add(e);
  });
  return ret;
}

// ハイフン区切りからキャメルケースに変換
function hyphen2camel(str) {
  return str.replace(/[-]./g, function(match) {
    return match.charAt(1).toUpperCase();
  });
}

// $.outerHeight()
function getOuterHeight(elem, margin) {
  let ret = elem.offsetHeight;
  if (margin)
    ret += sumElementProps(elem, SUM_MARGIN_HEIGHT);
  return ret;
}

// $.scrollTop()
function getScrollTop(elem, scrollTop) {
  return elem.getBoundingClientRect().top + (scrollTop !== void 0 ? scrollTop : win.pageYOffset);
}

// 縦方向のスムーズスクロール
const smoothScrollY = (function() {
  const frameTime = 1000 / 30;
  const scrollTo = win.scrollTo;
  const timer = win.performance ? performance : Date;
  let requestId, request, cancel, exsitRAF;
  {
    const strRAF = 'requestAnimationFrame';
    exsitRAF = Object.prototype.hasOwnProperty.call(win, strRAF);
    if (exsitRAF) {
      request = win[strRAF];
      cancel = win.cancelAnimationFrame;
    }
    else {
      request = win.setTimeout;
      cancel = win.clearTimeout;
    }
  }

  function easeInOutQuad(t) {
    return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
  }

  return function(target, duration) {
    const startTime = timer.now();
    const startY = win.pageYOffset;
    const startX = win.pageXOffset;
    const distance = target - startY;
    let elapsedTime;

    cancel(requestId);
    requestId = request(exsitRAF ? step : step2);

    // requestAnimationFrame
    function step(timestamp) {
      elapsedTime = timestamp - startTime;
      if (elapsedTime >= duration) {
        scrollTo(startX, target);
        return;
      }
      scrollTo(startX, easeInOutQuad(elapsedTime / duration) * distance + startY);
      requestId = request(step);
    }

    // setTimeout
    function step2() {
      elapsedTime = timer.now() - startTime;
      if (elapsedTime >= duration) {
        scrollTo(startX, target);
        return;
      }
      scrollTo(startX, easeInOutQuad(elapsedTime / duration) * distance + startY);
      requestId = request(step2, frameTime);
    }
  };
}());

// 指定したプロパティ値を足し合わせて返す
function sumElementProps(elem, props) {
  let ret = 0;
  const css = getComputedStyleWrap(elem);
  for (let i = 0, len = props.length; i < len; i++) {
    const num = parseFloat(css[props[i]]);
    if (isNaN(num)) continue;
    ret += num;
  }
  return ret;
}

function main() {
  console.log('%c---sidebar toc---  DELAY_TIME_DOM:' + DELAY_TIME_DOM, 'color:blue');
  console.time('sidebarToc add');

  // 目次モジュール
  const elSidebarToc = doc.getElementById(ID_TOC);
  if (!elSidebarToc) {
    console.error('sidebarToc: 要素が見つかりません');
    return;
  }
  const elSidebarTocModule = elSidebarToc.parentNode.parentNode;
  const elSidebarTocModuleBody = elSidebarToc.parentElement;
  const stSidebarTocModule = elSidebarTocModule.style;

  // ページ判定
  const bodyClassList = doc.body.classList;
  let currentPage;
  for (let i = 0, len = PAGES.length; i < len; i++) {
    if (bodyClassList.contains(PAGES[i].class)) {
      if (!PAGES[i].display)
        break;
      currentPage = PAGES[i];
      console.log('page:' + PAGES[i].class);
      break;
    }
  }
  // 表示設定をしてあるページ以外の時は非表示にして終了
  if (!currentPage) {
    hideSidebarToc();
    return;
  }
  const PAGE_LIST = currentPage.listPage;
  const PAGE_TITLE = currentPage.title;
  const elMainInner = doc.getElementById('main-inner');

  // 目次記法の目次にもスムーズスクロールを適用
  let hatenaTocFlg = false;
  if (!PAGE_LIST) {
    const elHatenaToc = elMainInner.getElementsByClassName('table-of-contents')[0];
    if (elHatenaToc) {
      const elHatenaTocAnchor = elHatenaToc.getElementsByTagName('a');
      for (let i = 0, len = elHatenaTocAnchor.length; i < len; i++)
        elHatenaTocAnchor[i].addEventListener('click', clickEvent, false);
      hatenaTocFlg = true;
    }
  }

  // タッチデバイスで動かさない設定の時は非表示にして終了
  if (TOUCH_DEVICE_DISABLE) {
    hideSidebarToc();
    return;
  }

  // 表示する見出しの一覧を取得
  let elContentList = [];
  let elContentListText = [];
  if (PAGE_LIST) {
    const classNames = ['hentry', 'archive-entry'];
    for (let i = 0, len = classNames.length; i < len; i++) {
      elContentList = elMainInner.getElementsByClassName(classNames[i]);
      if (elContentList.length > 1)
        break;
    }
    const elems = elMainInner.getElementsByClassName(CLASS_ENTRY_LINK);
    for (let i = 0, len = elems.length; i < len; i++)
      elContentListText[i] = elems[i].textContent;
  }
  else
    elContentList = elMainInner.getElementsByClassName('hentry')[0]
      .getElementsByClassName('entry-content')[0].querySelectorAll(HEADLINE_QUERY.join());

  // 見出しがn個以下なら目次を表示しない
  if (elContentList.length <= HEADLINE_MIN) {
    hideSidebarToc();
    return;
  }


  //----------------------
  let headlineList = [];
  let currentLevel = 0;

  // タグの設定
  for (let i = 0, len = elContentList.length; i < len; i++) {
    const elem = elContentList[i];
    const text = PAGE_LIST ? elContentListText[i] : elem.textContent;
    let idName;
    let level = 0;

    // a要素作成
    if (hatenaTocFlg) {
      // 目次記法がある時はすでにIDが設定されているのでそれを使う
      idName = elem.id;
    }
    else {
      idName = 'section' + i;
      elem.setAttribute('id', idName);
    }
    headlineList[i] = '<li><a href="#' + idName + '">' + escapeHtml(text) + '</a>';

    // 段落が必要ないページ
    if (PAGE_LIST)
      continue;

    // 段落作成
    const nodeName = elem.nodeName.toLowerCase();
    for (let j = 1, len = HEADLINE_QUERY.length; j < len; j++) {
      if (nodeName === HEADLINE_QUERY[j]) {
        level = j;
        break;
      }
    }
    while (currentLevel < level) {
      headlineList[i] = '<' + USE_LIST + '>' + headlineList[i];
      currentLevel++;
    }
    while (currentLevel > level) {
      headlineList[i] = '</' + USE_LIST + '></li>' + headlineList[i];
      currentLevel--;
    }
  }

  // モジュールタイトルの追加(設定によっては追加しない)
  let elTocTitle = false, sidebarTocTitle;
  if (PAGE_TITLE !== '') {
    if (!PAGE_LIST && PAGE_TITLE === CLASS_ENTRY)
      sidebarTocTitle = elMainInner.getElementsByClassName(CLASS_ENTRY_LINK)[0].textContent;
    else
      sidebarTocTitle = PAGE_TITLE;
  }

  // 最初に設定されているタイトルを削除
  const elTitle = elSidebarTocModule.getElementsByClassName(CLASS_HMT)[0];
  if (elTitle)
    elSidebarTocModule.removeChild(elTitle);

  if (sidebarTocTitle) {
    const title = escapeHtml(sidebarTocTitle);
    const divTitle = createDiv();
    divTitle.id = ID_TOC_TITLE;
    divTitle.className = CLASS_HMT;
    // リンクとスムーズスクロールも追加
    divTitle.innerHTML = TOC_TITLE_TOP ? '<a href="#">' + title + '</a>' : title;
    elTocTitle = elSidebarTocModule.insertBefore(divTitle, elSidebarTocModule.firstElementChild);
    if (TOC_TITLE_TOP) {
      elTocTitle.getElementsByTagName('a')[0].addEventListener('click', function(e) {
        e.preventDefault();
        e.stopPropagation();
        if (SMOOTH_SCROLL)
          smoothScrollY(0, SCROLL_TIME);
        else
          win.scrollTo(win.pageXOffset, 0);
      }, false);
    }
  }

  // module-bodyにIDを設定
  elSidebarTocModuleBody.id = ID_TOC_BODY;

  // 目次本体の追加
  const ol = doc.createElement('ol');
  ol.innerHTML = headlineList.join('');
  elSidebarToc.appendChild(ol);

  elSidebarTocModule.setAttribute('id', ID_TOC_MODULE);
  console.log('%c--add toc--', 'color:blue');


  // a要素一覧の取得とスムーズスクロールの設定
  const elSidebarTocAnchors = elSidebarToc.getElementsByTagName('a');
  const clSidebarTocAnchors = [];
  for (let i = 0, len = elSidebarTocAnchors.length; i < len; i++) {
    elSidebarTocAnchors[i].addEventListener('click', clickEvent, false);
    clSidebarTocAnchors[i] = elSidebarTocAnchors[i].classList;
  }

  //----------------------
  // スクロール用
  const elMain = doc.getElementById('main');
  const elBox2 = doc.getElementById('box2');
  const clSidebarTocModule = elSidebarTocModule.classList;
  const elGhs = [];
  for (let i = 0, len = GLOBAL_HEADER.length; i < len; i++) {
    const elems = getElementsSelector(GLOBAL_HEADER[i]);
    if (elems[0])
      elGhs.push(elems[0]);
    else
      console.error('GLOBAL_HEADER: %s が見つかりません', GLOBAL_HEADER[i]);
  }
  const tocLastIndex = headlineList.length - 1;
  let headlineTopList = [];
  let scrollRange, scrollFixed, scrollAbsolute, followModule, tracking = false;
  let ghFixedHeight, marginComp, relativeOffset, leftMargin;
  let tocMaxHeight, tocScrollbar;
  let prevScrollLeft;

  const tocModuleStyles = {};
  tocModuleStyles[POSITION_ABSOLUTE] = {left: ''};
  tocModuleStyles[POSITION_FIXED] = {};
  tocModuleStyles[POSITION_STATIC] = {};

  // スクロール可能か判別しやすくする表示
  if (SCROLL_SHADOW)
    elSidebarToc.classList.add(CLASS_SHADOW);

  // タッチデバイス用の処理
  if (TOUCH_DEVICE) {
    // 判定用のクラス追加
    elSidebarToc.classList.add(CLASS_TOUCH);
    clSidebarTocModule.add(CLASS_TOUCH);
  }

  let stickyMode = false;
  if (TOUCH_DEVICE || F_STICKY_MODE) {
    // ブラウザが position:sticky に対応していればクラス追加
    const propName = ['-webkit-' + POSITION_STICKY, POSITION_STICKY];
    const stDiv = createDiv().style;
    for (let i = 0, len = propName.length; i < len; i++) {
      stDiv.position = propName[i];
      stickyMode = stDiv.position.indexOf(POSITION_STICKY) !== -1;
      if (stickyMode) {
        clSidebarTocModule.add('sticky');
        break;
      }
    }
  }

  //----------------------
  // ガイド要素の作成と追加
  let elGuideModule, elSubGuideModule, lastModuleToc;
  const elBox2Inner = elSidebarTocModule.parentNode;
  const elChildren = elBox2Inner.children;
  const elChildrenLength = elChildren.length;
  const divGuide = createDiv();
  divGuide.id = ID_TOC_GUIDE;
  divGuide.className = 'hatena-module';
  divGuide.style.cssText = [
    'visibility: hidden;',
    'height: 0;',
    'margin-top: 0;',
    'margin-bottom: 0;',
    'padding-top: 0;',
    'padding-bottom: 0;',
    'border-top: 0;',
    'border-bottom: 0;'
  ].join('');

  // 目次モジュールしか無い時はガイドを直前に追加
  if (elChildrenLength === 1) {
    elGuideModule = elBox2Inner.insertBefore(divGuide, elSidebarTocModule);
    lastModuleToc = true;
    console.log('%csingleModule', 'color:blue');
  }
  // 目次をサイドバーの最後に設置してる時はその一つ前に追加、それ以外の時は最後にガイドを追加
  else {
    lastModuleToc = elChildren[elChildrenLength - 1] === elSidebarTocModule;
    if (lastModuleToc) {
      // マージン相殺計測用
      elSubGuideModule = elSidebarTocModule.previousElementSibling;
      elSubGuideModule.id = ID_TOC_SUB_GUIDE;
      elGuideModule = elBox2Inner.insertBefore(divGuide, elSidebarTocModule);
    }
    else
      elGuideModule = elBox2Inner.appendChild(divGuide);
  }

  console.timeEnd('sidebarToc add');


  //----------------------
  // イベント登録

  // ウィンドウのリサイズ操作が終わった時に処理する
  let timer;
  win.addEventListener('resize', function() {
    clearTimeout(timer);
    timer = setTimeout(setTrackingPoint, 200);
  }, false);

  // CSSのフェード終了時
  elSidebarTocModule.addEventListener('animationend', function() {
    clSidebarTocModule.remove(CLASS_FADE_IN);
  }, false);

  //----------------------
  // 関数式

  // 現在位置を表示するためのクラス設定とスクロール処理
  const setActive = (function() {
    let active = -1;
    return function(i) {
      if (i !== active) {
        if (active >= 0)
          clSidebarTocAnchors[active].remove(CLASS_ACTIVE);
        active = i;
        if (i < 0) return;
        let elAnchor = elSidebarTocAnchors[i];
        clSidebarTocAnchors[i].add(CLASS_ACTIVE);
        if (TOC_INSIDE_SCROLL && tocScrollbar && tracking)
          elSidebarToc.scrollTop = elAnchor.offsetTop + elAnchor.offsetHeight - tocMaxHeight;
      }
    };
  }());

  // モジュール固定位置が変わったかチェック
  const confirmPosition = (function() {
    let current = 0;
    return {
      update : function(set, callback) {
        if (set !== current && followModule) {
          if (callback)
            callback(current);
          current = set;
          return true;
        }
        return false;
      },
      get : function() {
        return current;
      },
      set : function(set) {
        current = set;
      }
    };
  }());
  const updatePosition = confirmPosition.update;
  const getPosition = confirmPosition.get;
  const setPosition = confirmPosition.set;


  // スクロールイベントの追加と削除
  const setScrollEvent = (function() {
    let current = false;
    const event = 'scroll';
    return function(b) {
      if (b !== current) {
        if (current)
          win.removeEventListener(event, updateScroll, false);
        else
          win.addEventListener(event, updateScroll, false);
        current = b;
      }
    };
  }());


  //----------------------
  // 追尾処理開始部分
  function startTracking() {
    // 最初に一度位置取得などを行う
    setTrackingPoint();

    // 特定の要素をクリックした後に位置取得をやり直す
    let timer;
    for (let i = 0, len = CLICK_UPDATE.length; i < len; i++) {
      const elems = getElementsSelector(CLICK_UPDATE[i]);
      for (let j = 0, len = elems.length; j < len; j++) {
        elems[j].addEventListener('click', function() {
          clearTimeout(timer);
          timer = setTimeout(setTrackingPoint, CLICK_UPDATE_DELAY);
        }, false);
      }
    }

    // ページの読込が完全に終わったタイミングで再度位置取得などを行う
    win.addEventListener('load', function() {
      console.timeEnd('Event:DOMContentLoaded -> load');
      setTimeout(setTrackingPoint, DELAY_TIME_LOAD);
    }, false);
  }

  if (!DELAY_GET_DOM)
    setDOMContentLoaded(startTracking);
  else
    startTracking();


  //----------------------
  // 関数宣言

  // 目次要素全体を非表示にする
  function hideSidebarToc() {
    stSidebarTocModule.display = 'none';
    console.log('%c---sidebar toc hide---', 'color:blue');
  }

  // スムーズスクロールと履歴を設定
  function clickEvent(e) {
    e.preventDefault();
    const hash = decodeURIComponent(e.currentTarget.hash);
    const target = getScrollTop(doc.getElementById(hash.substr(1))) - ghFixedHeight + ADJUST_SCROLL;
    if (SMOOTH_SCROLL)
      smoothScrollY(Math.min(target, scrollRange), SCROLL_TIME);
    else
      win.scrollTo(win.pageXOffset, target);
    if (LINK_HISTORY)
      win.history.pushState(null, hash, hash);
  }

  // モジュール内スクロールバー表示を設定
  function setTocScrollBar(bool) {
    elSidebarToc.style.maxHeight = bool ? convPX(tocMaxHeight) : '';
    tocScrollbar = bool;
  }

  // 目次モジュールの設定
  function setTocModuleOption(position) {
    const style = tocModuleStyles[position];
    tracking = position !== POSITION_STATIC ? true : false;
    Object.keys(style).forEach(function(key) {
      stSidebarTocModule[key] = style[key];
    });
    if (tracking) clSidebarTocModule.add(CLASS_TRACKING);
    else clSidebarTocModule.remove(CLASS_TRACKING);
    if (POSITION_FIXED === position) clSidebarTocModule.add(CLASS_FIXED);
    else clSidebarTocModule.remove(CLASS_FIXED);
    if (POSITION_ABSOLUTE === position) clSidebarTocModule.add(CLASS_ABSOLUTE);
    else clSidebarTocModule.remove(CLASS_ABSOLUTE);
    setTocScrollBar(tracking);
  }

  // 追尾処理に必要な値を設定
  function setTrackingPoint() {
    // サイドバーが横に表示されているか
    function existSidebar() {
      if (MATCH_MEDIA)
        return win.matchMedia(MEDIA_QUERY_SIDEBAR).matches;
      return getComputedStyleWrap(elBox2).cssFloat !== 'none';
    }

    // スクロールイベントと追尾設定
    function setEventAndFollow(event, follow, callback) {
      setScrollEvent(event);
      followModule = follow;
      console.log('%cscrollEvent:%s followModule:%s', 'color:blue', event, follow);

      if (event && follow) {
        callback();
      }
      else {
        setPosition(0);
        setTocModuleOption(POSITION_STATIC);
        if (stickyMode)
          elBox2Inner.style.height = '';

        if (!event)
          for (let i = 0, len = clSidebarTocAnchors.length; i < len; i++)
            clSidebarTocAnchors[i].remove(CLASS_ACTIVE);
      }
    }

    // 指定したプロパティが設定されてない時の高さを取得
    function getStaticHeight(getElem, targetElem, styleName) {
      let ret;
      const style = targetElem.style;
      const mem = style[styleName];
      style[styleName] = '';
      ret = getOuterHeight(getElem, true);
      style[styleName] = mem;
      return ret;
    }

    // マージンの相殺で失われた分を返す(引数配列は親→子の順番で書く)
    function marginCollapsingOverlap(elemsTop, elemsBottom) {
      // 各要素の指定したプロパティで一番大きい数値を返す
      function max(elems, styleName) {
        let arr = [];
        for (let i = 0, len = elems.length; i < len; i++)
          arr[i] = getStyleFloat(elems[i], styleName);
        return Math.max.apply(null, arr);
      }
      // padding,borderがあって相殺が起こらないパターンを除外する
      // 親要素にpadding,borderがなければそのまま、あれば親要素だけ返す
      // マージンの相殺が起こらないパターンは他にもある
      // tb 0:top 1:bottom
      function filter(elems, tb) {
        const maxIndex = elems.length - 1;
        const tbIndex = tb * 2;
        if (maxIndex > 0)
          for (let i = 0; i < maxIndex; i++)
            for (let j = 0; j < 2; j++)
              if (getStyleFloat(elems[i], SUM_PADDING_HEIGHT[j + tbIndex]) > 0)
                return elems.slice(0, i + 1);
        return elems;
      }

      const marginTop = max(filter(elemsTop, 0), SUM_MARGIN_HEIGHT[0]);
      const marginBottom = max(filter(elemsBottom, 1), SUM_MARGIN_HEIGHT[1]);
      if (marginTop === 0 || marginBottom === 0)
        return 0;
      return Math.min(marginTop, marginBottom);
    }


    //----------------------
    console.log('%c--setTrackingPoint %s--', 'color:blue', Date().match(/\d\d:\d\d:\d\d/)[0]);
    const winHeight = win.innerHeight;
    const scrollbarX = winHeight - doc.documentElement.clientHeight;
    const mainHeight = Math.max(getOuterHeight(doc.getElementById('wrapper')), getOuterHeight(elMain));
    scrollRange = Math.max(doc.documentElement.scrollHeight - winHeight, 0);
    ghFixedHeight = 0;
    for (let i = 0, len = elGhs.length; i < len; i++)
      ghFixedHeight += getComputedStyleWrap(elGhs[i]).position === POSITION_FIXED ? getOuterHeight(elGhs[i]) : 0;
    console.log('ghFixedHeight:' + ghFixedHeight);
    marginComp = ghFixedHeight + MARGIN_TOP;
    leftMargin = elGuideModule.getBoundingClientRect().left + win.pageXOffset;

    // 計測用に.trackingを付与。また後で戻せるように保存しておく。
    const existTracking = clSidebarTocModule.contains(CLASS_TRACKING);
    if (!existTracking)
      clSidebarTocModule.add(CLASS_TRACKING);

    // 目次部分の高さを画面内に収まるように計算
    const moduleBlankSpaceHeight = sumElementProps(elSidebarTocModule, SUM_PADDING_HEIGHT)
      + sumElementProps(elSidebarTocModuleBody, SUM_PADDING_HEIGHT.concat(SUM_MARGIN_HEIGHT));
    const tocTitleHeight = elTocTitle ? getOuterHeight(elTocTitle, true) + marginCollapsingOverlap([elSidebarTocModuleBody], [elTocTitle]) : 0;
    tocMaxHeight = winHeight - scrollbarX - marginComp - MARGIN_BOTTOM - moduleBlankSpaceHeight - tocTitleHeight;

    if (MAX_HEIGHT) {
      const maxHeight = MAX_HEIGHT - moduleBlankSpaceHeight - tocTitleHeight;
      if (tocMaxHeight > maxHeight)
        tocMaxHeight = maxHeight;
    }

    // .trackingでborder等を付与する時でもマージンの相殺が計測できるように外す
    clSidebarTocModule.remove(CLASS_TRACKING);

    // 各見出しの位置を保存
    for (let i = 0, len = elContentList.length; i < len; i++)
      headlineTopList[i] = getScrollTop(elContentList[i]) - ghFixedHeight;
    console.assert(headlineTopList[0] !== headlineTopList[1], '見出し位置の重複：DELAY_GET_DOMを確認');

    // 横幅を合わせる
    stSidebarTocModule.width = getComputedStyleWrap(elGuideModule).width;

    // 現在位置表示をリセット
    setActive(-1);


    //----------------------
    // 追尾処理判定
    // サイドバーが横に表示されていない時
    if (!existSidebar()) {
      setEventAndFollow(!PAUSE_NO_SIDEBAR, false);
      if (PAUSE_NO_SIDEBAR) return;
    }
    // サイドバーより記事の方が小さい時
    else if (getStaticHeight(elBox2, elBox2Inner, 'height') > mainHeight) {
      setEventAndFollow(!PAUSE_MAIN_SMALL, false);
      if (PAUSE_MAIN_SMALL) return;
    }
    else {
      setEventAndFollow(true, true, function() {
        setTocScrollBar(tracking);
        setPosition(-1);
        prevScrollLeft = 0;

        const mainInnerHeight = getOuterHeight(elMainInner);
        const margins = getUnsetClassStyleFloat(elSidebarTocModule, ['marginTop', 'marginLeft'], [CLASS_TRACKING, CLASS_FIXED, CLASS_ABSOLUTE]);
        const tocModuleMarginTopUnsetClass = margins[0];
        const tocModuleMarginLeftUnsetClass = margins[1];
        leftMargin -= tocModuleMarginLeftUnsetClass;

        if (stickyMode) {
          // 親要素の高さを合わせる
          elBox2Inner.style.height = convPX(mainInnerHeight);
        }

        //----------------
        // ウィンドウに固定開始する位置
        scrollFixed = getScrollTop(elGuideModule) - ghFixedHeight + tocModuleMarginTopUnsetClass + ADJUST_FIXED;
        if (elSubGuideModule) {
          scrollFixed -= marginCollapsingOverlap(
            elTocTitle ? [elSidebarTocModule, elTocTitle] : [elSidebarTocModule],
            [elSubGuideModule, elSubGuideModule.children[1]]
          );
        }

        if (lastModuleToc)
          scrollFixed -= MARGIN_TOP;
        else if (tracking)
          scrollFixed += getStaticHeight(elSidebarTocModule, elSidebarToc, 'maxHeight');

        //----------------
        // 下までスクロールした時にページへ固定開始する位置
        const tocModuleMaxHeight = Math.min(winHeight - marginComp, getOuterHeight(elSidebarTocModule));
        scrollAbsolute = getScrollTop(elMainInner) + mainInnerHeight - tocModuleMaxHeight - marginComp;

        // 親要素にposition:relativeがあれば位置を保存する
        relativeOffset = elGuideModule.offsetParent !== doc.body ? getScrollTop(elGuideModule.offsetParent) : 0;

        //----------------
        // モジュール固定位置
        tocModuleStyles[POSITION_FIXED].top = convPX(marginComp - tocModuleMarginTopUnsetClass);
        tocModuleStyles[POSITION_ABSOLUTE].top = convPX(scrollAbsolute - relativeOffset + marginComp - tocModuleMarginTopUnsetClass);

        console.log('relativeOffset:' + relativeOffset);
        if (elSubGuideModule)
          console.log('marginCollapsingOverlap:' + marginCollapsingOverlap(
            elTocTitle ? [elSidebarTocModule, elTocTitle] : [elSidebarTocModule],
            [elSubGuideModule, elSubGuideModule.children[1]])
          );
        console.log('tocModuleMargin Top:%d Left:%d', tocModuleMarginTopUnsetClass, tocModuleMarginLeftUnsetClass);
        console.log('SidebarToc.top:' + getScrollTop(elSidebarTocModule));
        console.log('scrollFixed   :' + scrollFixed);
        console.log('scrollAbsolute:' + scrollAbsolute);
      });
    }

    // .trackingを戻す
    if (existTracking)
      clSidebarTocModule.add(CLASS_TRACKING);

    updateScroll();
  }

  // 現在のスクロール位置をもとに表示を更新
  function updateScroll() {
    const scrollTop = win.pageYOffset;
    const scrollLeft = win.pageXOffset;

    // モジュールを追従させる(followModuleがtrueの時だけ)
    if (scrollAbsolute < scrollTop) {
      // 固定解除(下)
      if (updatePosition(2)) {
        setTocModuleOption(POSITION_ABSOLUTE);
        prevScrollLeft = 0;
      }
    }
    else if (scrollFixed < scrollTop) {
      // 固定
      updatePosition(1, function(current) {
        // サイドバーの最後以外に設置されていて直前が初期位置の時はフェードインさせる
        if (!lastModuleToc && current === 0)
          clSidebarTocModule.add(CLASS_FADE_IN);
        setTocModuleOption(POSITION_FIXED);
      });
    }
    else {
      // 初期位置
      if (updatePosition(0))
        setTocModuleOption(POSITION_STATIC);
    }

    // 横方向のスクロールに合わせる
    if (!stickyMode && getPosition() === 1 && scrollLeft !== prevScrollLeft) {
      stSidebarTocModule.left = convPX(leftMargin - scrollLeft);
      prevScrollLeft = scrollLeft;
    }

    // 現在位置のクラス設定
    if (scrollTop <= headlineTopList[0] - CURRENT_MARGIN) {
      setActive(0);
    }
    else if ((scrollRange - scrollTop) <= CURRENT_MARGIN) {
      setActive(tocLastIndex);
    }
    else {
      for (let i = tocLastIndex; i >= 0; i--) {
        if (scrollTop > headlineTopList[i] - CURRENT_MARGIN) {
          setActive(i);
          break;
        }
      }
    }
  }
}

// HTMLの読込と解析が終わったら
function setDOMContentLoaded(func) {
  win.addEventListener('DOMContentLoaded', function() {
    console.time('Event:DOMContentLoaded -> load');
    setTimeout(func, DELAY_TIME_DOM);
  }, false);
}

// 見出しなどを取得するタイミングをHTMLが読み込まれたあとにする
if (DELAY_GET_DOM)
  setDOMContentLoaded(main);
else
  main();

//# sourceURL=sidebar_toc.js
}());
</script>
sidebar_toc_footer_minify.html
<!-- 追尾する目次 ver3.3.0  https://git.io/stoc -->
<script>
(function() {
'use strict';
//----------------------
// ↓設定ここから↓

const PAGES = [
  {
    class    : 'page-entry',
    title    : '目次',
    display  : true
  },
  {
    class    : 'page-index',
    title    : 'このページの記事一覧',
    listPage : true,
    display  : true
  },
  {
    class    : 'page-archive',
    title    : 'このページの記事一覧',
    listPage : true,
    display  : true
  },
  {
    class    : 'page-static_page',
    title    : 'entry-title',
    display  : false
  },
];
const MATCH_MEDIA         = false;
const MEDIA_QUERY_SIDEBAR = '(min-width: 768px)';
const MARGIN_TOP     = 10;
const MARGIN_BOTTOM  = 0;
const CURRENT_MARGIN = 50;
const ADJUST_FIXED   = 0;
const MAX_HEIGHT     = 0;
const HEADLINE_QUERY = ['h3', 'h4', 'h5'];
const HEADLINE_MIN   = 1;
const ADJUST_SCROLL  = 0;
const SCROLL_TIME_PC    = 400;
const SCROLL_TIME_TOUCH = 0;
const TOC_INSIDE_SCROLL = true;
const TOC_TITLE_TOP   = true;
const SCROLL_SHADOW   = false;
const LINK_HISTORY    = true;
const DELAY_GET_DOM   = false;
const DELAY_TIME_DOM  = 250;
const DELAY_TIME_LOAD = 1000;
const GLOBAL_HEADER   = ['#globalheader-container'];
const CLICK_UPDATE    = [];
const CLICK_UPDATE_DELAY = 500;
const USE_LIST        = 'ol';
const TOUCH_DEVICE    = 'ontouchstart' in window;
const TOUCH_DEVICE_DISABLE = false;
const F_STICKY_MODE   = false;
const PAUSE_NO_SIDEBAR = true;
const PAUSE_MAIN_SMALL = true;

// ↑設定ここまで↑
//----------------------

const t=window,e=document,n="stoc",o="stoc-module",i="stoc-title",r="stoc-body",s="stoc-guide",l="stoc-sub-guide",c="hatena-module-title",a="entry-title",f="entry-title-link",u="fade-in",d="touch",E="shadow",m="active",g="tracking",h="fixed",p="absolute",T="static",_="fixed",L="absolute",A="sticky",C=["marginTop","marginBottom"],I=["paddingTop","borderTopWidth","paddingBottom","borderBottomWidth"],y=TOUCH_DEVICE?SCROLL_TIME_TOUCH:SCROLL_TIME_PC,O=y>0;function N(t){return t+"px"}function D(){return e.createElement("div")}const M=function(){const t=/[&'"<>]/g,e={"&":"&amp;","'":"&#39;",'"':"&quot;","<":"&lt;",">":"&gt;"};function n(t){return e[t]}return function(e){return"string"!==typeof e?e:e.replace(t,n)}}(),v=function(){const t={};return function(e){const n=e.id.replace(/[-]./g,function(t){return t.charAt(1).toUpperCase()});if(!t[n]){const o=getComputedStyle(e,null);if(!n)return o;t[n]=o}return t[n]}}();function B(t){let n=[];const o=t.charAt(0),i=t.slice(1);return"#"===o?n[0]=e.getElementById(i):"."===o&&(n=e.getElementsByClassName(i)),n}function S(t,e){const n=parseFloat(v(t)[e]);return n}function R(t,e){let n=t.offsetHeight;return e&&(n+=U(t,C)),n}function b(e,n){return e.getBoundingClientRect().top+(void 0!==n?n:t.pageYOffset)}const H=function(){const e=1e3/30,n=t.scrollTo,o=t.performance?performance:Date;let i,r,s,l;{const e="requestAnimationFrame";(l=Object.prototype.hasOwnProperty.call(t,e))?(r=t[e],s=t.cancelAnimationFrame):(r=t.setTimeout,s=t.clearTimeout)}function c(t){return t<.5?2*t*t:(4-2*t)*t-1}return function(a,f){const u=o.now(),d=t.pageYOffset,E=t.pageXOffset,m=a-d;let g;s(i),i=r(l?function t(e){g=e-u;if(g>=f)return void n(E,a);n(E,c(g/f)*m+d);i=r(t)}:function t(){g=o.now()-u;if(g>=f)return void n(E,a);n(E,c(g/f)*m+d);i=r(t,e)})}}();function U(t,e){let n=0;const o=v(t);for(let t=0,i=e.length;t<i;t++){const i=parseFloat(o[e[t]]);isNaN(i)||(n+=i)}return n}function P(){const P=e.getElementById(n);if(!P)return;const k=P.parentNode.parentNode,x=P.parentElement,Y=k.style,w=e.body.classList;let X;for(let t=0,e=PAGES.length;t<e;t++)if(w.contains(PAGES[t].class)){if(!PAGES[t].display)break;X=PAGES[t];break}if(!X)return void kt();const F=X.listPage,j=X.title,K=e.getElementById("main-inner");let Q=!1;if(!F){const t=K.getElementsByClassName("table-of-contents")[0];if(t){const e=t.getElementsByTagName("a");for(let t=0,n=e.length;t<n;t++)e[t].addEventListener("click",xt,!1);Q=!0}}if(TOUCH_DEVICE_DISABLE)return void kt();let V=[],q=[];if(F){const t=["hentry","archive-entry"];for(let e=0,n=t.length;e<n&&!((V=K.getElementsByClassName(t[e])).length>1);e++);const e=K.getElementsByClassName(f);for(let t=0,n=e.length;t<n;t++)q[t]=e[t].textContent}else V=K.getElementsByClassName("hentry")[0].getElementsByClassName("entry-content")[0].querySelectorAll(HEADLINE_QUERY.join());if(V.length<=HEADLINE_MIN)return void kt();let W=[],J=0;for(let t=0,e=V.length;t<e;t++){const e=V[t],n=F?q[t]:e.textContent;let o,i=0;if(Q?o=e.id:(o="section"+t,e.setAttribute("id",o)),W[t]='<li><a href="#'+o+'">'+M(n)+"</a>",F)continue;const r=e.nodeName.toLowerCase();for(let t=1,e=HEADLINE_QUERY.length;t<e;t++)if(r===HEADLINE_QUERY[t]){i=t;break}for(;J<i;)W[t]="<"+USE_LIST+">"+W[t],J++;for(;J>i;)W[t]="</"+USE_LIST+"></li>"+W[t],J--}let z,Z=!1;""!==j&&(z=F||j!==a?j:K.getElementsByClassName(f)[0].textContent);const $=k.getElementsByClassName(c)[0];if($&&k.removeChild($),z){const e=M(z),n=D();n.id=i,n.className=c,n.innerHTML=TOC_TITLE_TOP?'<a href="#">'+e+"</a>":e,Z=k.insertBefore(n,k.firstElementChild),TOC_TITLE_TOP&&Z.getElementsByTagName("a")[0].addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),O?H(0,y):t.scrollTo(t.pageXOffset,0)},!1)}x.id=r;const tt=e.createElement("ol");tt.innerHTML=W.join(""),P.appendChild(tt),k.setAttribute("id",o);const et=P.getElementsByTagName("a"),nt=[];for(let t=0,e=et.length;t<e;t++)et[t].addEventListener("click",xt,!1),nt[t]=et[t].classList;const ot=e.getElementById("main"),it=e.getElementById("box2"),rt=k.classList,st=[];for(let t=0,e=GLOBAL_HEADER.length;t<e;t++){const e=B(GLOBAL_HEADER[t]);e[0]&&st.push(e[0])}const lt=W.length-1;let ct,at,ft,ut,dt,Et,mt,gt,ht,pt,Tt,_t=[],Lt=!1;const At={};At[L]={left:""},At[_]={},At[T]={},SCROLL_SHADOW&&P.classList.add(E),TOUCH_DEVICE&&(P.classList.add(d),rt.add(d));let Ct,It,yt,Ot=!1;if(TOUCH_DEVICE||F_STICKY_MODE){const t=["-webkit-"+A,A],e=D().style;for(let n=0,o=t.length;n<o;n++)if(e.position=t[n],Ot=-1!==e.position.indexOf(A)){rt.add("sticky");break}}const Nt=k.parentNode,Dt=Nt.children,Mt=Dt.length,vt=D();let Bt;vt.id=s,vt.className="hatena-module",vt.style.cssText=["visibility: hidden;","height: 0;","margin-top: 0;","margin-bottom: 0;","padding-top: 0;","padding-bottom: 0;","border-top: 0;","border-bottom: 0;"].join(""),1===Mt?(Ct=Nt.insertBefore(vt,k),yt=!0):(yt=Dt[Mt-1]===k)?((It=k.previousElementSibling).id=l,Ct=Nt.insertBefore(vt,k)):Ct=Nt.appendChild(vt),t.addEventListener("resize",function(){clearTimeout(Bt),Bt=setTimeout(Xt,200)},!1),k.addEventListener("animationend",function(){rt.remove(u)},!1);const St=function(){let t=-1;return function(e){if(e!==t){if(t>=0&&nt[t].remove(m),t=e,e<0)return;let n=et[e];nt[e].add(m),TOC_INSIDE_SCROLL&&pt&&Lt&&(P.scrollTop=n.offsetTop+n.offsetHeight-ht)}}}(),Rt=function(){let t=0;return{update:function(e,n){return!(e===t||!ut)&&(n&&n(t),t=e,!0)},get:function(){return t},set:function(e){t=e}}}(),bt=Rt.update,Ht=Rt.get,Ut=Rt.set,Pt=function(){let e=!1;return function(n){n!==e&&(e?t.removeEventListener("scroll",Ft,!1):t.addEventListener("scroll",Ft,!1),e=n)}}();function Gt(){let e;Xt();for(let t=0,n=CLICK_UPDATE.length;t<n;t++){const n=B(CLICK_UPDATE[t]);for(let t=0,o=n.length;t<o;t++)n[t].addEventListener("click",function(){clearTimeout(e),e=setTimeout(Xt,CLICK_UPDATE_DELAY)},!1)}t.addEventListener("load",function(){setTimeout(Xt,DELAY_TIME_LOAD)},!1)}function kt(){Y.display="none"}function xt(n){n.preventDefault();const o=decodeURIComponent(n.currentTarget.hash),i=b(e.getElementById(o.substr(1)))-dt+ADJUST_SCROLL;O?H(Math.min(i,ct),y):t.scrollTo(t.pageXOffset,i),LINK_HISTORY&&t.history.pushState(null,o,o)}function Yt(t){P.style.maxHeight=t?N(ht):"",pt=t}function wt(t){const e=At[t];Lt=t!==T,Object.keys(e).forEach(function(t){Y[t]=e[t]}),Lt?rt.add(g):rt.remove(g),_===t?rt.add(h):rt.remove(h),L===t?rt.add(p):rt.remove(p),Yt(Lt)}function Xt(){function n(t,e,n){if(Pt(t),ut=e,t&&e)n();else if(Ut(0),wt(T),Ot&&(Nt.style.height=""),!t)for(let t=0,e=nt.length;t<e;t++)nt[t].remove(m)}function o(t,e,n){let o;const i=e.style,r=i[n];return i[n]="",o=R(t,!0),i[n]=r,o}function i(t,e){function n(t,e){let n=[];for(let o=0,i=t.length;o<i;o++)n[o]=S(t[o],e);return Math.max.apply(null,n)}function o(t,e){const n=t.length-1,o=2*e;if(n>0)for(let e=0;e<n;e++)for(let n=0;n<2;n++)if(S(t[e],I[n+o])>0)return t.slice(0,e+1);return t}const i=n(o(t,0),C[0]),r=n(o(e,1),C[1]);return 0===i||0===r?0:Math.min(i,r)}const r=t.innerHeight,s=r-e.documentElement.clientHeight,l=Math.max(R(e.getElementById("wrapper")),R(ot));ct=Math.max(e.documentElement.scrollHeight-r,0),dt=0;for(let t=0,e=st.length;t<e;t++)dt+=v(st[t]).position===_?R(st[t]):0;Et=dt+MARGIN_TOP,gt=Ct.getBoundingClientRect().left+t.pageXOffset;const c=rt.contains(g);c||rt.add(g);const a=U(k,I)+U(x,I.concat(C)),f=Z?R(Z,!0)+i([x],[Z]):0;if(ht=r-s-Et-MARGIN_BOTTOM-a-f,MAX_HEIGHT){const t=MAX_HEIGHT-a-f;ht>t&&(ht=t)}rt.remove(g);for(let t=0,e=V.length;t<e;t++)_t[t]=b(V[t])-dt;if(Y.width=v(Ct).width,St(-1),MATCH_MEDIA?t.matchMedia(MEDIA_QUERY_SIDEBAR).matches:"none"!==v(it).cssFloat)if(o(it,Nt,"height")>l){if(n(!PAUSE_MAIN_SMALL,!1),PAUSE_MAIN_SMALL)return}else n(!0,!0,function(){Yt(Lt),Ut(-1),Tt=0;const t=R(K),n=function(t,e,n){let o=[];const i=t.classList,r=n.filter(function(t){return i.contains(t)});return r.forEach(function(t){i.remove(t)}),e.forEach(function(e){o.push(S(t,e))}),r.forEach(function(t){i.add(t)}),o}(k,["marginTop","marginLeft"],[g,h,p]),s=n[0],l=n[1];gt-=l,Ot&&(Nt.style.height=N(t)),at=b(Ct)-dt+s+ADJUST_FIXED,It&&(at-=i(Z?[k,Z]:[k],[It,It.children[1]])),yt?at-=MARGIN_TOP:Lt&&(at+=o(k,P,"maxHeight"));const c=Math.min(r-Et,R(k));ft=b(K)+t-c-Et,mt=Ct.offsetParent!==e.body?b(Ct.offsetParent):0,At[_].top=N(Et-s),At[L].top=N(ft-mt+Et-s)});else if(n(!PAUSE_NO_SIDEBAR,!1),PAUSE_NO_SIDEBAR)return;c&&rt.add(g),Ft()}function Ft(){const e=t.pageYOffset,n=t.pageXOffset;if(ft<e?bt(2)&&(wt(L),Tt=0):at<e?bt(1,function(t){yt||0!==t||rt.add(u),wt(_)}):bt(0)&&wt(T),Ot||1!==Ht()||n===Tt||(Y.left=N(gt-n),Tt=n),e<=_t[0]-CURRENT_MARGIN)St(0);else if(ct-e<=CURRENT_MARGIN)St(lt);else for(let t=lt;t>=0;t--)if(e>_t[t]-CURRENT_MARGIN){St(t);break}}DELAY_GET_DOM?Gt():G(Gt)}function G(e){t.addEventListener("DOMContentLoaded",function(){setTimeout(e,DELAY_TIME_DOM)},!1)}DELAY_GET_DOM?G(P):P();}());
</script>