/* ============================================
   はてなブログ カスタムCSS（高さ調整版）
   ============================================
   堅牢デザイン版をベースに高さ・縦余白を調整（デスクトップ・モバイル両方）
   行間・見出し前後の余白・タップ領域・セクション間の空きを統一して見やすく
   ============================================
   動画クリエイター向け・堅牢感のあるトーンに統一
   フォント: ゴシック体（システムフォント）で読みやすく / カラー: 濃いめテキスト・はっきりしたアクセント・境界線
   CLS対策は継承（body余白・広告枠・font-display 等）
   ============================================
   モバイルCLS対策を反映:
   - フォント optional / body・#blog-title でヘッダー高さを事前確保
   - #ins-ads-toc に min-height・aspect-ratio / 読者になる .header-subscribe に min-height
   - サイドバー広告・目次上広告枠に min-height / 読者になる枠に min-height
   ※ テーマで body に padding-top を指定している場合は重複するため、当該ルールを削除するかテーマ側を調整してください。
   ============================================
   構成:
   1. システム・基本設定・フォント
   2. 本文・見出し・目次・リンク
   3. カテゴリ・タグ（記事・サイドバー）
   4. コード・テーブル・装飾
   5. ヘッダー（固定・ナビ・検索・読者になる）
   6. フッター
   7. レスポンシブ・サイドバー並び替え
   8. 広告・画像・記事リスト・パンくず・日付
   9. 記事ヘッダー・モバイル記事ページ
   10. プロフィール・ポップアップ・シェア
   11. その他（横揺れ防止・ツイート風・ボタン等）
   ※ ブレークポイント: 767px（モバイル）/ 768px（一部）/ 480px（小型スマホ）
   ============================================ */

/* --- 1. システム・基本設定 --- */
@charset "UTF-8";
/*
  Theme: UnderShirt
  Author: rokuzeudon
  Responsive: yes
  Description:
    記事一覧ページでサムネイル画像を大きく表示するはてなブログテーマです。
*/
@import url("https://fonts.googleapis.com/css?family=Poppins:400,600");
/*! 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;
}

#content-inner {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-flow: column;
            flex-flow: column;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}

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

.entry-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-flow: column;
            flex-flow: column;
}

.entry-header .entry-title {
    -webkit-box-ordinal-group: 1;
        -ms-flex-order: 0;
            order: 0;
}

.entry-header .date {
    -webkit-box-ordinal-group: 2;
        -ms-flex-order: 1;
            order: 1;
}

.entry-header .categories {
    -webkit-box-ordinal-group: 3;
        -ms-flex-order: 2;
            order: 2;
}

.entry-header .customized-header {
    -webkit-box-ordinal-group: 4;
        -ms-flex-order: 3;
            order: 3;
}

.entry-header .social-buttons {
    -webkit-box-ordinal-group: 5;
        -ms-flex-order: 4;
            order: 4;
}

.archive-entries {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
}

.page-archive .archive-entry {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-flow: column;
            flex-flow: column;
}

.page-archive .archive-entry .entry-thumb-link {
    -webkit-box-ordinal-group: 1;
        -ms-flex-order: 0;
            order: 0;
}

.page-archive .archive-entry .archive-entry-header {
    -webkit-box-ordinal-group: 2;
        -ms-flex-order: 1;
            order: 1;
}

.page-archive .archive-entry .archive-entry-body {
    -webkit-box-ordinal-group: 3;
        -ms-flex-order: 2;
            order: 2;
}

.page-archive .archive-entry .categories {
    -webkit-box-ordinal-group: 4;
        -ms-flex-order: 3;
            order: 3;
}

.archive-entry-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-flow: column;
            flex-flow: column;
}

.archive-entry-header .entry-title {
    -webkit-box-ordinal-group: 1;
        -ms-flex-order: 0;
            order: 0;
}

.archive-entry-header .date {
    -webkit-box-ordinal-group: 2;
        -ms-flex-order: 1;
            order: 1;
}

.pager {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}

html,
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, Segoe UI, 'Helvetica Neue', 'Helvetica', 'Arial', 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
    color: #454545;
    background-color: #f5f5f5;
    line-height: 1.6;
    letter-spacing: .08em;
}

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

a:hover {
    color: #1487bd;
    text-decoration: none;
}

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

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 に背景色や文字色を指定することで中にも色が反映されます
*/
#globalheader-container {
    background-color: #454545;
    color: #f5f5f5;
}

#content-inner {
    max-width: 1200px;
    margin: auto;
}

#blog-title {
    margin: auto;
    max-width: 1200px;
    padding: 3em 20px 2em;
    text-align: center;
}

@media (min-width: 992px) {
    #blog-title {
        margin: 0 auto;
        padding: 3em 40px;
        -webkit-box-sizing: border-box;
                box-sizing: border-box;
        text-align: left;
    }
}

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

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

#title a {
    color: #454545;
}

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

.header-image-enable #blog-title {
    margin: 0 auto 2em;
}

@media (min-width: 768px) {
    .header-image-enable #blog-title {
        padding: 0 40px;
    }
}

.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;
    margin: 30px 0 0;
}

@media (min-width: 992px) {
    .header-image-enable #blog-title-inner {
        background-size: cover;
    }
}

.header-image-enable #blog-title-content {
    margin: auto;
    text-align: center;
}

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

#top-editarea {
    margin-bottom: 1em;
}

.breadcrumb {
    padding: 0 20px;
    font-size: .78rem;
}

@media (min-width: 768px) {
    .breadcrumb {
        padding: 0 40px;
    }
}

@media (min-width: 992px) {
    #wrapper {
        width: calc( 100% - 337px);
    }
}

#main {
    width: 100%;
}

#main-inner {
    max-width: 1140px;
    margin: auto;
    padding: 0 20px;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

@media (min-width: 992px) {
    #main-inner {
        padding: 0 40px;
    }
}

.entry {
    position: relative;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
}

@media (min-width: 768px) {
    .entry {
        padding: 30px 40px;
    }
}

.entry-header {
    position: relative;
    margin: 10px 0 30px;
}

.entry-header .social-buttons {
    margin: 1em 0 0;
    padding: 1em 0;
    border-top: 1px solid #ddd;
}

.date {
    font-size: .9rem;
}

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

.date a:hover {
    color: #454545;
}

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

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

.categories a {
    font-size: .86rem;
    display: inline-block;
    margin: 8px 4px 0 0;
    padding: 4px 8px 2px;
    background: #f5f5f5;
    text-decoration: none;
}

.categories a:hover {
    color: #1487bd;
}

.entry-footer .social-buttons {
    margin-bottom: 1em;
}

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

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

.comment-box {
    margin: 2em 0 1em;
    padding: 2em 0 1em;
    border-top: 4px solid #ddd;
}

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

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

.entry-comment {
    margin: 0 0 1em;
    padding: 10px 10px 10px 70px;
    background: #f5f5f5;
    border-radius: 6px;
    position: relative;
}

.read-more-comments {
    padding: 10px 0;
    text-decoration: underline;
}

.hatena-id-icon {
    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;
    background: #f5f5f5;
    top: 0;
    -webkit-box-shadow: 1px 3px 10px #ddd;
            box-shadow: 1px 3px 10px #ddd;
}

.leave-comment-title:hover {
    top: 3px;
    -webkit-box-shadow: 0 1px 3px #ddd;
            box-shadow: 0 1px 3px #ddd;
}

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

#box2-inner {
    padding: 0 20px;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

@media (min-width: 768px) {
    #box2-inner {
        padding: 0 40px;
    }
}

@media (min-width: 992px) {
    #box2-inner {
        padding-left: 0;
    }
}

.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: 0;
    padding: 2em 0 1em;
    border-top: 4px solid #ddd;
    font-size: 1.2rem;
    font-weight: bold;
}

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

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

