/*
================================================================
AdabanaKerenmi　showy prove abortive CSS Version2.2
================================================================
*/

/* ---------------------------------------------------------
   1. デザインシステム（変数定義）
   --------------------------------------------------------- */
:root {
    --bg-color: #ffffff;             /* 全体の背景色：本の内紙のような極めて淡い薄墨色 */
    --entry-bg: #ffffff;             /* 記事ボックスの背景：純白 */
    --text-color: #2b2b2b;           /* 主な文字色：深い墨色 */
    --text-muted: #5a5a5a;           /* 控えめな文字色：霧雨のような灰色 */
    --accent-color: #8c2d19;         /* アクセントカラー：徒花を思わせる深紅 */
    --border-color: #e5e5e5;         /* 境界線の色：静かな薄灰色 */
    --main-font: ten-mincho, serif;  /* メインフォント：美しい貂明朝 */
}

/* ---------------------------------------------------------
   2. リセット & 全体・フォント設定
   --------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--main-font);
    font-size: 18px;
    line-height: 1.8;
    letter-spacing: 0.03em;
    word-wrap: break-word;
}

/* リンク共通設定 */
a {
    color: var(--text-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    opacity: 0.8;
}

/* はてな自動キーワードリンク無効化 */
a.keyword {
    border: 0 !important;
    text-decoration: none !important;
    pointer-events: none !important;
    cursor: default;
    color: inherit;
}

/* ---------------------------------------------------------
   3. ヘッダー（ブログタイトル & ひとこと説明）
   --------------------------------------------------------- */
#blog-title {
    max-width: 1100px;
    margin: 4rem auto 2rem;
    padding: 0 1.5rem;
    text-align: left;
}

#title {
    font-size: 2.2rem;
    font-weight: 400;             /* 700 から 400 に変更（ブログタイトルの太字を解除） */
    letter-spacing: 0.1em;
}

#title a {
    text-decoration: none;
}

#blog-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

/* ---------------------------------------------------------
   4. 全体レイアウト（サイドバー左寄せ & 白ボックス装丁 & 縮みバグ対策）
   --------------------------------------------------------- */
#content {
    max-width: 1100px;
    width: 100%;                 /* どんな時も横幅を最大まで広げる */
    margin: 0 auto;
    padding: 0 1.5rem;
}

#content-inner {
    display: flex;
    flex-direction: row-reverse; /* サイドバーを左、メインを右 */
    gap: 3.5rem;
    width: 100%;                 /* 親の幅いっぱいに広げる */
}

/* はてなブログ特有の wrapper 要素
   記事が短くても、この見えない大元の袋を横いっぱいに固定して縮みを防ぎます。
*/
#wrapper {
    flex: 1;
    min-width: 0;
    width: 100%;
}

#main {
    width: 100%;                 /* 記事が短くても、残りのスペースを100%埋める */
}

/* 記事全体を囲む純白のボックス（マスターの理想のレイアウト） */
.entry {
    background-color: var(--entry-bg);
    border: 1px solid var(--border-color);
    padding: 3rem;               /* ボックス内の贅沢な余白 */
    margin-bottom: 3rem;         /* ボックス同士の間隔 */
    width: 100%;                 /* 記事本文が極端に短くても、白枠の横幅を100%に保つ */
    display: block;              /* 確実にブロック要素として広げる */
    position: relative;          /* 編集ボタンの絶対位置決定の基準点にします */
}

#box2 {
    width: 280px;                /* サイドバーの幅をスマートに固定 */
    flex-shrink: 0;              /* メインに押されて縮まないようにロック */
    margin-top: 1rem;
}

/* ---------------------------------------------------------
   5. 記事（タイトル・日付・装飾・非表示設定）
   --------------------------------------------------------- */
/* 日付：下線や境界線を完全になくし、静かで美しいグレー「#828383」に染める */
.date {
    font-size: 0.9rem;
    color: #828383 !important;   /* 指定色の美しいグレーに変更 */
    margin-bottom: 1rem;
    border: none !important;     /* 日付の下線を消去 */
}

.date a {
    color: #828383 !important;   /* 日付リンクの文字色も統一 */
    text-decoration: none !important; /* 日付リンクの下線も消去 */
    border: none !important;
}

/* 記事タイトル：ボールド（太字）を解除し、貂明朝の細く美しいシルエットを際立たせる */
.entry-title {
    margin-bottom: 2rem;
}

.entry-title a {
    font-size: 1.6rem;
    line-height: 1.4;
    text-decoration: none;
    font-weight: 400 !important; /* 太字なし（通常の太さ）に変更 */
}

/* 記事本文 */
.entry-content p {
    margin-bottom: 1.5rem;
}

/* 見出し2（H2）: 凛としたアクセントライン */
.entry-content h2 {
    font-size: 1.35rem;
    margin: 3.5rem 0 1.5rem;
    padding-left: 0.8rem;
    border-left: 3px solid var(--accent-color);
    line-height: 1.4;
    font-weight: 400;            /* 見出しも上品に太字を抑える */
}

/* 見出し3（H3） */
.entry-content h3 {
    font-size: 1.15rem;
    margin: 2.5rem 0 1.2rem;
    font-weight: 400;
}

