/* ==========================================================================
   1. 画面全体のレイアウト・横幅
   ========================================================================== */
.md-grid {
    max-width: 90% !important;  
}
.md-sidebar--primary {
    width: 248px !important;
}
.md-sidebar--secondary {
    width: 248px !important;
}
.md-content {
    flex-grow: 1 !important;    
    max-width: none;            
}

/* ==========================================================================
   2. 全体のフォントサイズ・行間・余白の完全統一
   ========================================================================== */
/* サイドバー（左右一括）のフォントサイズ */
.md-nav {
    font-size: 0.64rem !important;
}

/* 通常本文・リスト・ブロック・引用のフォントサイズを一括指定 */
.md-typeset p,
.md-typeset ul,
.md-typeset ol,
.md-typeset .admonition, 
.md-typeset .admonition-block,
.md-typeset blockquote {
    font-size: 0.64rem !important;
}

.md-typeset pre,
.md-typeset pre code,
.md-typeset code {
    font-size: 0.55rem !important;
    line-height: 1.15rem !important;
}

.md-typeset li {
    line-height: 1.15rem !important;
}

/* * 💡【最重要】あらゆるテキスト要素の行間（1.15rem）と上下マージン（ゼロ）を完全同期
 * これにより、ブロック内外、通常テキスト、引用（blockquote）のすべての高さがミリ単位で一致します
 */
.md-typeset p,
.md-typeset blockquote,
.md-typeset blockquote p,
.md-typeset .admonition p,
.md-typeset .admonition blockquote,
.md-typeset .admonition blockquote p,
.md-typeset .admonition-block p,
.md-typeset .admonition-block blockquote,
.md-typeset .admonition-block blockquote p {
    line-height: 1.15rem !important;
    margin-top: 0rem !important;
    margin-bottom: 0rem !important;
}

/* 通常の地の文（段落）が外側で連続する場合のみ、段落間に薄く隙間を空けて読みやすくする */
.md-typeset p + p {
    margin-top: 0.2rem !important;
}

/* ==========================================================================
   3. 見出し（h1, h2）のスケール感
   ========================================================================== */
.md-typeset h1 {
    color: #1c1c1c !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    margin-top: 0.0rem !important;
    margin-bottom: 0.1rem !important;
}
.md-typeset h2 {
    color: #333333 !important;
    font-size: 1.0rem !important;
    font-weight: 400 !important;
    border-bottom: 1px solid rgba(64, 64, 64, 0.7);
    padding-left: 0.5rem;
    border-left: 5px solid rgba(64, 64, 64, 0.7);
    margin-top: 1.0rem !important;
    margin-bottom: 0.5rem !important;
}
.md-typeset h2.tw {
    border-bottom-color: rgba(0, 122, 255, 0.35) !important;
    border-left-color: rgba(0, 122, 255, 0.8) !important;
}
.md-typeset h2.dungeon {
    color: #2b1111 !important;
    border-bottom-color: rgba(139, 0, 0, 0.35) !important;
    border-left-color: rgba(200, 30, 30, 0.8) !important;
}
.md-typeset h3 {
    font-size: 0.82rem !important;
    font-weight: 400 !important;
    width: 98%;
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
    margin-top: 1.0rem !important;
    margin-bottom: 0.2rem !important;
}
.md-typeset h3.tw {
    border-bottom-color: rgba(0, 122, 255, 0.35) !important;
}
.md-typeset h3.dungeon {
    color: #2b1111 !important;
    border-bottom-color: rgba(139, 0, 0, 0.35) !important;
}
.md-typeset h4 {
    font-size: 0.7rem !important;
    font-weight: 450 !important;

    border-bottom: 1px solid !important;
    padding-bottom: 2px !important;
    border-image: linear-gradient(to right, #555555 0%, rgba(85, 85, 85, 0) 70%) 1;
    display: table !important;
    padding-right: 5.0rem !important;
    margin-bottom: 0.2rem !important;
}

.md-typeset h4.t {
    color: #34495e !important;
    border-image: linear-gradient(to right, #007aff 0%, rgba(0, 122, 255, 0) 70%) 1 !important;
}
.md-typeset h4.tip::before {
    content: "📄";
}
.md-typeset h4.int::before {
    content: "▷";
}
.md-typeset h4.item {
    color: #4a284f !important;
    border-image: linear-gradient(to right, #9400d3 0%, rgba(148, 0, 211, 0) 85%) 1
}
.md-typeset h4.boss {
    border-bottom: none !important;
    border-image: none !important;
    padding-right: 0 !important;

    color: #e6a100 !important; 
    font-weight: 700 !important;
}
.md-typeset h4.boss::before {
    content: "💀 ";
}
.md-typeset h4.move {
    border-bottom: none !important;
    border-image: none !important;
    padding-right: 0 !important;
}
.md-typeset h4.move::before {
    content: "▷ ";
}

/* --- 次へボタン（コンパクトなブロックタイプ・中央寄せ） --- */
.md-typeset a.next-btn {
    display: table !important; /* 💡inline-block から table に変更（中央寄せしやすくなります） */
    margin: 1.5rem auto 0 auto !important; /* 💡左右の余白を auto にすることで、自動で画面の真ん中に配置されます */

    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #333333 !important;
    background-color: #f5f5f5 !important; 
    border-radius: 3px;
    border-left: 2px solid #555555 !important;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    
    text-align: center; /* 💡念のため文字も中央に */
}

/* ホバー時の演出（ここはそのままです） */
.md-typeset a.next-btn:hover {
    background-color: #e6f2ff !important; 
    border-left-color: #007aff !important; 
    color: #007aff !important;
}

/* ==========================================================================
   5. 特殊要素（blockquote / コメント）
   ========================================================================== */
/* 引用（ブロック内、および通常の地の文でのセリフ・アーカイブテキスト演出） */
.md-typeset blockquote {
    color: #8f8f8f !important;
    font-weight: 300 !important;
    background: transparent !important;
    border-left: none !important;

    /* 💡 箱自体が持っている標準の padding（内側余白）を完全に殺して通常のpと高さを揃える */
    padding: 0 !important;
    
    /* 前後の要素との微細な距離調整 */
    margin-top: 0rem !important;   
    margin-bottom: 0.1rem !important;
}

/* 独自カスタム：コメント */
.comment {
    color: #5f8f63;
    font-weight: 400 !important;
    display: inline-block;
    line-height: 1.15rem !important;
    margin-top: 0.0rem !important;
    padding-bottom: 0.0rem !important;
}