.hatena-urllist {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

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

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

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

.urllist-category-link {
    color: #999;
    font-size: .8rem;
    padding: .1em .3em .1em 0;
}

.urllist-date-link a {
    display: block;
    margin: 0 0 .4em;
    color: #999;
}

.urllist-entry-body {
    margin-top: .3em;
    color: #999;
}

.urllist-with-thumbnails li .urllist-image {
    position: relative;
    margin: 0 1em 1em 0;
    -webkit-transition: .1s ease-out;
    transition: .1s ease-out;
    top: 0;
    -webkit-box-shadow: 1px 3px 10px #ddd;
            box-shadow: 1px 3px 10px #ddd;
}

.urllist-with-thumbnails li .urllist-image:hover {
    top: 3px;
    -webkit-box-shadow: 0 1px 3px #ddd;
            box-shadow: 0 1px 3px #ddd;
}

.urllist-categories {
    margin: .4em 0 0;
}

.profile-icon {
    float: left;
    margin: 0 10px 10px 0;
}

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

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

.search-form, .search-result-form {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    border: 2px solid #ddd;
    border-radius: 3px;
    width: 100%;
    padding: 4px 0 2px 6px;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

.search-module-input, .search-result-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, .search-result-button {
    width: 24px;
    height: 24px;
    margin-right: 5px;
    background: transparent url("https://cdn.blog.st-hatena.com/images/theme/search@2x.png?version=f5154c74e6e38109ce2f0c7b9afd51") 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;
}

.archive-module-calendar a {
    display: block;
    margin: 0 .2em;
    padding: .2em 0 0;
    color: #1487bd;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1em;
}

.archive-module-calendar a:hover {
    color: #0f668f;
    background: white;
}

.hatena-module-category a {
    position: relative;
    padding: 0 0 0 20px;
}

.hatena-module-category a::before {
    content: ">";
    display: inline;
    position: absolute;
    top: 0;
    left: 2px;
    color: #999;
    -webkit-transition: .1s ease-out;
    transition: .1s ease-out;
}

.hatena-module-category a:hover::before {
    color: #1487bd;
    left: 6px;
}

/* 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-header-category {
    margin: 30px;
    text-align: center;
}

.archive-entry {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    padding: 20px;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    background: #fff;
}

@media (min-width: 768px) {
    .archive-entry {
        width: calc(50% - 10px);
        padding: 20px;
    }
    .archive-entry:nth-child(odd) {
        margin-right: 19.5px;
    }
}

.page-archive #main-inner {
    padding: 20px;
}

@media (min-width: 768px) {
    .page-archive #main-inner {
        padding: 0 40px;
    }
}

.page-archive .entry-thumb-link {
    width: calc( 100% + 40px);
    margin: -20px 0 20px -20px;
}

@media (min-width: 768px) {
    .page-archive .entry-thumb-link {
        width: calc( 100% + 40px);
        margin: -20px 0 20px -20px;
    }
}

.page-archive .entry-thumb {
    width: 100%;
    height: 48vw;
    background-position: center;
}

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

@media (min-width: 992px) {
    .page-archive .entry-thumb {
        height: 17vw;
        max-height: 202px;
    }
}

.page-archive .categories a {
    font-size: .7em;
}

.archive-date {
    margin-bottom: .2em;
}

.archive-entry-header .entry-title {
    font-size: 1rem;
}

.archive-entry-header .date {
    font-size: .8rem;
}

.archive-entry-body .entry-description {
    margin: 0;
    font-size: .8rem;
}

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

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

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

.page-entry .breadcrumb {
    margin-bottom: 1em;
}

#footer {
    background: #eee;
}

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

#footer-inner a {
    color: #999;
}

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

@media (min-width: 768px) {
    #footer-inner {
        max-width: 1200px;
        margin: auto;
        padding: 20px 40px;
    }
}

.entry-content img,
.entry-content video {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

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

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

.entry-content h4 {
    margin: 2em 0 1em 0;
    font-size: 1.4rem;
}

.entry-content h5 {
    margin: 1.6em 0 1em 0;
    font-size: 1.2rem;
}

.entry-content h6 {
    margin: 1em 0 1em 0;
    font-size: .9rem;
}

.entry-content a {
    color: #1487bd;
    text-decoration: underline;
}

.entry-content a:hover {
    color: #0f668f;
    text-decoration: none;
}

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

.entry-content .entry-see-more {
    display: inline-block;
    padding: 10px 16px;
    color: #454545;
    text-decoration: none;
    background: #f5f5f5;
    top: 0;
    -webkit-box-shadow: 1px 3px 10px #ddd;
            box-shadow: 1px 3px 10px #ddd;
    -webkit-transition: .1s ease-out;
    transition: .1s ease-out;
}

.entry-content .entry-see-more:hover {
    top: 3px;
    -webkit-box-shadow: 0 1px 3px #ddd;
            box-shadow: 0 1px 3px #ddd;
}

.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: #fff;
}

.entry-content blockquote {
    margin: 2em 0 1.6em;
    padding: 20px;
    background: #f5f5f5;
}

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

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

.entry-content blockquote::before {
    content: "“";
    display: block;
    position: absolute;
    top: -52px;
    left: -12px;
    font-size: 8em;
    opacity: .1;
}

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

.entry-content pre {
    background: #fff;
    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: #fff;
    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 {
    margin: 0;
    padding: 1.2em;
    border: 1px solid #ddd;
    font-size: .9em;
}

.entry-content .table-of-contents::before {
    content: "目次";
    display: block;
    margin: 0 0 .8rem;
    padding: 0 0 .4rem;
    border-bottom: 1px solid #ddd;
    font-size: 1rem;
}

.entry-content .table-of-contents a {
    color: #454545;
}

.entry-content .table-of-contents li {
    margin: 0 0 0 1.4em;
    list-style-type: decimal;
}

.entry-content .table-of-contents li ul {
    margin: 0 0 1em .5em;
}

.entry-content .table-of-contents li ul li {
    margin: 4px;
}

.pager {
    margin: 2em 0;
}

.pager .pager-prev, .pager .pager-next {
    display: block;
    width: 50%;
}

.pager .pager-next {
    text-align: right;
}

.pager .pager-prev a, .pager .pager-next a {
    display: inline-block;
    width: 96%;
    padding: 20px;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

div.footnote {
    padding: 1em 0;
    border-top: #ddd 1px solid;
}

#footer .guest-footer {
    margin: 20px;
    padding: 25px 30px 10px;
    max-width: 700px;
    background: #fff;
    border-radius: 6px;
}

@media (min-width: 768px) {
    #footer .guest-footer {
        margin: 30px auto;
    }
}

.page-index .pager, .page-archive .pager {
    margin: 2em 0;
}

.entry-header-menu a {
    position: absolute;
    top: 0;
    right: 0;
    padding: 6px 10px;
    background: #f5f5f5;
    top: 0;
    -webkit-box-shadow: 1px 3px 10px #ddd;
            box-shadow: 1px 3px 10px #ddd;
    -webkit-transition: .1s ease-out;
    transition: .1s ease-out;
}

.entry-header-menu a:hover {
    top: 3px;
    -webkit-box-shadow: 0 1px 3px #ddd;
            box-shadow: 0 1px 3px #ddd;
}

.entry-header-html a, .entry-footer-html a {
    color: #1487bd;
    text-decoration: underline;
}

.entry-header-html a:hover, .entry-footer-html a:hover {
    text-decoration: none;
    color: #0f668f;
}

/*# sourceMappingURL=boilerplate.css.map */

/* 縦方向の余白・高さの統一（見やすさ） */
:root {
  --space-v-lg: 2em;
  --space-v-md: 1.25em;
  --space-v-sm: 0.75em;
  --space-v-xs: 0.5em;
  --line-tight: 1.5;
  --line-body: 1.8;
  --line-heading: 1.35;
}

/* --- 1. フォント設定（ゴシック体・読みやすさ優先） --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  background: #fff;
  color: #1a1a1a;
  padding-top: 75px;
}

@media screen and (max-width: 767px) {
  body {
    padding-top: 65px;
  }
}

h1, h2, h3, h4, h5, h6, p, a, span {
  font-family: inherit;
}

/* --- 2. 本文・見出し・目次・リンク --- */
.entry-content {
  font-size: 17px;
  line-height: var(--line-body);
  color: #1a1a1a;
}

.entry-content p {
  margin-bottom: var(--space-v-md);
}

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

/* --- コントラストの改善（はてなスター） --- */
.hatena-star-count {
  color: #555;
}

/* --- 見出しデザイン（階層をはっきり・堅牢感） --- */
.entry-content h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: var(--line-heading);
  margin: 2.5em 0 0.75em;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.entry-content h2 {
  font-size: 23px;
  font-weight: 600;
  line-height: var(--line-heading);
  padding-left: 15px;
  border-left: 4px solid #0056b3;
  margin: 2.25em 0 0.65em;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}

.entry-content h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: var(--line-heading);
  padding-bottom: 8px;
  border-bottom: 1px solid #bbb;
  margin: 1.75em 0 0.6em;
  color: #1a1a1a;
}

.entry-content h4 {
  font-size: 17px;
  font-weight: 600;
  line-height: var(--line-heading);
  margin: 1.5em 0 0.5em;
  color: #333;
}

/* --- 目次・リンク（アクセントは濃いめの青で統一） --- */
ul.table-of-contents {
  border: 1px solid #0056b3;
  border-radius: 6px;
  padding: 18px 20px 18px 35px;
  background-color: #FAFAFA;
  list-style-type: decimal;
  line-height: 1.7;
}

ul.table-of-contents li {
  margin-bottom: 0.35em;
}

ul.table-of-contents li:last-child {
  margin-bottom: 0;
}

.entry-content .table-of-contents li ul {
  display: none;
}

ul.table-of-contents li a,
ul.table-of-contents a {
  color: #0056b3;
}

.entry-content a {
  color: #0056b3;
  font-weight: 500;
}

span[data-user-name="milktea294"]:hover,
.hatena-urllist li a:hover,
.comment-box.js-comment-box a:hover,
.breadcrumb-inner a:hover,
.entry-title a:hover,
.design-profile-wrap > div:last-child a:hover span {
  color: #004080;
}

/* プロフィールSNSリンク：通常のSNSアイコン風（線なし・グレー） */
.design-sns-links {
  margin-bottom: 2em;
}
.design-sns-links .sns-button {
  color: #6b7280;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
}
.design-sns-links .sns-button:hover {
  color: #374151;
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
}
.design-sns-links .sns-button i,
.design-sns-links .sns-button svg {
  color: inherit;
  fill: currentColor;
}
.design-sns-links .sns-button::after,
.design-sns-links .sns-button::before {
  display: none !important;
}

/* --- 3. カテゴリ・タグ（記事・サイドバー） --- */
/* 記事一覧・記事ページ共通：タグをタイトル寄せ・説明との間を広く */
.entry-categories {
  margin-top: 8px;
  margin-bottom: 12px;
}

/* カテゴリタグ共通：.categories / .entry-categories 内とも同じコンパクトデザインに統一 */
.entry-categories .entry-category-link,
.categories a,
.categories .archive-category-link,
.entry-category-link {
  display: inline-flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  color: #444;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 6px;
  margin: 0 2px 7px 0;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}

.entry-categories .entry-category-link::before,
.categories a::before,
.categories .archive-category-link::before,
.entry-category-link::before {
  content: ">";
  margin-right: 3px;
  color: #555;
  font-size: 10px;
}

.entry-categories .entry-category-link:hover,
.categories a:hover,
.categories .archive-category-link:hover,
.entry-category-link:hover {
  background-color: #FAFAFA;
  border-color: #0056b3;
  color: #0056b3;
  text-decoration: none;
}

.entry-categories.categories a {
  color: #444;
}

/* --- タグ --- */
.entry-tags {
  margin-top: 8px;
  margin-bottom: 12px;
}

.entry-tags .entry-tag-link {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  color: #444;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  transition: all 0.2s ease;
  border: none;
  padding: 0;
}

.entry-tags .entry-tag-link:hover {
  color: #0056b3;
  text-decoration: none;
}

/* --- サイドバー カテゴリータグ（最小・コンパクト版） --- */
/* 人気記事（entries-access-ranking）は除外 — チップ用スタイルが記事カード全体に乗るのを防ぐ */
.page-sidebar .hatena-module-category .hatena-urllist a,
.page-sidebar .hatena-module:not(.hatena-module-entries-access-ranking) .hatena-urllist a {
  display: inline-flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  color: #444;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 2px 6px;
  margin: 0 2px 4px 0;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* カテゴリのみ「>」／アーカイブは公式の開閉三角と重複しないよう付与しない */
.hatena-module-category li a::before {
  content: ">";
  margin-right: 3px;
  color: #555;
  font-size: 10px;
}

/* アーカイブ：開閉記号と「2026 (35)」を同一行に／月リストは下段で全幅 */
.hatena-module-archive .hatena-module-body > ul > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 6px;
  row-gap: 0;
  margin: 0 0 12px;
}

.hatena-module-archive .hatena-module-body > ul > li:last-child {
  margin-bottom: 0;
}

.hatena-module-archive .hatena-module-body > ul > li > ul {
  flex: 1 0 100%;
  width: 100%;
  margin: 6px 0 0;
  padding: 0 0 0 0.75rem;
  list-style: none;
}

/* 年見出しが div でラップされているテーマ向け */
.hatena-module-archive .hatena-module-body > ul > li > div:first-child {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.hatena-module-archive .hatena-module-body > ul > li > div:first-child + ul {
  flex: 1 0 100%;
  width: 100%;
  margin: 6px 0 0;
  padding: 0 0 0 0.75rem;
  list-style: none;
}

.hatena-module-archive .hatena-module-body > ul > li > span,
.hatena-module-archive .hatena-module-body > ul > li > button,
.hatena-module-archive .hatena-module-body > ul > li > .archive-module-toggle {
  flex: 0 0 auto;
  align-self: center;
  line-height: 1;
}

.hatena-module-archive .hatena-module-body ul ul > li {
  margin: 0 0 4px;
}

.hatena-module-archive .hatena-module-body ul ul > li:last-child {
  margin-bottom: 0;
}

.hatena-module-archive a.archive-module-year-title {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  min-height: 44px;
  box-sizing: border-box;
  line-height: 1.35;
  font-weight: 600;
  color: #1a1a1a;
  flex: 1 1 auto;
  min-width: 0;
}

/* アイコンが a 内の子要素のときも横並びに */
.hatena-module-archive a.archive-module-year-title > :first-child {
  flex-shrink: 0;
}

.hatena-module-archive a.archive-module-month-title {
  display: block;
  padding: 10px 2px 10px 8px;
  min-height: 44px;
  box-sizing: border-box;
  line-height: 1.4;
  color: #333;
}

/* モバイルビュー：10px */
@media (max-width: 767px) {
  .page-sidebar .hatena-module-category .hatena-urllist a,
  .page-sidebar .hatena-module:not(.hatena-module-entries-access-ranking) .hatena-urllist a,
  .categories a,
  .categories .archive-category-link,
  .entry-category-link,
  .entry-categories .entry-category-link {
    font-size: 10px;
    padding: 4px 4px;
  }
}

/* ホバー時の動き（簡略化） */
.page-sidebar .hatena-module-category .hatena-urllist a:hover {
  border-color: #0056b3;
  color: #0056b3;
}

/* --- 更新日を非表示 --- */
.date.updated,
.entry-date .updated,
.entry-header .updated {
  display: none;
}

/* --- 4. コード・テーブル・装飾 --- */
.entry-content pre.code {
  background-color: #161B22;
  color: #d4d4d4;
  padding: 1.25em 1.5em;
  border-radius: 6px;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.85em;
  line-height: 1.6;
  border: none;
  overflow-x: auto;
  margin: var(--space-v-md) 0;
}

.entry-content code {
  background-color: #FAFAFA;
  color: #333;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
  line-height: 1.5;
}

.entry-content table th {
  background-color: #FAFAFA;
  color: #1a1a1a;
  font-weight: 600;
  padding: 0.6em 0.8em;
}

.entry-content table td {
  padding: 0.5em 0.8em;
  line-height: var(--line-body);
}

.entry-content table {
  margin: var(--space-v-md) 0;
}

hr {
  width: 30%;
  border-top: 2px solid #bbb;
  border-right: none;
  border-bottom: none;
  border-left: none;
  margin: 2.25em auto;
}

u {
  text-decoration: none;
  background: linear-gradient(transparent 50%, rgba(0, 86, 179, 0.15) 50%);
  font-weight: 600;
  padding: 0 2px;
}

/* --- サイドバー --- */
.sidebar-follow-box {
  background-color: #FAFAFA;
  border: 1px solid #e0e0e0;
  padding: 15px;
  border-radius: 6px;
}

.hatena-module-category .hatena-module-body ul {
  list-style: none;
  padding: 0;
  margin: -5px;
  display: flex;
  flex-wrap: wrap;
}

.hatena-module-category .hatena-module-body ul li {
  margin: 4px;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 2px 6px;
}

/* --- サイドバーカレンダー --- */
.archive-module-calendar-highlight {
  color: #0056b3;
  font-weight: 600;
}

.calendar-day a:hover .archive-module-calendar-highlight {
  color: #004080;
  text-decoration: underline;
}

.calendar-day a {
  text-decoration: none;
}

.related-entries-image {
  border-radius: 6px;
  object-fit: cover;
}

/* --- 5. ヘッダー（固定・ナビ・検索・読者になる） --- */
#top-editarea {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background-color: #fff;
  color: #1a1a1a; /* アクセシビリティ: ヘッダー内テキストのベースコントラスト */
  transition: transform 0.4s ease;
  height: 75px;
  display: flex;
  align-items: center;
  box-shadow: none;
  border-bottom: none;
}

#top-editarea.is-scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
}