/* 引用（blockquote） */
.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.2rem 1.5rem;
    border-left: 2px solid var(--border-color);
    color: var(--text-muted);
    background-color: #fafafa;
    font-style: italic;
}

/* カテゴリーラベル */
.categories a {
    font-size: 0.8rem;
    text-decoration: none;
    background-color: #f0f0f0;
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    margin-right: 0.5rem;
}

.categories a:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* はてなブログタグ */
.entry-tag-link {
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--text-muted);
    background: #f7f7f7;
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    margin-right: 0.3rem;
}

/* ---------------------------------------------------------
   6. 編集リンク（ボタン状にして右上・日付の右端に完全配置）
   --------------------------------------------------------- */
/* 以前のマスターの設定を活かし、公式のメニューラッパー (.entry-header-menu) を絶対配置します。
   .entry の padding-top/right (3rem) と位置を同期させ、右上端に綺麗に並べます。
*/
.entry-header-menu {
    position: absolute !important;
    top: 3rem !important;        /* 上からの距離を白ボックスの余白と統一 */
    right: 3rem !important;      /* 右からの距離を白ボックスの余白と統一 */
    z-index: 10;                 /* 他の要素に埋もれないように前面へ */
}

/* 編集ボタン自体の美しい装丁 */
.editor-menu-member-link,
a.editor-menu-member-link {
    display: inline-block !important;
    font-size: 0.8rem;
    text-decoration: none !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-color) !important;
    background-color: transparent;
    padding: 0.3rem 0.8rem !important;
    border-radius: 0px !important; /* 丸みをなくして和の直線に */
    line-height: 1.2 !important;
    transition: all 0.3s ease;
}

.editor-menu-member-link:hover,
a.editor-menu-member-link:hover {
    color: #ffffff !important;
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
}

/* 記事フッター（投稿者名・IDが表示されるエリア）の文字色を「#828383」に染める */
.entry-footer {
    display: block;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: #828383 !important;   /* 名前やIDの基本色を「#828383」に */
    font-size: 0.85rem;
}

.entry-footer a {
    color: #828383 !important;   /* リンク化されたIDや名前の色も統一 */
    text-decoration: none;
}

.entry-footer a:hover {
    color: var(--accent-color) !important; /* ホバー時はふんわりと徒花色に */
}

/* ---------------------------------------------------------
   7. コメント・不要要素の完全非表示（CSSによる鉄壁ガード）
   --------------------------------------------------------- */
/* 「コメントを書く」リンクやコメントエリアを徹底的に非表示 */
.comment-link,
a.comment-link,
.comment-box,
.leave-comment-title,
.comment-metadata {
    display: none !important;
}

/* ---------------------------------------------------------
   8. 記事下（ページャー）
   --------------------------------------------------------- */
/* ページャー（次の記事・前の記事） */
.pager {
    display: flex;
    justify-content: space-between;
    margin: 4rem 0;
    font-size: 0.9rem;
}

.pager a {
    text-decoration: none;
}

/* ---------------------------------------------------------
   9. サイドバー（モジュール・プロフィール等）
   --------------------------------------------------------- */
.hatena-module {
    margin-bottom: 3rem;
}

.hatena-module-title {
    font-size: 1rem;
    font-weight: 400;             /* 700 から 400 に変更（サイドバーのブログパーツ名太字解除） */
    letter-spacing: 0.1em;
    margin-bottom: 1.2rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.hatena-module ul {
    list-style: none;
}

.hatena-module li {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

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

/* プロフィールモジュール */
.profile-icon {
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.hatena-module-profile .profile-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---------------------------------------------------------
   10. 特殊ページ（About / Archive ページ）
   --------------------------------------------------------- */
/* About ページ */
.page-about .entry-content h3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Archive（アーカイブ）ページ */
.page-archive .archive-entry {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

/* ---------------------------------------------------------
   11. フッター（最下部リンク）
   --------------------------------------------------------- */
#footer {
    text-align: center;
    padding: 3rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

#footer a {
    color: var(--text-muted);
    text-decoration: none;
}

/* ---------------------------------------------------------
   12. レスポンシブ対応（スマホ画面調整）
   --------------------------------------------------------- */
@media (max-width: 768px) {
    #blog-title {
        margin: 2.5rem auto 1.5rem;
    }

    #title {
        font-size: 1.8rem;
    }

    /* スマホ時は記事ボックスの余白を少し抑える */
    .entry {
        padding: 1.8rem;
        margin-bottom: 2rem;
    }

    /* スマホ時：編集ボタン(ラッパー)の位置も余白(1.8rem)にぴったり合わせる */
    .entry-header-menu {
        top: 1.8rem !important;
        right: 1.8rem !important;
    }

    /* 縦並び：メイン記事が上、サイドバーが下 */
    #content-inner {
        flex-direction: column;
        gap: 2.5rem;
    }

    #box2 {
        width: 100%;
        margin-top: 3rem;
        border-top: 1px solid var(--border-color);
        padding-top: 2rem;
    }

    body {
        font-size: 17px;
    }

    .entry-title a {
        font-size: 1.4rem;
    }

    .pager {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}