#top-editarea.is-hidden {
  transform: translateY(-100%);
}

.minimal-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 75px;
}

/* チャンネル名がグローバルメニューに隠れないよう前面に表示・縮小しない */
.header-logo {
  display: flex;
  align-items: center;
  order: 1;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.header-logo a {
  display: block;
  line-height: 0;
  white-space: nowrap;
}

.header-logo img {
  height: 42px;
  width: auto;
  transition: opacity 0.3s ease;
}

.header-logo img:hover {
  opacity: 0.7;
}

.header-nav {
  order: 2;
  margin-left: auto;
  display: flex;
  gap: 25px;
  position: relative;
  z-index: 1;
}

.header-link {
  color: #1a1a1a; /* #444 よりコントラスト比を確保（白背景上） */
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  text-decoration: none;
  padding-bottom: 4px;
}

.header-link:hover {
  color: #004a9c;
}

.header-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #0056b3;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.header-link:hover::after {
  width: 100%;
}

.header-search {
  order: 3;
  display: flex;
  align-items: center;
  width: 220px;
  margin-left: 20px;
}

.header-search .search-form {
  display: flex;
  align-items: center;
  background: #FAFAFA;
  border-radius: 8px;
  padding: 0 4px 0 8px;
  border: 1px solid #eee;
  box-sizing: border-box;
  min-height: 34px;
  height: 34px;
}

.header-search .search-module-input {
  background: transparent;
  border: none;
  padding: 0 4px;
  font-size: 12px;
  width: 120px;
  min-height: 0;
  height: 26px;
  line-height: 26px;
  box-sizing: border-box;
  outline: none;
  color: #1a1a1a;
}

.header-search .search-module-input::placeholder {
  color: #595959;
  opacity: 1;
}

.header-search .search-module-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #595959;
  font-size: 14px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.header-search .search-module-button:hover {
  color: #0056b3;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #333;
  transition: all 0.3s ease;
}

/* 固定ヘッダー(75px)の直下にチャンネル名が入るため、余白で確実に下にずらす */
#blog-title {
  margin-top: 0;
  padding-top: 90px; /* ヘッダー下にチャンネル名＋キャッチコピーが隠れないように（body余白が効かないテーマでも 90px>75px で表示） */
  background-color: #fff;
}
#blog-title-inner {
  padding-top: 0.6em;
  padding-bottom: 0.25em;
}

/* --- 読者になるボタン --- */
/* CLS対策: iframe読み込み前から枠の高さを確保 */
.header-subscribe {
  min-height: 36px;
}

.header-subscribe .hatena-follow-button-box {
  display: flex;
  align-items: center;
  margin: 0;
}

.header-subscribe .hatena-follow-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border: 1px solid #757575;
  color: #1a1a1a;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  box-shadow: none;
  text-shadow: none;
  height: auto;
  width: auto;
  box-sizing: border-box;
  min-height: 36px;
}

.header-subscribe .hatena-follow-button:hover {
  background-color: #fafafa;
  border-color: #0056b3;
  color: #0056b3;
}

.header-subscribe .hatena-follow-button:hover .foreground {
  color: #0056b3;
}

.header-subscribe .hatena-follow-button .unsubscribing {
  display: block;
}

.header-subscribe .hatena-follow-button .foreground {
  display: block;
  position: static;
  margin-top: 0;
  font-size: inherit;
  font-weight: 700;
  color: #1a1a1a;
}

.header-subscribe .subscription-count-box {
  display: none;
}

/* --- PC用レイアウト --- */
@media screen and (min-width: 768px) {
  .minimal-header {
    gap: 15px;
  }
  .header-logo { order: 1; }
  .header-nav { 
    order: 2; 
    margin-left: auto;
    gap: 20px;
  }
  .header-search { 
    order: 3; 
    width: 180px; 
  }
  .header-subscribe { order: 4; }
}

/* --- モバイル専用設定 --- */
@media screen and (max-width: 767px) {
  .entry-content {
    font-size: 15px;
    line-height: 1.85;
  }
  .tweet-style-content {
    font-size: 13px;
  }

  .entry-content p {
    margin-bottom: 1.1em;
  }

  .entry-content h2 {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.4;
    margin: 1.75em 0 0.6em;
  }

  .entry-content h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 1.4em 0 0.5em;
  }

  .entry-content h4 {
    margin: 1.25em 0 0.45em;
  }

  #top-editarea,
  .minimal-header {
    height: 65px;
  }

  .header-logo img {
    height: 34px;
  }

  .menu-toggle {
    display: flex;
    order: 4;
    flex-shrink: 0;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 40px;
    gap: 40px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  }

  .nav-open .header-nav {
    right: 0;
  }

  .nav-open .menu-toggle span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .header-link {
    font-size: 14px;
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
  }

  .header-search {
    order: 2;
    flex: 1;
    margin: 0 5px 0 10px;
    width: auto;
  }

  .header-search .search-form {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 0 4px 0 8px;
    box-sizing: border-box;
    min-height: 34px;
    height: 34px;
  }

  .header-search .search-module-input {
    flex-grow: 1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 0;
    height: 26px;
    line-height: 26px;
    margin-right: 6px;
    padding: 0 4px;
    font-size: 12px;
  }

  .header-search .search-module-button {
    flex-shrink: 0;
    margin-left: auto;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }

  #blog-title {
    padding-top: 80px; /* モバイルでもヘッダー(65px)下にチャンネル名が見えるように */
  }

  #blog-title-inner {
    padding-top: 0.5em;
  }

  #title {
    font-size: 22px;
  }

  .minimal-header {
    gap: 8px;
    padding: 0 10px;
  }

  .header-logo { 
    order: 1; 
    flex-shrink: 0; 
  }
  
  .header-search { 
    order: 2; 
    flex: 1;
    min-width: 0;
  }
  
  .header-subscribe { 
    order: 3; 
    flex-shrink: 0;
    margin-right: 10px;
  }
  
  .header-subscribe {
    min-height: 32px; /* CLS対策: モバイルでも枠を確保 */
  }

  .header-subscribe .hatena-follow-button {
    min-height: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    box-sizing: border-box;
  }
  
  .header-subscribe .hatena-follow-button .foreground {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    display: block;
    color: #1a1a1a;
  }
}

/* --- 6. フッター --- */
.notion-style-footer {
  max-width: 800px;
  margin: 56px auto 0 auto;
  padding: 28px 5px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-nav {
  font-size: 0.8em;
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  gap: 16px;
  line-height: 1.5;
}

.footer-nav a {
  color: #444;
  font-weight: 500;
  text-decoration: none;
  padding: 0 5px;
  transition: color 0.2s;
  white-space: nowrap;
}

.footer-nav a:hover {
  color: #0056b3;
}

.copyright {
  font-size: 0.8em;
  color: #555;
  text-align: center;
  width: 100%;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.copyright a {
  color: #555;
}

@media screen and (max-width: 767px) {
  .footer-nav {
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 10px;
  }

  .footer-nav a {
    font-size: 12px;
    letter-spacing: -0.02em;
  }

  .footer-nav .sep {
    font-size: 10px;
    letter-spacing: -0.02em;
  }

  .copyright {
    font-size: 10px;
    white-space: nowrap;
    letter-spacing: -0.03em;
    margin-bottom: 0;
  }
  
  .notion-style-footer {
    margin: 44px auto 0 auto;
    padding: 20px 5px 20px;
  }
}

/* --- レスポンシブ・サイドバー並び替え --- */
@media screen and (max-width: 767px) {
  #box2-inner {
    display: flex;
    flex-direction: column;
  }

  .hatena-module-search-box,
  .hatena-module-archive,
  .hatena-module-links,
  .hatena-module-entries-access-ranking,
  .hatena-module-html:last-of-type,
  .hatena-module-html:has(iframe[data-testid="embed-iframe"]) {
    display: none;
  }

  .hatena-module-related-entries {
    order: 1;
  }

  .hatena-module-category {
    order: 2;
    display: block;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hatena-module-html:has(.sidebar-follow-box) {
    order: 10;
    display: block;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 768px) {
  .hatena-module-html:nth-of-type(1) {
    display: none;
  }
}

/* --- その他 --- */
.entry-content a.keyword {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
  pointer-events: none;
  cursor: default;
}

.entry-thumb {
  transition: box-shadow 0.3s ease;
  border-radius: 6px;
  overflow: hidden;
}

.entry-thumb:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* --- 8. 広告・画像・記事リスト・パンくず・日付 --- */
@media (max-width: 768px) {
  .hatena-module-custom-ad-container {
    display: flex;
    text-align: center;
  }
}

.hatena-module-custom-ad-container {
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}

.hatena-module-custom-ad-container .hatena-module-body {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 300px;
  /* 正方形・矩形色々な楽天クリエイティブに対応（300/250 固定は実寸と不一致で歪みの原因） */
  min-height: 200px;
  background-color: #FAFAFA;
  border-radius: 5px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.hatena-module-custom-ad-container img {
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  vertical-align: bottom;
}

.hatena-module-custom-ad-container img[width="1"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* 楽天アフィ img: 実画像の縦横比を維持（300/250 固定は 1:1 バナー等で PageSpeed のアスペクト比警告の原因になる） */
.hatena-module-body a img[src*="afl.rakuten.co.jp"] {
  max-width: 300px;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.hatena-module-custom-ad-container .hatena-module-body:hover {
  transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
  .hatena-module-custom-ad-container .hatena-module-body {
    background-color: rgba(255,255,255,0.05);
  }
}

.ad-notice {
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 0;
  padding: 4px 10px;
  font-size: 11px;
  color: #555;
  background-color: #FAFAFA;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.entry-content > p:first-child,
.entry-content > div:first-child {
  margin-top: 5px;
}

@media (max-width: 480px) {
  .ad-notice {
    display: block;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .hatena-module-custom-ad-container {
    display: block; /* flexからblockに変更して横幅を確保 */
    text-align: left;
    width: 100%; /* 親要素いっぱいに広げる */
    box-sizing: border-box;
    padding: 0 15px; /* 下の線との余白感に合わせる */
  }
}

/* --- 画像の角丸 --- */
.entry-content img.hatena-fotolife {
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
}

/* --- ブログカード埋め込み（シンプルカードデザイン / 見本寄せ） --- */
/* NOTE: iframe版ブログカードは中身が別DOMのため、角丸/overflowを当てると
   iframe内の枠線が角で欠けて見えることがあります。
   ここは「iframe以外」に限定して装飾します。 */
.embed-card:not(iframe),
.embed-blogcard:not(iframe) {
  display: block;
  width: 100% !important;
  max-width: 520px;
  margin: 20px auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  padding: 0;
}

/* iframe 自体の余白・枠線をリセット */
.embed-card.embed-blogcard {
  display: block;
  width: 100% !important;
  max-width: 100%;
  padding: 0;
  border: none;
  height: auto !important;
  border-radius: 0 !important;   /* 角の欠け対策（中のカード側に任せる） */
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 埋め込みリンクの下に出る引用テキスト */
.hatena-citation {
  display: none !important;
}

.hatena-citation a {
  color: #6b7280;
  text-decoration: none;
}

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

/* --- 記事リスト --- */
.archive-date a {
  color: #444;
  text-decoration: none;
  font-weight: 500;
}

.archive-date a:hover {
  opacity: 0.7;
}

.page-archive .social-buttons,
.page-archive .archive-entry-tags-wrapper {
  display: none;
}

/* 記事一覧：タイトルと説明の間のタグの余白（タグをタイトル寄りに・説明との間を十分に） */
.entry .entry-categories,
.entry .entry-tags,
.entry .categories {
  margin-top: -5px !important;
  margin-bottom: 0px !important;
}
.entry .entry-content,
.entry .entry-body {
  margin-top: 0;
  padding-top: 0;
}

/* --- トップへ戻るボタン --- */
#page-top {
  display: none;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
}

#move-page-top {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #1a1a1a;
  background: #fff;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 1px solid #bbb;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  box-sizing: border-box;
}

#move-page-top:hover {
  opacity: 1;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 15, 15, 0.1);
  transform: translateY(-2px);
}

@media screen and (max-width: 768px) {
  #page-top {
    right: 16px;
    bottom: 16px;
  }
  #move-page-top {
    width: 44px;
    height: 44px;
    min-height: 44px;
    opacity: 0.7;
  }
  .share-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}

/* --- パンくずリスト --- */
.breadcrumb a:first-of-type::before {
  content: "\f017";
  font-family: "blogicon";
  margin-right: 0.5em;
  display: inline-block;
  vertical-align: middle;
  font-weight: normal;
}

.breadcrumb a:first-of-type ~ a::before,
.breadcrumb a:first-of-type ~ * a::before {
  display: none;
}

.breadcrumb span:last-child {
  display: inline-block;
  vertical-align: bottom;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#breadcrumb {
  margin-bottom: 0;
  padding-bottom: 8px;
  line-height: 1.5;
}

/* --- 日付・カテゴリー表示 --- */
.date.entry-date {
  font-size: 12px;
  color: #555;
  display: block;
  text-align: right;
  gap: 8px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  line-height: 1.5;
}

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

.date.entry-date svg.blogicon {
  display: none;
}

.date.entry-date > a {
  display: none;
}

.date.entry-date .date-last-updated {
  display: inline-block;
}

.date.entry-date .date-last-updated::before {
  content: "更新日：";
}

.date.entry-date:not(:has(.date-last-updated)) > a {
  display: inline;
}

.date.entry-date:not(:has(.date-last-updated)) > a::before {
  content: ""; /* 投稿日ラベルは非表示、日付のみ表示 */
}

.date-last-updated {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.date-last-updated svg.blogicon {
  width: 13px;
  height: 13px;
  fill: #555;
  vertical-align: middle;
}

.date-year, .date-month, .date-day, .hyphen {
  font-family: "SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace;
}

.entry-categories.categories,
.categories {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* --- 記事ヘッダーのレイアウト調整 --- */
.entry-header {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  padding-top: 0 !important;
  margin-top: 0px !important;
  margin-bottom: 14px !important;
}

.entry-categories {
  order: 1 !important;
  margin-top: 8px !important;
  margin-bottom: 0px !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}

.entry-title {
  order: 2 !important;
  margin: 0 0 0px 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
}

.entry-categories, .categories {
  order: 1 !important;
}

.date.entry-date {
  order: 3 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

/* --- モバイル：記事ページ専用設定 --- */
@media screen and (max-width: 767px) {
  .page-entry #title, 
  .page-entry #blog-description {
    display: none;
  }

  .page-entry .breadcrumb {
    display: block;
    visibility: visible;
    padding-top: 80px;
    padding-bottom: 5px;
    font-size: 12px;
  }

  .breadcrumb span:last-child {
    max-width: 23ch;
    font-size: 10px;
  }

  .page-entry #blog-title, 
  .page-entry #blog-title-inner {
    margin: 0;
    padding: 0;
    height: auto;
    min-height: 0;
  }

  .page-entry #content, 
  .page-entry #main, 
  .page-entry .entry-header {
    margin-top: 0;
    padding-top: 0;
  }

  .page-entry .entry-title {
    margin-top: 10px;
    line-height: 1.3;
    font-size: 22px;
  }

  .entry-header .date.entry-date,
  .entry-header .entry-categories a {
    font-size: 12px;
  }
}

@media screen and (min-width: 768px) {
  .breadcrumb span:last-child {
    max-width: 23ch;
    font-size: 13px;
  }

  .entry-header .date.entry-date,
  .entry-header .entry-categories a {
    font-size: 13px;
  }
}

@media screen and (max-width: 480px) {
  .page-entry .entry-title {
    font-size: 1.25rem;
    line-height: 1.4;
  }
}

/* --- 人気記事 --- */
.page-sidebar .hatena-module-entries-access-ranking .hatena-urllist > li {
  margin: 0 0 1.15rem;
  list-style: none;
}

.page-sidebar .hatena-module-entries-access-ranking .hatena-urllist > li:last-child {
  margin-bottom: 0;
}

/* サムネ＋テキストを Grid で整列（テキスト子要素は第2列に縦積み） */
.page-sidebar .hatena-module-entries-access-ranking .hatena-urllist li > a {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 6px;
  align-items: start;
  padding: 0;
  margin: 0;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
}

.page-sidebar .hatena-module-entries-access-ranking .hatena-urllist li > a:hover {
  color: #004a9c;
  border: none !important;
  background: none !important;
}

.page-sidebar .hatena-module-entries-access-ranking .hatena-urllist li > a > img {
  grid-column: 1;
  grid-row: 1 / -1;
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin: 0;
}

.page-sidebar .hatena-module-entries-access-ranking .hatena-urllist li > a > .urllist-image {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: start;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.page-sidebar .hatena-module-entries-access-ranking .hatena-urllist li > a > .urllist-image img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.page-sidebar .hatena-module-entries-access-ranking .hatena-urllist li > a > *:not(img):not(.urllist-image) {
  grid-column: 2;
  min-width: 0;
}

.page-sidebar .hatena-module-entries-access-ranking .entries-access-ranking-date-link,
.page-sidebar .hatena-module-entries-access-ranking .urllist-entry-body {
  align-self: start;
}

.entries-access-ranking-date-link {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.entries-access-ranking-date-link a {
  color: #5c5c5c;
  text-decoration: none;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.entries-access-ranking-date-link a:hover {
  color: #004a9c;
}

.page-sidebar .hatena-module-entries-access-ranking .urllist-title,
.page-sidebar .hatena-module-entries-access-ranking .urllist-title-link {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
  padding: 0;
}

.page-sidebar .hatena-module-entries-access-ranking .urllist-categories,
.page-sidebar .hatena-module-entries-access-ranking .entries-access-ranking-item-categories {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

/* 本文ラッパが1要素にまとまっているテーマ向け：内側の縦間隔 */
.page-sidebar .hatena-module-entries-access-ranking .urllist-entry-body,
.page-sidebar .hatena-module-entries-access-ranking .entries-access-ranking-item-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

/* 人気記事のカテゴリ：記事一覧の .entry-category-link と同デザイン（枠・白背景・先頭に「>」） */
.hatena-module-entries-access-ranking a.urllist-category-link,
.hatena-module-entries-access-ranking a.entries-access-ranking-category-link {
  display: inline-flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  color: #444;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 6px;
  margin: 0 2px 7px 0;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.hatena-module-entries-access-ranking a.urllist-category-link::before,
.hatena-module-entries-access-ranking a.entries-access-ranking-category-link::before {
  content: ">";
  margin-right: 3px;
  color: #555;
  font-size: 10px;
}

.hatena-module-entries-access-ranking a.urllist-category-link:hover,
.hatena-module-entries-access-ranking a.entries-access-ranking-category-link:hover {
  background-color: #fafafa;
  border-color: #0056b3;
  color: #0056b3;
  text-decoration: none;
}

/* 同上（クラスフルのチップのみ確実に上書き） */
a.urllist-category-link.entries-access-ranking-category-link {
  display: inline-flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  color: #444;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 6px;
  margin: 0 2px 7px 0;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

a.urllist-category-link.entries-access-ranking-category-link::before {
  content: ">";
  margin-right: 3px;
  color: #555;
  font-size: 10px;
}

a.urllist-category-link.entries-access-ranking-category-link:hover {
  background-color: #fafafa;
  border-color: #0056b3;
  color: #0056b3;
  text-decoration: none;
}

/* --- プロフィール（モバイル専用） --- */
.custom-profile-header {
  display: none;
}

@media screen and (max-width: 767px) {
  .custom-profile-header {
    order: 4;
    display: flex;
    align-items: center;
    margin: 0 0 15px 0;
    padding: 8px 0;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
  }
  
  .profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
  }
  
  .profile-text {
    font-size: 12px;
    line-height: 1.5;
    color: #1a1a1a;
  }
  
  .profile-name {
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.2;
    font-weight: bold;
    margin-bottom: 2px;
  }
  
  .profile-job {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: normal;
    margin-left: 4px;
  }
  
  .profile-desc {
    font-size: 12px;
    color: #444;
    margin-top: 2px;
    line-height: 1.5;
  }
}

@media screen and (min-width: 768px) {
  .custom-profile-header {
    display: none;
  }
  
  .profile-text {
    font-size: 13px;
    color: #1a1a1a;
  }
}

/* --- プロフィールポップアップ --- */
.profile-content-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.profile-content-wrapper:hover {
  transform: scale(1.02);
}

#profile-popup-logic {
  display: none;
}

.profile-popup-window {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

#profile-popup-logic:checked ~ .profile-popup-window {
  visibility: visible;
  opacity: 1;
}

.popup-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.popup-inner-box {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 100%;
  padding: 24px 20px 32px;
  border-radius: 20px 20px 0 0;
  text-align: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

#profile-popup-logic:checked ~ .profile-popup-window .popup-inner-box {
  transform: translateY(0);
}

.popup-title {
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 16px;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.popup-profile-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.popup-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.popup-profile-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0f0f0;
}

.popup-profile-name-section {
  text-align: left;
  flex: 1;
}

.popup-profile-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.popup-profile-job {
  font-size: 12px;
  color: #444;
}

.popup-profile-bio {
  text-align: left;
  font-size: 12px;
  line-height: 1.6;
  color: #444;
}

.sns-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sns-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sns-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sns-btn:active {
  transform: translateY(0);
}

.x-link { 
  background: #000; 
  color: #fff; 
}

.x-link:hover {
  background: #1a1a1a;
}

.threads-link { 
  background: linear-gradient(135deg, #000000 0%, #333333 100%);
  color: #fff;
  border: 1px solid #444;
}

.threads-link:hover {
  background: linear-gradient(135deg, #1a1a1a 0%, #404040 100%);
}

.pin-link { 
  background: #E60023; 
  color: #fff; 
}

.pin-link:hover {
  background: #ad081b;
}

.note-link { 
  background: #41C9B4; 
  color: #fff; 
}

.note-link:hover {
  background: #2db89f;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #555;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: #FAFAFA;
  color: #1a1a1a;
}

@media (max-width: 480px) {
  .popup-inner-box {
    padding: 20px 18px 28px;
  }
  
  .popup-title {
    font-size: 14px;
    margin-bottom: 14px;
  }
  
  .popup-profile-img {
    width: 44px;
    height: 44px;
  }
  
  .popup-profile-name {
    font-size: 13px;
  }
  
  .popup-profile-job {
    font-size: 11px;
  }
  
  .popup-profile-bio {
    font-size: 11px;
  }
  
  .sns-btn {
    padding: 9px 14px;
    font-size: 12px;
  }
}

@media (min-width: 481px) {
  .popup-inner-box {
    max-width: 420px;
    margin: 0 auto 0;
    border-radius: 20px 20px 0 0;
  }
}

/* 全体のはみ出し防止（横揺れ対策） */
#ins-ads-toc, .ad-notice {
    box-sizing: border-box !important; /* 余白を幅の中に含める計算にする */
    max-width: 100% !important;        /* 親要素からはみ出さない */
}

/* 目次上広告エリアの調整 */
#ins-ads-toc {
    margin: 30px auto;
    padding: 0 10px;                   /* 左右にわずかな遊びを作る */
    text-align: center;
    overflow: hidden;                  /* 万が一広告がはみ出しても隠す */
    /* CLS対策: 広告読み込み前に枠の高さを確保 */
    min-height: 250px;
    aspect-ratio: 300 / 250;
    display: block;
}

/* PR表記のモバイル最適化 */
@media (max-width: 480px) {
    .ad-notice {
        display: block !important;     /* 横幅いっぱいのブロック要素にする */
        width: auto !important;        /* 幅指定を解除 */
        margin: 10px 15px !important;  /* 左右に少しマージンを設ける */
        text-align: center;
        word-break: break-all;         /* 文字の改行を強制する */
    }
}

/* モバイルでの広告の高さを制限する */
@media (max-width: 480px) {
    #ins-ads-toc {
        min-height: 250px; /* CLS対策: 読み込み前から高さ確保 */
        max-height: 320px; /* 広告の高さを最大320pxまでに制限 */
        overflow: hidden;   /* はみ出た分を隠す */
        aspect-ratio: 300 / 250;
    }
}

/* --- サイドバー広告の最適化（!important最小限版） --- */

/* 1. PC/スマホ共通の基本スタイル */
.my-sidebar-ad {
    margin: 30px 0;
    text-align: center;
}

/* 2. 「SPONSORED」の文字デザイン */
.my-sidebar-ad p {
    font-size: 10px;
    color: #ccc;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-family: inherit; /* ブログのフォントに合わせる */
}

/* 3. 広告本体のサイズ調整 */
.my-sidebar-ad .adsbygoogle {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    min-height: 100px; /* CLS対策: 広告読み込み前の枠確保（ユニットに応じて調整可） */
}

/* 4. モバイル（スマホ）環境での表示復活と調整 */
@media screen and (max-width: 767px) {
    /* 以前の display: none を上書きして表示させる */
    .hatena-module.my-sidebar-ad {
        display: block !important; /* ※ここだけは「非表示設定」に勝つために必要です */
        margin: 40px 15px;
        padding: 20px 0;
        border-top: 1px solid #f0f0f0;
        border-bottom: 1px solid #f0f0f0;
    }
}

/* プロフィールアイコンのアスペクト比エラーを強制排除 */
img[src*="profile.png"] {
    width: 20px !important;
    height: auto !important; /* HTMLのheight="20"を無効化 */
    aspect-ratio: 56 / 64 !important; /* 本来の比率をブラウザに認識させる */
    object-fit: contain !important;
}

/* PSI対策：20x20と書かれた全てのアイコンの歪みを直す */
img[width="20"][height="20"] {
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
}

/* サイドバーのカスタムプロフィールの画像も保護 */
.design-profile_icon img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 72 / 48 !important; /* HTMLの数値に合わせる */
    object-fit: cover !important;
}

/* 1. 追従ボタン：変形・影だけ抑える（枠・色のホバー transition は残す） */
.hatena-follow-button,
.hatena-follow-button:hover,
.hatena-follow-button-box:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* 2. サイドバーの「読者になる」：ヘッダーと同型（太字・ホバーで青枠） */
.custom-subscribe-box {
  margin: 12px 0 10px 4px;
  display: flex;
  align-items: center;
}

/* サイドバー：リンク版 hatena-follow-button（ヘッダーと揃える） */
.page-sidebar .custom-subscribe-box .hatena-follow-button,
#box2 .custom-subscribe-box .hatena-follow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border: 1px solid #757575;
  color: #1a1a1a;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
  min-height: 36px;
}

.page-sidebar .custom-subscribe-box .hatena-follow-button:hover,
#box2 .custom-subscribe-box .hatena-follow-button:hover {
  background-color: #fafafa;
  border-color: #0056b3;
  color: #0056b3;
}

.page-sidebar .custom-subscribe-box .hatena-follow-button .foreground,
#box2 .custom-subscribe-box .hatena-follow-button .foreground {
  font-size: inherit;
  font-weight: 700;
  color: inherit;
}

.page-sidebar .custom-subscribe-box .hatena-follow-button:hover .foreground,
#box2 .custom-subscribe-box .hatena-follow-button:hover .foreground {
  color: #0056b3;
}

/* 3. サイドバーのiframeのサイズ感を調整（ヘッダーには影響しません） */
.custom-subscribe-box iframe {
    /* 目立ちすぎないよう、わずかに小さく、トーンを馴染ませる */
    transform: scale(0.95);
    transform-origin: left center;
    opacity: 0.9;
}

/* 4. .design-subscribe-button：ホバーはヘッダーと同じ青枠（inherit 封印をやめる） */
.design-subscribe-button {
  transform: none !important;
}

.design-subscribe-button:hover {
  transform: none !important;
  background-color: #fafafa !important;
  border-color: #0056b3 !important;
  color: #0056b3 !important;
}

.header-subscribe-button {
  display: inline-block;
  padding: 6px 16px;
  background-color: transparent;
  color: #2f81d5;
  text-decoration: none;
  border: 1px solid #bbb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.header-subscribe-button:hover {
  background-color: #FAFAFA;
  border-color: #0056b3;
  color: #0056b3;
}

/* モバイルビュー */
@media (max-width: 768px) {
  .header-subscribe-button {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 8px;
  }
}

/* さらに小さい画面 */
@media (max-width: 480px) {
  .header-subscribe-button {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 8px;
  }
}

/* ページ全体の横揺れを根本から止める */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ヘッダーナビゲーションの調整（モバイル） */
@media screen and (max-width: 767px) {
    .header-nav {
        /* width: 280px だったものを画面内に収めるための調整 */
        max-width: 80%; 
    }
}

/* タイムライン風：親しみやすいつぶやき */
.tweet-style {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 2em 0;
}

/* アイコン画像 */
.tweet-style-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* 吹き出し部分 */
.tweet-style-bubble {
  position: relative;
  background: #FAFAFA;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  color: #1a1a1a;
  line-height: 1.7;
}

/* 吹き出しのしっぽ（左側の三角） */
.tweet-style-bubble::before {
  content: "";
  position: absolute;
  top: 15px;
  left: -8px;
  border-style: solid;
  border-width: 8px 8px 8px 0;
  border-color: transparent #FAFAFA transparent transparent;
}

/* Markdown用の中身（本文より2px小さく） */
.tweet-style-content {
    margin: 0;
    font-size: 15px;
}

/* シェアボタンを円形アイコンに変更 */
.social-buttons {
  display: flex;
  gap: 12px;
  margin: 22px 0;
  align-items: center;
}

/* 既存のシェアボタンを非表示 */
.hatena-module-social .hatena-social-buttons {
  display: none;
}

/* カスタムシェアボタンのスタイル */
.share-button {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.8s;
  color: white;
  font-size: 20px;
  box-sizing: border-box;
}

.share-button:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

/* 各SNSの背景色 */
.share-x {
  background-color: #000000;
}

.share-facebook {
  background-color: #1877f2;
}

.share-pocket {
  background-color: #ef4056;
}

.share-hatena {
  background-color: #00a4de;
}

.share-pinterest {
  background-color: #e60023;
}

.share-line {
  background-color: #00b900;
}

/* コピーボタン */
.copy-button {
  background-color: #FAFAFA;
  color: #444;
}


@media screen and (max-width: 767px) {
    .hatena-module-custom-note {
        padding-left: 15px;
        padding-right: 15px;
    }
}

.header-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0 12px;
  transition: color 0.3s;
  color: #1a1a1a;
}

@media (max-width: 768px) {
  .header-link {
    font-size: 12px;
    padding: 0 8px;
  }
}

.entry {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* ==============================
  はてな埋め込み（カード全体を大きく）
  末尾に置いて「後勝ち」で上書き
============================== */
.embed-wrapper {
  max-width: 820px !important;   /* カード全体の最大横幅（好みで調整） */
  width: 100% !important;
  margin: 24px auto !important;  /* 上下の余白＋中央寄せ */
}

.embed-wrapper-inner {
  padding: 18px 18px !important; /* カード内余白 */
  font-size: 16px !important;    /* ベース文字サイズを底上げ */
}

/* タイトル・本文の文字を少し大きく */
.embed-wrapper .entry-title {
  font-size: 1.15em !important;
  line-height: 1.35 !important;
}

.embed-wrapper .entry-content {
  font-size: 1.05em !important;
  line-height: 1.8 !important;
}

/* サムネ付きのとき：サムネも一回り大きく */
.embed-wrapper .embed-content.with-thumb .thumb-wrapper {
  width: 140px !important;       /* 120〜160px程度で調整 */
  flex: 0 0 140px !important;
}

.embed-wrapper .embed-content.with-thumb .thumb {
  width: 140px !important;
  height: 140px !important;
  object-fit: cover !important;
}

/* ==============================
  はてな埋め込み（iframe版 blogcard）
  iframe自体のサイズのみ外側CSSで変更可能
============================== */
iframe.embed-card.embed-blogcard {
  max-width: 560px !important; /* 横幅をもう少し小さく */
  width: 86% !important;       /* 「横幅いっぱい」を避ける（SPでも効く） */
  height: 190px !important;    /* 内容が切れるなら少し上げる */
  margin: 16px 0 !important;   /* 左寄せ */
  display: block !important;
  border: 0 !important;        /* 変な線（枠線）対策 */
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  vertical-align: top !important; /* 下にできる隙間（線に見える）対策 */
  border-radius: 0 !important;    /* 角が欠けるのを防ぐ */
  overflow: visible !important;
}

/* 直後の引用（ドメイン表示）も揃える */
.hatena-citation {
  display: block;
  max-width: 560px;
  margin: 6px 0 16px;          /* 左寄せ */
}

/* ==============================
  アクセシビリティ（後勝ち）: ヘッダー内コントラスト
  はてな標準の .hatena-follow-button（グレー地×薄字）を強制上書き
============================== */
#top-editarea {
  color: #121212 !important;
}

#top-editarea .minimal-header .header-link {
  color: #121212 !important;
}

#top-editarea .minimal-header .header-link:hover {
  color: #0b57d0 !important;
}

#top-editarea .header-search .search-module-input {
  color: #121212 !important;
}

#top-editarea .header-search .search-module-input::placeholder {
  color: #595959 !important;
  opacity: 1 !important;
}

#top-editarea .header-search .search-module-button {
  color: #595959 !important;
}

/* 読者になる: 背景グラデ・薄色文字・text-fill を無効化 */
#top-editarea .hatena-follow-button-box .hatena-follow-button,
#top-editarea a.hatena-follow-button {
  background-color: #ffffff !important;
  background-image: none !important;
  color: #121212 !important;
  border: 1px solid #616161 !important;
  -webkit-text-fill-color: #121212 !important;
  text-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
}

#top-editarea .hatena-follow-button .foreground,
#top-editarea a.hatena-follow-button .foreground {
  color: #121212 !important;
  -webkit-text-fill-color: #121212 !important;
  opacity: 1 !important;
}

#top-editarea .hatena-follow-button .subscribing,
#top-editarea .hatena-follow-button .unsubscribing {
  color: #121212 !important;
  -webkit-text-fill-color: #121212 !important;
}

/* コントラスト継続対策: 半透明ヘッダー＋blur が背景と合成され監査に引っかかる場合があるため不透明に */
#top-editarea.is-scrolled {
  background-color: #ffffff !important;
  backdrop-filter: none !important;
}

/* .header-link 以外のナビ（クラス無し a 等）もヘッダー内は濃色に統一（ロゴリンクは除く） */
#top-editarea .minimal-header a:not(.hatena-follow-button):not(.header-logo a) {
  color: #121212 !important;
  -webkit-text-fill-color: #121212 !important;
}

#top-editarea .header-nav a,
#top-editarea .header-nav a:visited {
  color: #121212 !important;
  -webkit-text-fill-color: #121212 !important;
}

/* 読者になる: 親まで含めて上書き（.header-subscribe 配下・span.foreground 単体） */
#top-editarea .header-subscribe,
#top-editarea .header-subscribe .hatena-follow-button-box {
  --follow-button-color: #121212 !important;
  --follow-button-background-color: #ffffff !important;
}

#top-editarea .header-subscribe .hatena-follow-button,
#top-editarea .header-subscribe a.hatena-follow-button,
#top-editarea a.hatena-follow-button:link,
#top-editarea a.hatena-follow-button:visited {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #121212 !important;
  border-color: #616161 !important;
  -webkit-text-fill-color: #121212 !important;
}

#top-editarea span.foreground,
#top-editarea .hatena-follow-button-box span.foreground,
#top-editarea .header-subscribe span.foreground {
  color: #121212 !important;
  -webkit-text-fill-color: #121212 !important;
  caret-color: #121212 !important;
  font-weight: 700 !important;
}

/* ヘッダー「読者になる」ホバー：サイドバーと同様に青枠・青文字（上の !important 枠色を上書き） */
#top-editarea .header-subscribe .hatena-follow-button:hover,
#top-editarea .header-subscribe a.hatena-follow-button:hover {
  border-color: #0056b3 !important;
  color: #0056b3 !important;
  background-color: #fafafa !important;
  -webkit-text-fill-color: #0056b3 !important;
}

#top-editarea .header-subscribe .hatena-follow-button:hover .foreground,
#top-editarea .header-subscribe a.hatena-follow-button:hover .foreground {
  color: #0056b3 !important;
  -webkit-text-fill-color: #0056b3 !important;
}

/* mix-blend-mode 等で文字色が薄く見える場合の保険 */
#top-editarea .hatena-follow-button,
#top-editarea .hatena-follow-button * {
  mix-blend-mode: normal !important;
}

