/* style.css 全体コード */

/* --- 基本設定 --- */
:root {
    /* === Desert/Wasteland Theme (Compact) === */
    --color-background: #f4eadc;
    --color-text: #3e352e;
    --color-heading: #5c4d3e;
    --color-border: #9c8a78;
    --color-accent: #c89f76;
    --color-accent-rgb: 200, 159, 118;
    --color-link: #816549;
    --color-link-hover: #6b5a48;
    --color-footer-link: #5c4d3e;
    --color-footer-link-hover: #3e352e;
    --color-side-menu-link-text: #3e352e;
    --color-header-bg: #4a3f35;
    --color-footer-bg: #f5f0e6;
    --color-sidebar-bg: #efe8d8;
    --color-main-bg: #ffffff;
    --color-ad-placeholder: #e0d6c6;
    --color-side-link-bg: #f5f0e6;
    --color-side-link-hover-bg: #e9e1d3;
    /* --- ページトップボタン色 --- */
    --color-pagetop-bg-new: #b8a99a;
    --color-pagetop-hover-bg-new: #a99c8d;
    --color-pagetop-icon-new: #ffffff;
    /* --- 目次用背景色 --- */
    --color-toc-bg: #fbf7f2;
    --color-toc-border-light: #eae4dd;
    /* ============================ */

    /* --- Layout --- */
    --sidebar-width: 300px;
    --header-height: 45px;
    --main-content-max-width: 3600px;

    --main-inner-padding-x: 30px;
    /* スマホ用の左右パディングに合わせて値を設定してください */
    --main-inner-padding-x-sp: 15px;

    /* --- Right Side Menu Widths --- */
    --right-sidebar-width-default: 220px;
    --right-sidebar-width-large: 300px;
    --right-sidebar-width-xlarge: 420px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- スティッキーフッター 基本構造 --- */
html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Kosugi Maru', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* 広告コンテナ */
.ad-center-simple_center {
    margin: 1rem auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
    /* シンプルな中央揃え */
    text-align: center;
    padding-right: 1rem;
}

.adcenter {
    text-align: center;
}

.responsive_001 {
    width: auto;
    height: 160px;
}

@media (max-width: 768px) {
    .ad-center-simple_center {
        margin: 1rem auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
        width: 100%;
        box-sizing: border-box;
        /* シンプルな中央揃え */
        text-align: center;
        padding-right: 0rem;
    }

    .adcenter {
        text-align: center;
    }

    .responsive_001 {
        width: auto;
        height: 160px;
    }

}


.page-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-top: var(--header-height);
}

.content-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.container {
    flex-grow: 1;
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.site-footer {
    flex-shrink: 0;
}

/* --- スティッキーフッター ここまで --- */

/* 基本リンクスタイル (本文記事以外に適用される可能性あり) */
a,
a:visited {
    color: rgb(11, 123, 199);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #4ca7ea;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    margin-top: 1.4em;
    margin-bottom: 0.7em;
    line-height: 1.3;
    font-weight: 600;
}

h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child {
    margin-top: 0;
}

/* Ensure h1 inside entry-content also has no top margin if it's the first element */
.entry-content>h1:first-child {
    margin-top: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* --- ヘッダー --- */
.header {
    background-color: var(--color-header-bg);
    /* ★ 荒野風テクスチャを追加 (サイドバーのものを調整、色を濃く) */
    background-image:
        /* Darkest, tiniest pinpricks */
        radial-gradient(circle at 5% 95%, rgba(200, 190, 180, 0.30) 0px, transparent 0.8px),
        radial-gradient(circle at 95% 5%, rgba(200, 190, 180, 0.29) 0px, transparent 1px),
        /* Medium dark, small specks */
        radial-gradient(circle at 35% 65%, rgba(180, 170, 160, 0.27) 0px, transparent 1.2px),
        radial-gradient(circle at 65% 35%, rgba(180, 170, 160, 0.26) 0px, transparent 1.5px),
        /* Lighter, slightly larger subtle spots */
        radial-gradient(circle at 50% 20%, rgba(160, 150, 140, 0.23) 0px, transparent 2.5px),
        radial-gradient(circle at 20% 50%, rgba(160, 150, 140, 0.22) 0px, transparent 3px),
        /* Sharp, fine multi-angle cracks */
        linear-gradient(165deg, transparent 49.8%, rgba(170, 160, 150, 0.25) 50%, transparent 50.2%),
        linear-gradient(15deg, transparent 49.7%, rgba(170, 160, 150, 0.24) 50%, transparent 50.3%),
        linear-gradient(120deg, transparent 49.9%, rgba(150, 140, 130, 0.23) 50%, transparent 50.1%),
        linear-gradient(60deg, transparent 49.8%, rgba(150, 140, 130, 0.22) 50%, transparent 50.2%),
        /* Ultra-fine base noise */
        linear-gradient(rgba(140, 130, 120, 0.23) 0.5px, transparent 0.5px),
        linear-gradient(90deg, rgba(140, 130, 120, 0.23) 0.5px, transparent 0.5px);
    background-size:
        12px 12px, 14px 14px,
        16px 16px, 18px 18px,
        22px 22px, 26px 26px,
        8px 8px, 10px 10px, 11px 11px, 13px 13px,
        0.8px 0.8px, 0.8px 0.8px;
    background-position:
        0 0, 7px 7px,
        3px 10px, 11px 3px,
        1px 15px, 15px 1px,
        2px 5px, 6px 1px, 9px 8px, 4px 11px,
        0 0, 0 0;
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(107, 90, 72, 0.1);
}

.header-inner {
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.site-title {
    margin: 0;
}

.site-title a {
    font-size: 1.6rem;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.site-title a:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* --- サイドバー (fixed) --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-sidebar-bg);
    /* Rough rock texture */
    background-image:
        /* Darkest, tiniest pinpricks */
        radial-gradient(circle at 5% 95%, rgba(45, 35, 25, 0.15) 0px, transparent 0.8px),
        radial-gradient(circle at 95% 5%, rgba(45, 35, 25, 0.14) 0px, transparent 1px),
        /* Medium dark, small specks */
        radial-gradient(circle at 35% 65%, rgba(65, 55, 45, 0.12) 0px, transparent 1.2px),
        radial-gradient(circle at 65% 35%, rgba(65, 55, 45, 0.11) 0px, transparent 1.5px),
        /* Lighter, slightly larger subtle spots */
        radial-gradient(circle at 50% 20%, rgba(90, 75, 60, 0.08) 0px, transparent 2.5px),
        radial-gradient(circle at 20% 50%, rgba(90, 75, 60, 0.07) 0px, transparent 3px),
        /* Sharp, fine multi-angle cracks */
        linear-gradient(165deg, transparent 49.8%, rgba(75, 62, 50, 0.1) 50%, transparent 50.2%),
        linear-gradient(15deg, transparent 49.7%, rgba(75, 62, 50, 0.09) 50%, transparent 50.3%),
        linear-gradient(120deg, transparent 49.9%, rgba(85, 70, 58, 0.08) 50%, transparent 50.1%),
        linear-gradient(60deg, transparent 49.8%, rgba(85, 70, 58, 0.07) 50%, transparent 50.2%),
        /* Ultra-fine base noise */
        linear-gradient(rgba(100, 85, 70, 0.08) 0.5px, transparent 0.5px),
        linear-gradient(90deg, rgba(100, 85, 70, 0.08) 0.5px, transparent 0.5px);
    background-size:
        12px 12px, 14px 14px,
        16px 16px, 18px 18px,
        22px 22px, 26px 26px,
        8px 8px, 10px 10px, 11px 11px, 13px 13px,
        0.8px 0.8px, 0.8px 0.8px;
    background-position:
        0 0, 7px 7px,
        3px 10px, 11px 3px,
        1px 15px, 15px 1px,
        2px 5px, 6px 1px, 9px 8px, 4px 11px,
        0 0, 0 0;
    border-right: 1px solid var(--color-border);
    position: fixed;
    left: 0;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 900;

    &::-webkit-scrollbar {
        width: 8px;
    }

    &::-webkit-scrollbar-track {
        background: var(--color-sidebar-bg);
    }

    &::-webkit-scrollbar-thumb {
        background-color: var(--color-border);
        border-radius: 4px;
    }

    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-sidebar-bg);
}

.sidebar-inner {
    padding: 15px;
    position: relative;
    min-height: 100%;
    padding-bottom: 15px;
}

.left-menu-section {
    margin-bottom: 12px;
}

.left-menu-section:last-child {
    margin-bottom: 0;
}

.left-menu1 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-heading);
    padding: 7px 0 4px 28px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--color-accent);
    position: relative;
    transition: background-color 0.2s ease, border-color 0.3s ease;
}



.left-menu1.collapsible-heading {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.3s ease;
}

/* 開閉アイコン (▼) */
.left-menu1.collapsible-heading::before {
    content: '\25BC';
    /* Replaced ▼ with CSS escape */
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    color: var(--color-accent);
    transition: transform 0.3s ease-out;
}

.left-menu-section.is-closed .left-menu1.collapsible-heading::before {
    content: '\25B6';
    /* Replaced ▶ with CSS escape */
    transform: translateY(-50%);
}

/* 閉じた状態の見出し */
.left-menu-section.is-closed .left-menu1 {
    border-bottom-color: var(--color-border);
}

/* --- 開閉対象要素のスタイルとアニメーション --- */

.left-menu-section>a,
.left-menu-section>.left-menu-subheading {
    display: block;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease-out 0.05s,
        margin-top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        margin-bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        padding-top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        padding-bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-width 0.1s ease-out;
    max-height: 50em;
    opacity: 1;
}

.left-menu-section.is-closed>a,
.left-menu-section.is-closed>.left-menu-subheading {
    max-height: 0;
    opacity: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top-width: 0 !important;
    border-bottom-width: 0 !important;
    pointer-events: none;
}

.left-menu-subheading {
    margin-bottom: 5px;
}

.left-menu-section>a {
    margin-bottom: 2px;
}

.left-menu2 {
    padding: 3px 15px;
    font-size: 0.84rem;
    background-color: var(--color-side-link-bg);
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--color-side-menu-link-text);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
    cursor: pointer;
    line-height: 1.5;
}

.left-menu-section>a:hover .left-menu2 {
    background-color: var(--color-side-link-hover-bg);
    font-weight: bold;
    border: 1px solid transparent;
    transform: translateX(2px);
}

.left-menu2.is-current {
    background-color: var(--color-accent);
    color: var(--color-pagetop-icon-new);
    font-weight: bold;
    border-color: var(--color-accent);
}

.left-menu-section>a:hover .left-menu2.is-current {
    color: var(--color-side-menu-link-text);
}

/* --- 左サイドメニュー サブ見出し --- */
.left-menu-subheading {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-heading);
    padding: 8px 0 2px 12px;
    margin-bottom: 5px;
    border-bottom: 1px dashed var(--color-border);
}

/* --- メインコンテンツ --- */
.main-content {
    background-color: var(--color-main-bg);
    /* margin-left is handled by media queries now */
    box-shadow: -2px 0 5px rgba(107, 90, 72, 0.07);
    /* Change border color to a subdued brown */
    border-bottom: 2px solid var(--color-heading);
    flex-grow: 1;
    /* Ensure it takes available space */
    display: flex;
    flex-direction: column;
}

.main-content-inner {
    max-width: var(--main-content-max-width);
    margin-right: auto;
    margin-left: 0;
    padding: 30px;
    position: relative;
    width: 100%;
    /* ★ これ追加 */
}


.main-content-inner section {
    margin-bottom: 30px;
}

/* --- 見出しスタイル調整 --- */
.main-content-inner h2 {
    font-size: 1.7rem;
    color: var(--color-heading);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.main-content-inner h3 {
    font-size: 1.35rem;
    color: var(--color-heading);
    border-left: 5px solid var(--color-accent);
    border-bottom: 1px solid var(--color-border);
    padding-left: 10px;
    padding-bottom: 5px;
    margin-top: 2em;
    margin-bottom: 1em;
}

.main-content-inner h4 {
    font-size: 1.15rem;
    color: var(--color-heading);
    font-weight: 700;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
}

/* --- ここまで見出し調整 --- */

.main-content-inner p {
    margin-bottom: 0.9em;
    font-size: 1rem;
    color: var(--color-text);
}

.main-content-inner article {
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.main-content-inner article:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.main-content-inner>article a:not(.table_of_contents a):not(.article-navigation a):not(.map-container a) {
    color: #0b7bc7;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.main-content-inner>article a:not(.table_of_contents a):not(.article-navigation a):not(.map-container a):hover {
    color: #4ca7ea;
    text-decoration: underline;
    text-decoration-color: #4ca7ea;
}

/* ゲームリスト */
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.game-item {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--color-sidebar-bg);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.game-item:hover {
    box-shadow: 0 5px 15px rgba(107, 90, 72, 0.1);
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

.game-item a {
    display: block;
    text-decoration: none;
    color: var(--color-text);
}

.game-item a:hover {
    color: var(--color-text);
}


.game-item img {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    border-radius: 6px;
    border-top: 2px solid var(--color-border, #9c8a78);
    border-bottom: 2px solid var(--color-border, #9c8a78);
    border-left: 1px solid var(--color-border, #9c8a78);
    border-right: 1px solid var(--color-border, #9c8a78);
    overflow: hidden;
}

.game-item:hover img {
    opacity: 1;
}

.game-item p {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    color: var(--color-heading);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- 広告枠 --- */
.sidebar-ad-space,
.main-content-inner .main-ad-space {
    background-color: var(--color-ad-placeholder);
    border: 1px dashed var(--color-border);
    padding: 15px;
    text-align: center;
    color: #8b7e70;
    margin: 20px 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.sidebar-ad-space {
    margin-top: 25px;
}

/* --- ページトップへ戻るボタン --- */
#page-top-btn {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    background-color: var(--color-pagetop-bg-new);
    /* Sidebar texture */
    background-image:
        radial-gradient(circle at 5% 95%, rgba(45, 35, 25, 0.15) 0px, transparent 0.8px),
        radial-gradient(circle at 95% 5%, rgba(45, 35, 25, 0.14) 0px, transparent 1px),
        radial-gradient(circle at 35% 65%, rgba(65, 55, 45, 0.12) 0px, transparent 1.2px),
        radial-gradient(circle at 65% 35%, rgba(65, 55, 45, 0.11) 0px, transparent 1.5px),
        radial-gradient(circle at 50% 20%, rgba(90, 75, 60, 0.08) 0px, transparent 2.5px),
        radial-gradient(circle at 20% 50%, rgba(90, 75, 60, 0.07) 0px, transparent 3px),
        linear-gradient(165deg, transparent 49.8%, rgba(75, 62, 50, 0.1) 50%, transparent 50.2%),
        linear-gradient(15deg, transparent 49.7%, rgba(75, 62, 50, 0.09) 50%, transparent 50.3%),
        linear-gradient(120deg, transparent 49.9%, rgba(85, 70, 58, 0.08) 50%, transparent 50.1%),
        linear-gradient(60deg, transparent 49.8%, rgba(85, 70, 58, 0.07) 50%, transparent 50.2%),
        linear-gradient(rgba(100, 85, 70, 0.08) 0.5px, transparent 0.5px),
        linear-gradient(90deg, rgba(100, 85, 70, 0.08) 0.5px, transparent 0.5px);
    background-size:
        12px 12px, 14px 14px, 16px 16px, 18px 18px, 22px 22px, 26px 26px,
        8px 8px, 10px 10px, 11px 11px, 13px 13px, 0.8px 0.8px, 0.8px 0.8px;
    background-position:
        0 0, 7px 7px, 3px 10px, 11px 3px, 1px 15px, 15px 1px,
        2px 5px, 6px 1px, 9px 8px, 4px 11px, 0 0, 0 0;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

#page-top-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-top: 3px solid var(--color-pagetop-icon-new);
    border-right: 3px solid var(--color-pagetop-icon-new);
    transform: translate(-50%, -55%) rotate(-45deg);
    transition: border-color 0.2s ease;
}

#page-top-btn:hover {
    background-color: var(--color-pagetop-hover-bg-new);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


/* --- フッター --- */
.site-footer {
    background-color: var(--color-footer-bg);
    /* Sidebar texture */
    background-image:
        radial-gradient(circle at 5% 95%, rgba(45, 35, 25, 0.15) 0px, transparent 0.8px),
        radial-gradient(circle at 95% 5%, rgba(45, 35, 25, 0.14) 0px, transparent 1px),
        radial-gradient(circle at 35% 65%, rgba(65, 55, 45, 0.12) 0px, transparent 1.2px),
        radial-gradient(circle at 65% 35%, rgba(65, 55, 45, 0.11) 0px, transparent 1.5px),
        radial-gradient(circle at 50% 20%, rgba(90, 75, 60, 0.08) 0px, transparent 2.5px),
        radial-gradient(circle at 20% 50%, rgba(90, 75, 60, 0.07) 0px, transparent 3px),
        linear-gradient(165deg, transparent 49.8%, rgba(75, 62, 50, 0.1) 50%, transparent 50.2%),
        linear-gradient(15deg, transparent 49.7%, rgba(75, 62, 50, 0.09) 50%, transparent 50.3%),
        linear-gradient(120deg, transparent 49.9%, rgba(85, 70, 58, 0.08) 50%, transparent 50.1%),
        linear-gradient(60deg, transparent 49.8%, rgba(85, 70, 58, 0.07) 50%, transparent 50.2%),
        linear-gradient(rgba(100, 85, 70, 0.08) 0.5px, transparent 0.5px),
        linear-gradient(90deg, rgba(100, 85, 70, 0.08) 0.5px, transparent 0.5px);
    background-size:
        12px 12px, 14px 14px, 16px 16px, 18px 18px, 22px 22px, 26px 26px,
        8px 8px, 10px 10px, 11px 11px, 13px 13px, 0.8px 0.8px, 0.8px 0.8px;
    background-position:
        0 0, 7px 7px, 3px 10px, 11px 3px, 1px 15px, 15px 1px,
        2px 5px, 6px 1px, 9px 8px, 4px 11px, 0 0, 0 0;
    color: var(--color-text);
    /* margin-left is handled by media queries now */
    width: 100%;
    /* Take full width initially */
    flex-shrink: 0;
}

.footer-inner {
    max-width: var(--main-content-max-width);
    margin-right: auto;
    margin-left: 0;
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
}


/* .footer は上下のパディングを担当 */
.footer {
    background-color: inherit;
    color: var(--color-text);
    padding: 25px 0;
}

.site-footer .footer+.footer {
    border-top: 1px solid var(--color-border);
    padding-top: 12px;
    padding-bottom: 12px;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-heading);
    padding: 12px 0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
    border-top: none;
    margin-top: 0;
}

.fotter-text {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 25px;
}


.fotter-left {
    flex: 1;
    min-width: 180px;
}

.footer_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer_list ol {
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 12px;
    font-size: 1rem;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--color-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.footer_list li {
    margin-bottom: 10px;
}

/* フッター内のリンク */
.ga_footer,
.ga_footer:visited {
    color: var(--color-footer-link);
    font-size: 0.85rem;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.ga_footer:hover {
    color: var(--color-footer-link-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

/* YouTube埋め込み */
.youtube-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    /* Reduced max-width */
    margin-left: 0;
    margin-right: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 1.5em;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background-color: #e0d6c6;
}

.youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ga_footer:hover {
    color: var(--color-footer-link-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

/* 記事メタ情報 */
.article-meta {
    font-size: 0.85rem;
    color: #8b7a69;
    margin-bottom: 1.5em;
    padding-bottom: 0.8em;
    border-bottom: 1px dashed var(--color-border);
}

.article-meta span+span {
    margin-left: 15px;
}

/* 目次 */
.table_of_contents {
    background-color: var(--color-toc-bg);
    border: 1px solid var(--color-border);
    padding: 0;
    margin: 2em 0;
    border-radius: 4px;
    overflow: hidden;
}

.table_of_contents h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--color-heading);
    padding: 10px 15px 6px 15px;
    background-color: transparent;
    border-bottom: 1px solid var(--color-accent);
    text-align: left;
    font-weight: 700;
    border-left: none;
}

.table_of_contents ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.table_of_contents li {
    margin-bottom: 0;
}

.table_of_contents li:last-child a {
    border-bottom: none;
}

.table_of_contents a {
    display: block;
    padding: 6px 15px;
    color: var(--color-link);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
    border-bottom: 1px solid var(--color-toc-border-light);
    position: relative;
    margin: 0;
}

.table_of_contents a::after {
    display: none;
}

.table_of_contents a:hover {
    color: var(--color-link-hover);
    background-color: rgba(107, 90, 72, 0.04);
    text-decoration: none;
    padding-left: 20px;
}


/* --- レスポンシブ対応 (スマホ表示) --- */
@media (max-width: 768px) {

    .table_of_contents {
        margin: 1.5em 0;
    }

    .table_of_contents h3 {
        margin-bottom: 0.5em;
        padding: 8px 12px 5px 12px;
        font-size: 1.05rem;
    }

    .table_of_contents ul {
        margin: 5px 0;
    }

    .table_of_contents a {
        padding: 5px 12px;
        font-size: 0.9rem;
    }

    .table_of_contents a:hover {
        padding-left: 16px;
    }

}



/* テーブル */
.table-container {
    margin: 1.5em 0;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
}

.table-caption {
    background-color: var(--color-side-link-bg);
    padding: 8px 10px;
    font-weight: bold;
    color: var(--color-heading);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    background-color: var(--color-main-bg);
}

th, td {
    border-bottom: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
    overflow-wrap: break-word;
    white-space: normal;
}

/* テーブルの右端のセルの右線を消す */
th:last-child,
td:last-child {
    border-right: none;
}

/* テーブルの最終行の下線を消す */
tbody tr:last-child td {
    border-bottom: none;
}

th {
    background-color: var(--color-side-link-bg);
    font-weight: bold;
    color: var(--color-heading);
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-container table th {
    background-color: #e1d9c7 !important;
    color: #5c5144 !important;
    border-color: #c9c1b3 !important;
    font-weight: 600 !important;
    border-right-color: #a89c8c !important;
}

.table-container table th:last-child {
    border-right-color: transparent !important;
}


/* ストライプテーブル */
tbody tr:nth-child(odd) {
    background-color: rgba(239, 232, 224, 0.3);
}

tbody tr:nth-child(even) {
    background-color: var(--color-main-bg);
}

/* リスト風Pタグ スタイル調整 */
p.list {
    position: relative;
    /* カスタムアイコンを配置するためにrelativeを使用 */
    padding-left: 1em;
    /* アイコンのスペースを確保する */
    margin-bottom: 0.5em;
    /* パラグラフ間のスペースを設定する */
    color: #333;
    /* テキストの色を濃いグレーに設定する */
}

p.list::before {
    content: "●";
    /* カスタムアイコンを設定する */
    position: absolute;
    /* アイコンを絶対位置に設定する */
    left: 0;
    /* アイコンの位置を左に設定する */
    color: #555;
    /* アイコンの色を濃いグレーに設定する */
    font-size: 1em;
    /* アイコンのサイズを調整する */
    line-height: 1;
    /* アイコンの高さを調整する */
    top: 0;
    /* アイコンをテキストの先頭に揃える */
    transform: translateY(0.2em);
    /* アイコンを垂直方向に調整する */
    font-family: Arial, sans-serif;
    /* フォントを設定する */
}

/* マップ画像 */
.map-container {
    margin: 1.5em 0;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    outline: none;
}

.map-container:hover,
.map-container:focus {
    border-color: var(--color-accent);
    transform: scale(1.015);
    box-shadow: 0 4px 12px rgba(var(--color-accent-rgb), 0.15);
}

/* New rule for the HTML map label */
.map-label {
    position: absolute;
    top: -0.8em;
    /* Adjust as needed to match old ::before */
    left: 15px;
    background-color: var(--color-border);
    color: var(--color-main-bg);
    padding: 4px 12px;
    font-size: 1.2rem;
    /* Further increased font size */
    font-weight: bold;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 2;
    line-height: 1;
    white-space: nowrap;
    /* Prevent wrapping */
}

.map-container::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.95);
    background-color: rgba(165, 165, 165, 0.6);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    pointer-events: none;
}




/* ホバー/フォーカスでアイコンを表示 */
.map-container:hover::after,
.map-container:focus::after,
.map-container:focus-within::after {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}


img.map-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border: none;
    border-radius: 3px;
    transition: transform 0.2s ease;
}



/* 画像拡大モーダル */
.image-modal {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s, background-color 0.3s ease;
}

.image-modal.is-visible {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.85);
    transition-delay: 0s;
}

/* モーダル内の画像コンテンツ */
.modal-content {
    display: block;
    margin: auto;
    max-width: 100vw;
    /* Limit width to full viewport width */
    max-height: 100vh;
    /* Limit height to full viewport height */
    width: auto;
    /* Let browser calculate width based on constraints */
    height: auto;
    /* Maintain aspect ratio */
    object-fit: contain;
    /* Ensure the image fits within bounds */
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.image-modal.is-visible .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* 閉じるボタン */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: color 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    user-select: none;
    opacity: 0;
    z-index: 10001;
}

.image-modal.is-visible .modal-close-btn {
    opacity: 1;
    transition-delay: 0.2s;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    color: #bbb;
    text-decoration: none;
}

.modal-caption {
    display: none;
}

/* ストーリーチャート */
.story-chart {
    position: relative;
    padding-left: 25px;
    margin: 2em 0;
}

.story-chart::before {
    /* 縦線 */
    content: '';
    position: absolute;
    left: 8px;
    top: 0.5em;
    bottom: 1em;
    width: 3px;
    background-color: var(--color-border);
    border-radius: 1.5px;
}

.chart-step {
    position: relative;
    margin-bottom: 1.5em;
    padding: 10px 15px;
    background-color: #f9f5ef;
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.chart-step::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 12px;
    width: 14px;
    height: 14px;
    background-color: var(--color-accent);
    border: 2px solid var(--color-main-bg);
    border-radius: 50%;
    z-index: 1;
    box-sizing: border-box;
}

.chart-step:last-child {
    margin-bottom: 0;
}

.step-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5em;
    color: var(--color-heading);
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--color-border);
    min-height: 22px;
}

.step-content {
    font-size: 1rem;
    line-height: 1.65;
}

.step-content p,
.step-content p.list,
.step-content .map-container,
.step-content .table-container {
    margin-top: 0.8em;
    margin-bottom: 0.8em;
}

.step-content p:first-child,
.step-content p.list:first-child,
.step-content .map-container:first-child,
.step-content .table-container:first-child {
    margin-top: 0;
}

/* 前後の記事へのナビゲーション */
.article-navigation {
    text-align: center;
    margin: 2.5em 0 1.5em;
}

.article-navigation a {
    display: inline-block;
    padding: 10px 25px;
    margin: 0 10px;
    text-decoration: none;
    border-radius: 30px;
    background-color: var(--color-border);
    color: #ffffff;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.article-navigation a:hover {
    background-color: #8b7a69;
    transform: translateY(-1px);
    color: #ffffff;
}

/* サイト履歴 */
#site-history {
    margin-bottom: 30px;
}

.site-history-list {
    margin-top: 1.5em;
    position: relative;
    padding-left: 35px;
}

/* タイムラインの縦線 */
.site-history-list::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0.5em;
    bottom: 1em;
    width: 2px;
    background-color: var(--color-border);
    border-radius: 1px;
    z-index: 0;
}

.site-history-list dt {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--color-heading);
    margin-bottom: 0.3em;
    position: relative;
}

/* タイムラインマーカー */
.site-history-list dt::before {
    content: '';
    position: absolute;
    left: -26.5px;
    top: 0.25em;
    width: 12px;
    height: 12px;
    background-color: var(--color-accent);
    border-radius: 50%;
    border: 2px solid var(--color-main-bg);
    box-sizing: border-box;
    z-index: 1;
}


.site-history-list dd {
    margin-left: 0;
    padding-left: 0;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    font-size: 0.9rem;
    color: var(--color-text);
    border-bottom: 1px dashed var(--color-border);
}

.site-history-list dd:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ゲーム概要 */
#game-overview {
    margin-bottom: 30px;
}

.game-info-box {
    background-color: var(--color-sidebar-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 20px 25px;
}

.game-info-box h3 {
    border-left: none;
    border-bottom: none;
    padding-left: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 1em;
    font-size: 1.4rem;
    color: var(--color-heading);
    text-align: left;
}

.game-details {
    font-size: 0.95rem;
    line-height: 1.7;
    padding-top: 1em;
    border-top: 1px solid var(--color-border);
}

.game-details>div {
    display: flex;
    margin-bottom: 0.6em;
    padding-bottom: 0.6em;
    border-bottom: 1px dashed var(--color-border);
    align-items: baseline;
}

.game-details>div:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.game-details dt {
    flex: 0 0 6em;
    font-weight: bold;
    padding-right: 1em;
    color: var(--color-heading);
}

.game-details dd {
    flex: 1;
    margin-left: 0;
    color: var(--color-text);
}

/* --- Right Side Sticky Menu --- */
.right-side-menu {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: calc(var(--header-height) + 30px);
    /* Align below header + padding */
    right: 30px;
    width: var(--right-sidebar-width-default);
    /* Adjust width as needed */
    /* Ensure 80px gap from bottom: 100vh - header_height - top_offset(30px) - bottom_gap(80px) */
    max-height: calc(100vh - var(--header-height) - 110px);
    overflow-y: auto;
    background-color: var(--color-sidebar-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 15px;
    z-index: 800;
    box-shadow: -2px 2px 5px rgba(107, 90, 72, 0.1);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.right-side-menu.visible {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.right-side-menu h4 {
    font-size: 1rem;
    color: var(--color-heading);
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-accent);
    font-weight: 600;
}

.right-side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.right-side-menu li {
    margin-bottom: 5px;
}

.right-side-menu a {
    display: block;
    padding: 6px 10px;
    font-size: 0.85rem;
    color: var(--color-link);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
    position: relative;
    /* Allow text wrapping */
    white-space: normal;
    word-wrap: break-word;
    /* Ensure long words break */
    line-height: 1.4;
    /* Adjust line height for wrapped text if needed */
}

.right-side-menu a:hover {
    background-color: var(--color-side-link-hover-bg);
    color: var(--color-link-hover);
    padding-left: 15px;
}

.right-side-menu a.active {
    background-color: var(--color-accent);
    color: var(--color-pagetop-icon-new);
    font-weight: bold;
}

.right-side-menu a.active:hover {
    background-color: var(--color-accent);
    /* Keep active color on hover */
    color: var(--color-pagetop-icon-new);
    padding-left: 10px;
    /* Reset padding on active hover */
}

/* Scrollbar styling for the menu */
.right-side-menu::-webkit-scrollbar {
    width: 6px;
}

.right-side-menu::-webkit-scrollbar-track {
    background: transparent;
    margin: 5px 0;
}

.right-side-menu::-webkit-scrollbar-thumb {
    background-color: var(--color-border);
    border-radius: 3px;
}

.right-side-menu {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

/* --- End Right Side Sticky Menu --- */


/* レスポンシブ */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 240px;
        --header-height: 45px;
    }

    .header {
        height: var(--header-height);
    }

    .header-inner {
        padding: 0 15px;
        display: flex;
        align-items: center;
    }

    .site-title a {
        font-size: 1.35rem;
        display: inline-flex;
        align-items: center;
        height: 100%;
    }

    .main-content {
        margin-left: var(--sidebar-width);
        box-shadow: -1px 0 4px rgba(107, 90, 72, 0.07);
    }

    .main-content-inner {
        padding: 25px;
    }

    .site-footer {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }

    .footer-inner {
        padding-left: 15px;
        padding-right: 15px;
    }

    .sidebar-inner {
        padding: 12px;
    }

    .left-menu1 {
        padding: 6px 0 6px 25px;
        font-size: 0.9rem;
    }

    .left-menu2 {
        padding: 4px 12px;
        font-size: 0.8rem;
    }

    .youtube-wrapper {
        margin-left: 0;
        margin-right: auto;
    }

    .main-content-inner h3 {
        font-size: 1.3rem;
    }

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

    /* ストーリーチャート (タブレット) */
    .story-chart {
        padding-left: 25px;
    }

    .story-chart::before {
        left: 8px;
        width: 2px;
    }

    .chart-step::before {
        left: -22px;
        width: 10px;
        height: 10px;
        border-width: 2px;
        top: 0.4em;
    }

    .step-title {
        font-size: 1.05rem;
    }

    .step-content {
        font-size: 0.95rem;
    }

    .site-history-list {
        padding-left: 30px;
    }

    .site-history-list::before {
        left: 11px;
        width: 2px;
    }

    .site-history-list dt {
        font-size: 0.88rem;
    }

    .site-history-list dt::before {
        left: -23px;
        width: 10px;
        height: 10px;
        top: 0.32em;
        border-width: 2px;
    }

    .site-history-list dd {
        font-size: 0.88rem;
    }
}


/* --- Layout adjustments for non-mobile screens (>= 769px) --- */
@media (min-width: 769px) {
    .main-content {
        margin-left: var(--sidebar-width);
        /* Apply sidebar margin */
    }

    .site-footer {
        margin-left: var(--sidebar-width);
        /* Apply sidebar margin */
        width: calc(100% - var(--sidebar-width));
        /* Adjust width */
    }
}


/* --- Layout adjustments for large screens (>= 1901px) WHEN right menu is active --- */
@media (min-width: 1901px) {
    .right-side-menu {
        width: var(--right-sidebar-width-large);
        /* Set initial large screen width */
    }

    body.right-menu-active .main-content-inner {
        /* Adjust padding ONLY when body has the right-menu-active class */
        padding-right: calc(var(--right-sidebar-width-large) + 30px + 30px);
        /* menu width + menu right offset + original inner padding */
    }

    body.right-menu-active .footer-inner {
        /* Adjust padding ONLY when body has the right-menu-active class */
        padding-right: calc(var(--right-sidebar-width-large) + 30px + 20px);
        /* menu width + menu right offset + original inner padding */
    }

    /* .right-side-menu visibility itself is still handled by JS adding/removing .visible class */
}

/* --- Layout adjustments for extra large screens (> 2060px) WHEN right menu is active --- */
@media (min-width: 2061px) {
    .right-side-menu {
        width: var(--right-sidebar-width-xlarge);
        /* Expand menu width further */
    }

    body.right-menu-active .main-content-inner {
        /* Adjust padding for the wider menu */
        padding-right: calc(var(--right-sidebar-width-xlarge) + 30px + 30px);
        /* new menu width + menu right offset + original inner padding */
    }

    body.right-menu-active .footer-inner {
        /* Adjust padding for the wider menu */
        padding-right: calc(var(--right-sidebar-width-xlarge) + 30px + 20px);
        /* new menu width + menu right offset + original inner padding */
    }
}


/* --- Responsive Standard Table Styles --- */

/* --- Container Styling for Responsive Table --- */
div.data-table-container {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    margin: 1.5em 0;
}

/* Apply standard styles *inside* the container for PC view */
.data-table-container .table-standard-responsive {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.9rem;
    background-color: var(--color-main-bg);
}

.data-table-container .table-standard-responsive th,
.data-table-container .table-standard-responsive td {
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

/* Apply theme styles to header */
.data-table-container .table-standard-responsive th {
    background-color: #e1d9c7 !important;
    color: #5c5144 !important;
    font-weight: 600 !important;
    border-color: #c9c1b3 !important;
    border-right-color: #a89c8c !important;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Remove right border from last cell */
.data-table-container .table-standard-responsive th:last-child,
.data-table-container .table-standard-responsive td:last-child {
    border-right: none !important;
}

/* Remove bottom border from last row */
.data-table-container .table-standard-responsive tbody tr:last-child td {
    border-bottom: none;
}

/* Add striping */
.data-table-container .table-standard-responsive tbody tr:nth-child(odd) {
    background-color: rgba(239, 232, 224, 0.3);
}

.data-table-container .table-standard-responsive tbody tr:nth-child(even) {
    background-color: var(--color-main-bg);
}

/* Fix for rowspan bottom border issue (prevent double border) */
.data-table-container .table-standard-responsive td[rowspan] {
    border-bottom-width: 0;
}

@media (max-width: 768px) {

    /* --- Responsive Standard Table (Mobile) --- */
    div.data-table-container {
        border: none;
        margin: 1em 0;
        background-color: transparent !important;
        overflow-x: visible;
    }

    .data-table-container .table-standard-responsive {
        border: none;
        box-shadow: none;
        background-color: transparent !important;
    }

    .data-table-container .table-standard-responsive thead {
        display: none;
    }

    .data-table-container .table-standard-responsive tbody {
        display: block;
        background-color: transparent;
    }

    .data-table-container .table-standard-responsive tr {
        display: flex;
        flex-direction: column;
        background-color: transparent;
        border: none;
        border-radius: 0;
        margin-bottom: 1.5rem;
        padding: 0;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
        box-sizing: border-box;
    }

    .data-table-container .table-standard-responsive td {
        display: block;
        padding: 0.5rem 1rem;
        border: none !important;
        text-align: left;
        background-color: var(--color-main-bg);
        box-sizing: border-box;
        order: 2;
        border-radius: 0 !important;
        border-left: 1px solid var(--color-border) !important;
        border-right: 1px solid var(--color-border) !important;
    }

    .data-table-container .table-standard-responsive tr td:not(:last-of-type) {
        border-bottom: 1px dashed var(--color-border-light, #e0d6c6) !important;
    }

    .data-table-container .table-standard-responsive tr td:last-of-type {
        border-bottom: 1px solid var(--color-border) !important;
        border-bottom-left-radius: 6px !important;
        border-bottom-right-radius: 6px !important;
        border-left: 1px solid var(--color-border) !important;
        border-right: 1px solid var(--color-border) !important;
    }

    .data-table-container .table-standard-responsive td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--color-text-secondary, #555);
        margin-bottom: 0.2em;
        white-space: normal;
        text-align: left;
    }

    .data-table-container .table-standard-responsive td>* {
        display: block;
        word-break: break-word;
    }

    .data-table-container .table-standard-responsive td a:hover {
        text-decoration: none;
    }

    .data-table-container>.table-caption {
        background-color: transparent !important;
        color: var(--color-heading) !important;
        padding: 0.3em 0 0.5em 0 !important;
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        border: none !important;
        border-bottom: 3px solid var(--color-accent) !important;
        border-radius: 0 !important;
        margin-bottom: 1em !important;
        text-align: left;
    }

    /* Apply header styles using sp_label class */
    .data-table-container .table-standard-responsive td.sp_label {
        order: 1;
        background-color: #e1d9c7 !important;
        padding: 0.4rem 1rem;
        border-top: 1px solid var(--color-border) !important;
        border-left: 1px solid var(--color-border) !important;
        border-right: 1px solid var(--color-border) !important;
        border-bottom: 1px solid var(--color-border) !important;
        border-top-left-radius: 6px !important;
        border-top-right-radius: 6px !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        color: #5c5144;
    }

    /* Hide default label for header cells with sp_label class */
    .data-table-container .table-standard-responsive td.sp_label::before {
        display: none;
    }

    /* Style content of header cells with sp_label class */
    .data-table-container .table-standard-responsive td.sp_label>* {
        font-weight: bold;
        font-size: 1.1em;
        color: inherit;
        display: block;
        text-align: left;
    }
}

@media (max-width: 768px) {
    /* 他のスタイル ... */

    .data-table-container .table-standard-responsive td>p.list {
        display: block;
        /* p.list には display: block を強制する */
        /* 必要であれば他のスタイルも調整 */
    }

    /* 他のスタイル ... */
}

/* --- End Responsive Standard Table Styles --- */


/* --- Mobile Specific Override for Standard Table Header (.table-container > table) --- */
@media (max-width: 768px) {
    .table-container table th {
        background-color: #E1D9C7 !important;
        color: #5c5144 !important;
        font-weight: 600 !important;
        background-image: none !important;
    }

    .table-container>table>thead>tr>th {
        background-color: #E1D9C7 !important;
        color: #5c5144 !important;
        font-weight: 600 !important;
        background-image: none !important;
    }
}


/* --- Mobile Specific Override for Standard Table Header --- */
@media (max-width: 768px) {
    .data-table-container .table-standard-responsive th {
        background-color: #E1D9C7 !important;
        color: #5c5144 !important;
        font-weight: 600 !important;
        background-image: none !important;
    }
}

/* --- Custom List Styles --- */
ul.list-checkmark,
ol.list-checkmark {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5em;
}

ul.list-checkmark li,
ol.list-checkmark li {
    position: relative;
    padding-left: 1.8em;
    margin-bottom: 0.5em;
}

ul.list-checkmark li::before,
ol.list-checkmark li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
    top: 0.1em;
}

ul.list-arrow,
ol.list-arrow {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5em;
}

ul.list-arrow li,
ol.list-arrow li {
    position: relative;
    padding-left: 1.8em;
    margin-bottom: 0.5em;
}

ul.list-arrow li::before,
ol.list-arrow li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-link);
    top: 0;
}

ul.list-bordered,
ol.list-bordered {
    list-style: none;
    padding: 0;
    margin-top: 0.5em;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 10px 15px 10px 30px;
    background-color: var(--color-toc-bg);
}

ul.list-bordered li,
ol.list-bordered li {
    margin-bottom: 0.6em;
    padding-left: 0;
}

ul.list-bordered li:last-child,
ol.list-bordered li:last-child {
    margin-bottom: 0;
}

/* 番号付きリスト (丸囲み数字) */
ol.list-decimal-circle {
    list-style: none;
    padding-left: 0;
    counter-reset: list-counter;
    margin-top: 0.5em;
}

ol.list-decimal-circle li {
    position: relative;
    padding-left: 2.2em;
    margin-bottom: 0.6em;
    counter-increment: list-counter;
    line-height: 1.6;
}

ol.list-decimal-circle li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0.165rem;
    width: 1.6em;
    height: 1.6em;
    line-height: 1.6em;
    text-align: center;
    color: var(--color-main-bg);
    background-color: var(--color-heading);
    border-radius: 50%;
    font-size: 0.85em;
    font-weight: bold;
}

/* --- Game Info Box 2 Styles (Wilderness Theme) --- */
.game-info-box2 {
    background-color: #f5f1e9;
    border-radius: 8px;
    margin-top: 1.5em;
    box-shadow: 0 2px 8px rgba(106, 90, 73, 0.15);
    border: 1px solid #dcd5c9;
    overflow: hidden;
}

.game-info-box2 h3 {
    background-color: #a89c8c;
    color: #fdfcf9;
    margin: 0;
    padding: 10px 18px;
    font-size: 1.25rem;
    font-weight: 500;
    border-bottom: 1px solid #968b7c;
}

.game-info-box2 .game-details2 {
    padding: 18px;
    display: grid;
    grid-template-columns: 15% 1fr;
    gap: 8px 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.game-info-box2 .game-details2 dt {
    font-weight: 600;
    color: #8a8174;
    grid-column: 1;
    text-align: left;
    padding-right: 5px;
}

/* Game Info Box 2 - Row Dividers */
.game-info-box2 .game-details2>div {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #dcd5c9;
}

.game-info-box2 .game-details2 dd {
    margin-left: 0;
    grid-column: 2;
    color: #4a443d;
    word-break: break-word;
}

/* Remove border and spacing from the last div */
.game-info-box2 .game-details2>div:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Link style within the box */
.game-info-box2 .game-details2 dd a,
.game-info-box2 .game-details2 dd a:visited {
    color: rgb(11, 123, 199);
    text-decoration: none;
}

.game-info-box2 .game-details2 dd a:hover {
    color: #4ca7ea;
    text-decoration: none;
}

/* Responsive Game Info Box 2 */
@media (max-width: 768px) {
    .game-info-box2 .game-details2 {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 15px;
    }

    .game-info-box2 .game-details2 dt {
        grid-column: 1;
        padding-bottom: 2px;
        margin-bottom: 0;
        border-bottom: none;
    }

    .game-info-box2 .game-details2 dd {
        grid-column: 1;
        margin-left: 0;
    }

    .game-info-box2 .game-details2>div {
        display: block;
        grid-column: auto;
        padding-bottom: 8px;
        margin-bottom: 8px;
        border-bottom: 1px solid #dcd5c9;
    }

    .game-info-box2 .game-details2>div:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}


/* --- Item/Data Filtering and Navigation Styles --- */
/* Filter Buttons Styling */
.filter-buttons {
    margin-bottom: 1em;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-button {
    padding: 6px 12px;
    border: 1px solid var(--color-border, #9c8a78);
    /* Change background color for inactive buttons */
    background-color: #EDE6DE;
    color: var(--color-text, #3e352e);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-size: 0.9em;
}

.filter-button:hover {
    background-color: var(--color-side-link-bg, #e2d8ca);
    border-color: var(--color-accent, #c89f76);
}

.filter-button.active {
    background-color: var(--color-accent, #c89f76);
    color: var(--color-main-bg, #fffdfa);
    border-color: var(--color-accent, #c89f76);
    font-weight: bold;
}

/* Search Box Styling */
.item-search-container {
    margin-bottom: 1em;
}

#item-search-box {
    padding: 8px 12px;
    border: 1px solid var(--color-border, #9c8a78);
    border-radius: 4px;
    font-size: 0.9em;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

#item-search-box:focus {
    outline: none;
    border-color: var(--color-accent, #c89f76);
    box-shadow: 0 0 0 2px rgba(var(--color-accent-rgb, 200, 159, 118), 0.3);
}

/* Item Category Navigation Styling - Updated Design */
.item-category-nav {
    margin-bottom: 1.5em;
    /* Removed bottom border from container */
    padding-bottom: 0;
}

.item-category-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    /* Slightly increased gap */
}

.item-category-nav li {
    margin: 0;
}

/* Style for the links within the category nav */
/* Removed .entry-content from selector */
.item-category-nav ul li a {
    display: block;
    padding: 8px 18px;
    /* Adjusted padding */
    text-decoration: none;
    color: var(--color-heading, #5c4d3e) !important;
    /* Subtle gradient background */
    background: linear-gradient(to bottom, #f0e9e1, #e8e1d9);
    border: 1px solid var(--color-border, #9c8a78);
    border-radius: 20px;
    /* Pill shape */
    font-size: 0.9em;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(107, 90, 72, 0.1);
    /* Subtle shadow */
}

/* Hover state for category nav links */
/* Removed .entry-content from selector */
.item-category-nav ul li a:hover {
    /* Slightly darker gradient on hover */
    background: linear-gradient(to bottom, #e8e1d9, #e1dacf);
    border-color: var(--color-accent, #c89f76);
    color: var(--color-heading, #5c4d3e) !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    /* Lift effect */
    box-shadow: 0 3px 5px rgba(107, 90, 72, 0.15);
    /* Enhanced shadow */
}

/* Active state for category nav links */
/* Removed .entry-content from selector */
.item-category-nav ul li a.active {
    /* Accent color gradient for active state */
    background: linear-gradient(to bottom, var(--color-accent, #c89f76), #b88e66);
    color: var(--color-main-bg, #fffdfa) !important;
    border-color: #a87e56;
    /* Darker accent border */
    font-weight: bold;
    cursor: default;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(255, 255, 255, 0.1);
    /* Inner shadow */
    transform: translateY(0);
    /* Reset transform */
}

/* Ensure hover on active doesn't change background/color */
/* Removed .entry-content from selector */
.item-category-nav ul li a.active:hover {
    transform: translateY(0);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(255, 255, 255, 0.1);
}


/* Responsive adjustments for category nav */
@media screen and (max-width: 768px) {
    .item-category-nav ul {
        gap: 8px;
    }

    /* Removed .entry-content from selector */
    .item-category-nav ul li a {
        padding: 7px 14px;
        /* Adjusted padding for mobile */
        font-size: 0.85em;
    }
}

/* --- End Item/Data Filtering and Navigation Styles --- */

@media (max-width: 768px) {

    .page-wrapper {
        padding-top: 0;
    }

    body {
        font-size: 15px;
        line-height: 1.65;
    }

    .header {
        height: auto;
        min-height: 40px;
        position: static;
        border-bottom: 1px solid var(--color-border);
    }

    .header-inner {
        flex-direction: row;
        justify-content: left;
        padding: 4px 15px;
    }

    .site-title a {
        font-size: 1.35rem;
    }

    /* --- スマホ表示順序 (Bodyクラスで分岐) --- */
    .container {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    body.page-top .sidebar {
        order: 0;
        margin-top: 0;
        border-bottom: 1px solid var(--color-border);
    }

    body.page-top .main-content {
        order: 1;
        margin-top: 15px;
    }

    body.page-top .site-footer {
        order: 2;
    }

    body.page-article .main-content {
        order: 0;
        margin-top: 0;
    }

    body.page-article .sidebar {
        order: 1;
        margin-top: 0px;
        border-bottom: none;
    }

    body.page-article .site-footer {
        order: 2;
    }

    /* 共通化 */
    .sidebar, .main-content, .site-footer {
        width: 100%;
        position: static;
        margin-left: 0;
        left: auto;
        top: auto;
        height: auto;
    }

    .sidebar {
        border-right: none;
        overflow-y: visible;
        z-index: auto;
    }

    .main-content {
        min-height: auto;
        box-shadow: none;
    }

    .main-content-inner {
        padding: 8px;
        max-width: 100%;
        margin-right: 0;
    }

    .site-footer {
        width: 100%;
    }

    .footer-inner {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
        margin-right: 0;
    }


    /* --- ここまでスマホ表示順序変更 --- */


    .sidebar-inner {
        padding: 15px;
        min-height: auto;
        /* Removed padding-bottom: 15px; */
    }

    .left-menu1 {
        padding: 6px 0 6px 25px;
        font-size: 0.9rem;
    }

    .left-menu2 {
        padding: 4px 12px;
        font-size: 0.75rem;
    }

    .page-top-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .page-top-btn::before {
        width: 8px;
        height: 8px;
        border-width: 3px;
        transform: translate(-50%, -65%) rotate(-45deg);
    }


    .main-content-inner h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .main-content-inner h3 {
        font-size: 1.25rem;
        margin-top: 0.1em;
        margin-bottom: 0.9em;
        padding-left: 8px;
        padding-bottom: 4px;
        border-left-width: 4px;
    }

    .table_of_contents h3 {
        margin-bottom: 0.2rem;
    }

    .main-content-inner h4 {
        font-size: 1.1rem;
        margin-top: 1.6em;
        margin-bottom: 0.7em;
    }

    .main-content-inner p {
        margin-bottom: 0.8em;
        font-size: 0.9rem;
    }

    /* フッターモバイルレイアウト */
    .fotter-text {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .fotter-left {
        width: 90%;
        text-align: center;
        min-width: auto;
    }

    .footer_list ol {
        text-align: center;
        border-bottom-color: var(--color-border);
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    .footer_list li {
        margin-bottom: 8px;
    }

    .ga_footer {
        font-size: 0.8rem;
    }

    .copyright {
        margin-top: 15px;
        padding-top: 10px;
    }

    .site-footer .footer+.footer {
        border-top-color: var(--color-border);
        padding-top: 10px;
    }

    .sp-none {
        display: none !important;
    }

    .youtube-wrapper {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-color: var(--color-border);
        aspect-ratio: 16 / 9;
    }

    /* スマホ時の個別記事調整 */
    .map-container {
        padding: 8px;
        display: block;
    }



    .map-container::before {
        top: -0.7em;
        left: 8px;
        padding: 4px 12px;
        font-size: 1.1rem;
        border-radius: 3px;
    }

    img.map-image {
        border: none;
        border-radius: 3px;
    }



    table {
        min-width: 0;
        width: 100%;
        table-layout: auto;
        font-size: 0.75rem;
    }

    th, td {
        white-space: normal;
        overflow-wrap: break-word;
        padding: 4px 6px;
    }

    /* スマホ表示時のテーブルヘッダー（th）のスタイル */
    th {
        background-color: #8a7c6f;
        color: #ffffff;
        /* ザラザラしたテクスチャ */
        background-image:
            radial-gradient(circle at 5% 95%, rgba(50, 40, 30, 0.25) 0px, transparent 0.8px),
            radial-gradient(circle at 95% 5%, rgba(50, 40, 30, 0.24) 0px, transparent 1px),
            radial-gradient(circle at 35% 65%, rgba(70, 60, 50, 0.20) 0px, transparent 1.2px),
            radial-gradient(circle at 65% 35%, rgba(70, 60, 50, 0.19) 0px, transparent 1.5px),
            radial-gradient(circle at 50% 20%, rgba(90, 80, 70, 0.15) 0px, transparent 2.5px),
            radial-gradient(circle at 20% 50%, rgba(90, 80, 70, 0.14) 0px, transparent 3px),
            linear-gradient(165deg, transparent 49.8%, rgba(80, 70, 60, 0.18) 50%, transparent 50.2%),
            linear-gradient(15deg, transparent 49.7%, rgba(80, 70, 60, 0.17) 50%, transparent 50.3%),
            linear-gradient(120deg, transparent 49.9%, rgba(90, 80, 70, 0.16) 50%, transparent 50.1%),
            linear-gradient(60deg, transparent 49.8%, rgba(90, 80, 70, 0.15) 50%, transparent 50.2%),
            linear-gradient(rgba(100, 90, 80, 0.15) 0.5px, transparent 0.5px),
            linear-gradient(90deg, rgba(100, 90, 80, 0.15) 0.5px, transparent 0.5px);
        background-size:
            12px 12px, 14px 14px,
            16px 16px, 18px 18px,
            22px 22px, 26px 26px,
            8px 8px, 10px 10px, 11px 11px, 13px 13px,
            0.8px 0.8px, 0.8px 0.8px;
        background-position:
            0 0, 7px 7px,
            3px 10px, 11px 3px,
            1px 15px, 15px 1px,
            2px 5px, 6px 1px, 9px 8px, 4px 11px,
            0 0, 0 0;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .table-caption {
        padding: 6px 6px;
    }

    p.list {
        position: relative;
        /* カスタムアイコンを配置するためにrelativeを使用 */
        padding-left: 1em;
        /* アイコンのスペースを確保する */
        margin-bottom: 0.5em;
        /* パラグラフ間のスペースを設定する */
        color: #333;
        /* テキストの色を濃いグレーに設定する */
    }

    p.list::before {
        content: "●";
        /* カスタムアイコンを設定する */
        position: absolute;
        /* アイコンを絶対位置に設定する */
        left: 0;
        /* アイコンの位置を左に設定する */
        color: #555;
        /* アイコンのサイズを調整する */
        line-height: 1;
        /* アイコンの高さを調整する */
        top: 0;
        /* アイコンをテキストの先頭に揃える */
        transform: translateY(0.2em);
        /* アイコンを垂直方向に調整する */
    }

    /* ストーリーチャート (スマホ) */
    .story-chart {
        padding-left: 20px;
    }

    .story-chart::before {
        left: 6px;
        width: 2px;
    }

    .chart-step::before {
        left: -19px;
        width: 10px;
        height: 10px;
        border-width: 2px;
        top: 0.4em;
    }

    .step-title {
        font-size: 1rem;
        min-height: 18px;
    }

    .step-content {
        font-size: 0.95rem;
    }

    /* 記事ナビゲーション (スマホ) */
    .article-navigation {
        margin: 2em 0 1em;
        /* Add flexbox for better wrapping control if needed, but margin might suffice */
        /* display: flex; */
        /* flex-wrap: wrap; */
        /* justify-content: center; */
        /* gap: 10px; */
        /* Add gap between buttons */
    }

    .article-navigation a {
        padding: 8px 18px;
        font-size: 0.85rem;
        margin: 0 5px;
        /* Add bottom margin for stacking */
        margin-bottom: 10px;
    }

    .site-history-list {
        padding-left: 25px;
    }

    .site-history-list::before {
        left: 10px;
        width: 2px;
    }

    .site-history-list dt {
        font-size: 0.85rem;
    }

    .site-history-list dt::before {
        left: -19px;
        width: 10px;
        height: 10px;
        top: 0.35em;
        border-width: 2px;
    }

    .site-history-list dd {
        margin-left: 0;
        font-size: 0.85rem;
        margin-bottom: 1.2em;
        padding-bottom: 0.8em;
    }

    .game-info-box {
        padding: 15px 20px;
    }

    .game-info-box h3 {
        font-size: 1.3rem;
        text-align: center;
    }

    .game-details {
        font-size: 0.9rem;
        padding-top: 0.8em;
    }

    .game-details>div {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0.8em;
        padding-bottom: 0.8em;
    }

    .game-details dt {
        flex-basis: auto;
        margin-bottom: 0.2em;
        padding-right: 0;
    }

    .game-details dd {
        flex-basis: auto;
    }

}

/* End of @media (max-width: 768px) */

/* --- Explanation Box --- */
.explanation-box {
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    padding-left: 1em;
    padding-right: 1em;
    border: 1px solid var(--color-border);
    /* Default border */
    background-color: #f8f8f8;
    /* Default background */
    border-radius: 4px;
    font-size: 0.95rem;
    /* Slightly increased font size */
    margin: 1.5em 0;
    line-height: 1.6;
}

.explanation_context {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.explanation-box h4 {
    /* Style for heading inside the box */
    margin-top: 5px;
    margin-bottom: 0.5em;
    font-size: 1rem;
    color: var(--color-heading);
    border-bottom: 1px dashed var(--color-border);
    padding-bottom: 0.3em;
}

.explanation-box p {
    margin-bottom: 0.5em;
    font-size: inherit;
    /* Inherit font size from parent */
}

.explanation-box p:last-child {
    margin-bottom: 0;
}

.explanation-box code {
    background-color: rgba(156, 138, 120, 0.1);
    /* Use border color with alpha */
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.95em;
    color: var(--color-text);
}

/* Color Variations */
.explanation-box-default {
    /* Explicit default */
    background-color: #f8f8f8;
    border-color: #dcdcdc;
    /* Lighter border for default */
}

.explanation-box-footer {
    background-color: var(--color-footer-bg);
    /* #f5f0e6 */
    border-color: var(--color-border);
}

.explanation-box-sidebar {
    background-color: var(--color-sidebar-bg);
    /* #efe8d8 */
    border-color: var(--color-border);
}

.explanation-box-sage {
    background-color: #e8f0e8;
    /* Muted green */
    border-color: #c8d8c8;
}

.explanation-box-clay {
    background-color: #E0F2F7;
    /* Light terracotta */
    border-color: #e0cec2;
}

.explanation-box-mist {
    background-color: #e0f2f7;
    /* Pale sky blue */
    border-color: #d0e2e7;
    /* 少し暗くした色 (仮) */
}

.explanation-box-foam {
    background-color: #e6f4ea;
    /* Pale mint green */
    border-color: #d6e4da;
    /* 少し暗くした色 (仮) */
}

.explanation-box-haze {
    background-color: #eae4f2;
    /* Pale lavender */
    border-color: #dad4e2;
    /* 少し暗くした色 (仮) */
}

.explanation-box-cloud {
    background-color: #eceff1;
    /* Light blue gray */
    border-color: #dce0e1;
    /* 少し暗くした色 (仮) */
}

.explanation-box-blush {
    background-color: #f9ebea;
    /* Pale pink */
    border-color: #e9dbda;
    /* 少し暗くした色 (仮) */
}

.explanation-box-linen {
    background-color: #faf0e6;
    /* Warm off-white */
    border-color: #eae0d6;
    /* 少し暗くした色 (仮) */
}

.explanation-box-cream {
    background-color: #fff8e1;
    /* Light cream/pale yellow */
    border-color: #f0e8d1;
    /* 少し暗くした色 (仮) */
}

.explanation-box-quartz {
    background-color: #f6efea;
    /* Pale rose beige */
    border-color: #e6dfda;
    /* 少し暗くした色 (仮) */
}

.explanation-box-ash {
    background-color: #f5f5f5;
    /* Light warm gray */
    border-color: #e5e5e5;
    /* 少し暗くした色 (仮) */
}

.explanation-box-ghost {
    background-color: #fafafa;
    /* Off-white / very light gray */
    border-color: #eaeaea;
    /* 少し暗くした色 (仮) */
}

.explanation-box-stone {
    background-color: #efede9;
    /* Light greige */
    border-color: #dfded9;
    /* 少し暗くした色 (仮) */
}


/* --- Explanation Box --- */
.explanation-box .explanation_context + .explanation_context {
    margin-top: 0.4rem;
}

/* --- End Explanation Box --- */

/* --- Marker Highlight --- */
.marker-highlight {
    background: linear-gradient(transparent 60%, rgba(255, 229, 100, 0.7) 60%, rgba(255, 229, 100, 0.7) 95%, transparent 95%);
    /* Yellow marker effect */
    padding: 0 0.1em;
    /* Minimal horizontal padding */
    margin: 0 -0.1em;
    /* Counteract padding to avoid shifting layout */
    display: inline;
    /* Ensure it behaves like inline text */
    line-height: inherit;
    /* Inherit line height */
    box-decoration-break: clone;
    /* Apply background correctly across line breaks */
    -webkit-box-decoration-break: clone;
    /* For Safari */
}

/* Color Variations */
.marker-highlight-accent {
    background: linear-gradient(transparent 60%, rgba(200, 159, 118, 0.7) 60%, rgba(200, 159, 118, 0.7) 95%, transparent 95%);
    /* Accent color */
}

.marker-highlight-sage {
    background: linear-gradient(transparent 60%, rgba(160, 190, 160, 0.7) 60%, rgba(160, 190, 160, 0.7) 95%, transparent 95%);
    /* Sage green */
}

.marker-highlight-sky {
    background: linear-gradient(transparent 60%, rgba(173, 216, 230, 0.7) 60%, rgba(173, 216, 230, 0.7) 95%, transparent 95%);
    /* Sky blue */
}

.marker-highlight-rose {
    background: linear-gradient(transparent 60%, rgba(220, 160, 160, 0.7) 60%, rgba(220, 160, 160, 0.7) 95%, transparent 95%);
    /* Rose */
}

/* --- End Marker Highlight --- */

/* --- Inline Text Decorations --- */
.text-strikethrough {
    text-decoration: line-through;
    opacity: 0.7;
    /* Optional: make it slightly faded */
}

.text-bold {
    font-weight: bold;
}

.text-underline {
    text-decoration: underline;
    text-decoration-style: wavy;
    /* Example: wavy underline */
    text-decoration-color: var(--color-accent);
    /* Use accent color */
}

.text-accent {
    color: var(--color-accent);
    /* Use accent color for text */
    font-weight: 600;
    /* Slightly bolder */
}

/* --- End Inline Text Decorations --- */


/* --- レスポンシブ対応 (スマホ表示) --- */
@media (max-width: 768px) {
    article.entry-content>section {
        margin-left: calc(-1 * var(--main-inner-padding-x-sp));
        margin-right: calc(-1 * var(--main-inner-padding-x-sp));
        padding-left: var(--main-inner-padding-x-sp);
        padding-right: var(--main-inner-padding-x-sp);
        padding-top: 2em;
        padding-bottom: 2em;
    }

    .main-content-inner h2 {
        margin-bottom: 1em;
    }
}


.database_01_entry {
    background-color: #FFFDFA;
    /* Changed background color */
    border: 1px solid var(--color-border);
    margin-bottom: 1.5em;
    border-radius: 4px;
    /* background-color: var(--color-main-bg); Removed original */
    overflow: hidden;
    transition: box-shadow 0.2s ease-out;
}

.database_01_entry .database_01_header {
    background-color: var(--color-side-link-bg);
    padding: 8px 15px;
    margin: 0;
    font-size: 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.database_01_entry .database_01_header span {
    flex-grow: 1;
    padding-right: 10px;
    color: var(--color-heading);
}

.database_01_entry .database_01_details_link {
    font-size: 1rem;
    font-weight: normal;
    color: #0b7bc7;
    /* Changed to standard blue link color */
    text-decoration: none;
    border-bottom: 1px dotted #0b7bc7;
    /* Changed to standard blue link color */
    flex-shrink: 0;
    transition: color 0.2s ease, border-bottom-style 0.2s ease;
}

.database_01_entry .database_01_details_link:hover {
    color: #4ca7ea;
    /* Changed to standard blue link hover color */
    border-bottom-style: solid;
}

.database_01_body {
    padding: 15px;
    font-size: 1rem;
    /* Changed from 0.9rem */
    line-height: 1.6;
}

.database_01_stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--color-border);
}

.database_01_label {
    font-weight: bold;
    color: var(--color-heading);
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.2em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.database_01_value {
    color: var(--color-text);
}

.database_01_obtain {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--color-border);
}

.database_01_tag_list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.database_01_tag {
    font-size: 0.9rem;
    padding: 3px 10px;
    border-radius: 12px;
    background-color: var(--color-side-link-bg);
    border: 1px solid transparent;
    color: var(--color-side-menu-link-text);
    white-space: nowrap;
    line-height: 1.4;
}

.database_01_tag.database_01_tag_disabled {
    text-decoration: line-through;
    opacity: 0.7;
    background-color: #ddd;
    color: #777;
}

@media (max-width: 768px) {

    .database_01_body {
        padding: 15px;
        font-size: 0.9rem;
        /* Changed from 0.9rem */
        line-height: 1.6;
    }

    .database_01_entry .database_01_header {
        background-color: var(--color-side-link-bg);
        padding: 8px 15px;
        margin: 0;
        font-size: 1.05rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--color-border);
    }


    .database_01_entry .database_01_details_link {
        font-size: 0.9rem;
        font-weight: normal;
        color: #0b7bc7;
        /* Changed to standard blue link color */
        text-decoration: none;
        border-bottom: 1px dotted #0b7bc7;
        /* Changed to standard blue link color */
        flex-shrink: 0;
        transition: color 0.2s ease, border-bottom-style 0.2s ease;
    }

    .database_01_label {
        font-weight: bold;
        color: var(--color-heading);
        display: block;
        font-size: 1rem;
        margin-bottom: 0.2em;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}



/* ========== CSS ========== */
/* 既存の style.css の末尾などに追記 */

.hamburger-button {
    display: none;
    margin-left: auto;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    position: relative;
    width: 44px;
    height: 44px;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    display: block;
    width: 24px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.hamburger-icon::before {
    transform: translate(-50%, -8.5px);
}

.hamburger-icon::after {
    transform: translate(-50%, 5.5px);
}

.hamburger-button[aria-expanded="true"] .hamburger-icon {
    background-color: transparent;
}

.hamburger-button[aria-expanded="true"] .hamburger-icon::before {
    transform: translate(-50%, -1.5px) rotate(45deg);
}

.hamburger-button[aria-expanded="true"] .hamburger-icon::after {
    transform: translate(-50%, -1.5px) rotate(-45deg);
}


/* --- Mobile Menu Overlay --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85%;
    height: 100vh;
    height: -webkit-fill-available;
    background-color: var(--color-sidebar-bg);
    /* Sidebar texture */
    background-image:
        /* Darkest, tiniest pinpricks */
        radial-gradient(circle at 5% 95%, rgba(45, 35, 25, 0.15) 0px, transparent 0.8px),
        radial-gradient(circle at 95% 5%, rgba(45, 35, 25, 0.14) 0px, transparent 1px),
        /* Medium dark, small specks */
        radial-gradient(circle at 35% 65%, rgba(65, 55, 45, 0.12) 0px, transparent 1.2px),
        radial-gradient(circle at 65% 35%, rgba(65, 55, 45, 0.11) 0px, transparent 1.5px),
        /* Lighter, slightly larger subtle spots */
        radial-gradient(circle at 50% 20%, rgba(90, 75, 60, 0.08) 0px, transparent 2.5px),
        radial-gradient(circle at 20% 50%, rgba(90, 75, 60, 0.07) 0px, transparent 3px),
        /* Sharp, fine multi-angle cracks */
        linear-gradient(165deg, transparent 49.8%, rgba(75, 62, 50, 0.1) 50%, transparent 50.2%),
        linear-gradient(15deg, transparent 49.7%, rgba(75, 62, 50, 0.09) 50%, transparent 50.3%),
        linear-gradient(120deg, transparent 49.9%, rgba(85, 70, 58, 0.08) 50%, transparent 50.1%),
        linear-gradient(60deg, transparent 49.8%, rgba(85, 70, 58, 0.07) 50%, transparent 50.2%),
        /* Ultra-fine base noise */
        linear-gradient(rgba(100, 85, 70, 0.08) 0.5px, transparent 0.5px),
        linear-gradient(90deg, rgba(100, 85, 70, 0.08) 0.5px, transparent 0.5px);
    background-size:
        12px 12px, 14px 14px,
        16px 16px, 18px 18px,
        22px 22px, 26px 26px,
        8px 8px, 10px 10px, 11px 11px, 13px 13px,
        0.8px 0.8px, 0.8px 0.8px;
    background-position:
        0 0, 7px 7px,
        3px 10px, 11px 3px,
        1px 15px, 15px 1px,
        2px 5px, 6px 1px, 9px 8px, 4px 11px,
        0 0, 0 0;
    z-index: 1050;
    box-shadow: -3px 0 10px rgba(50, 50, 50, 0.15);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    visibility: hidden;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--color-border);
}

.mobile-menu-overlay.is-open {
    transform: translateX(0);
    visibility: visible;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
    pointer-events: none;
}

body.mobile-menu-active::before {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

body.mobile-menu-active {
    overflow: hidden;
}

/* --- Mobile Menu Header --- */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    height: auto;
    min-height: 40px;
    background-color: var(--color-header-bg);
    /* Header texture */
    background-image:
        /* Darkest, tiniest pinpricks */
        radial-gradient(circle at 5% 95%, rgba(200, 190, 180, 0.30) 0px, transparent 0.8px),
        radial-gradient(circle at 95% 5%, rgba(200, 190, 180, 0.29) 0px, transparent 1px),
        /* Medium dark, small specks */
        radial-gradient(circle at 35% 65%, rgba(180, 170, 160, 0.27) 0px, transparent 1.2px),
        radial-gradient(circle at 65% 35%, rgba(180, 170, 160, 0.26) 0px, transparent 1.5px),
        /* Lighter, slightly larger subtle spots */
        radial-gradient(circle at 50% 20%, rgba(160, 150, 140, 0.23) 0px, transparent 2.5px),
        radial-gradient(circle at 20% 50%, rgba(160, 150, 140, 0.22) 0px, transparent 3px),
        /* Sharp, fine multi-angle cracks */
        linear-gradient(165deg, transparent 49.8%, rgba(170, 160, 150, 0.25) 50%, transparent 50.2%),
        linear-gradient(15deg, transparent 49.7%, rgba(170, 160, 150, 0.24) 50%, transparent 50.3%),
        linear-gradient(120deg, transparent 49.9%, rgba(150, 140, 130, 0.23) 50%, transparent 50.1%),
        linear-gradient(60deg, transparent 49.8%, rgba(150, 140, 130, 0.22) 50%, transparent 50.2%),
        /* Ultra-fine base noise */
        linear-gradient(rgba(140, 130, 120, 0.23) 0.5px, transparent 0.5px),
        linear-gradient(90deg, rgba(140, 130, 120, 0.23) 0.5px, transparent 0.5px);
    background-size:
        12px 12px, 14px 14px,
        16px 16px, 18px 18px,
        22px 22px, 26px 26px,
        8px 8px, 10px 10px, 11px 11px, 13px 13px,
        0.8px 0.8px, 0.8px 0.8px;
    background-position:
        0 0, 7px 7px,
        3px 10px, 11px 3px,
        1px 15px, 15px 1px,
        2px 5px, 6px 1px, 9px 8px, 4px 11px,
        0 0, 0 0;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    color: #ffffff;
}

.mobile-menu-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 2rem;
    line-height: 1;
    padding: 8px;
    margin-right: -8px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.mobile-menu-close:hover {
    opacity: 1;
}


.mobile-menu-content {
    padding: 15px 15px 40px 15px;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-sidebar-bg);
    box-sizing: border-box;
}

.mobile-menu-content::-webkit-scrollbar {
    width: 8px;
}

.mobile-menu-content::-webkit-scrollbar-track {
    background: var(--color-sidebar-bg);
}

.mobile-menu-content::-webkit-scrollbar-thumb {
    background-color: var(--color-border);
    border-radius: 4px;
}

.mobile-menu-content .left-menu-section {
    margin-bottom: 8px;
}

.mobile-menu-content .left-menu-section:last-child {
    margin-bottom: 0;
}

.mobile-menu-content .left-menu1 {
    padding: 8px 0 8px 28px;
    font-size: 0.95rem;
    border-radius: 0;
    border-bottom-width: 1px;
}

.mobile-menu-content .left-menu1.collapsible-heading::before {
    left: 10px;
    font-size: 0.8em;
    top: 55%;
}

.mobile-menu-content .left-menu-section.is-closed .left-menu1 {
    border-bottom-color: var(--color-border);
}

.mobile-menu-content .left-menu-subheading {
    padding: 6px 0 2px 15px;
    font-size: 0.8rem;
    margin-top: 8px;
    border-bottom: 1px dashed var(--color-border);
    font-weight: 600;
    color: var(--color-heading);
}

.mobile-menu-content .left-menu-section>.left-menu-subheading:first-of-type {
    margin-top: 5px;
}

.mobile-menu-content .left-menu2 {
    padding: 7px 15px;
    font-size: 0.88rem;
    border-radius: 3px;
    margin-bottom: 3px;
    background-color: var(--color-side-link-bg);
    color: var(--color-side-menu-link-text);
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, font-weight 0.1s ease;
}

.mobile-menu-content .left-menu-section>a:hover .left-menu2 {
    background-color: var(--color-side-link-hover-bg);
    font-weight: bold;
    border: 1px solid transparent;
}

.mobile-menu-content .left-menu2.is-current {
    background-color: var(--color-accent);
    color: var(--color-pagetop-icon-new);
    font-weight: bold;
    border: 1px solid var(--color-accent);
}

.mobile-menu-content .left-menu-section>a:hover .left-menu2.is-current {
    color: var(--color-side-menu-link-text);
}

@media (max-width: 768px) {
    .hamburger-button {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-menu-overlay {
        transition: none;
        transform: translateX(100%);
        visibility: hidden;
    }

    body.mobile-menu-active {
        overflow: auto;
    }

    .hamburger-button {
        display: none;
    }
}

/* Advice Box */
.advice-range {
    margin: 1.8em 0;
}

.advice-range .border-box.inner {
    background-color: var(--color-toc-bg, #fbf7f2);
    border: 2px solid var(--color-border, #9c8a78);
    border-left: 6px solid var(--color-accent, #c89f76);
    border-radius: 4px;
    padding: 18px 22px;
    box-shadow: 0 2px 5px rgba(107, 90, 72, 0.08);
    position: relative;
}

.advice-range .advice-header {
    color: var(--color-heading, #5c4d3e);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.6em 0;
    padding-bottom: 0.4em;
    border-bottom: 1px dashed var(--color-border, #9c8a78);
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.advice-range .advice-header::before {
    content: "\1F4A1";
    /* Use Unicode escape sequence for light bulb */
    margin-right: 0.6em;
    font-size: 1.1em;
    display: inline-block;
    line-height: 1;
}

.advice-range .advice {
    color: var(--color-text, #3e352e);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .advice-range .border-box.inner {
        padding: 15px 18px;
        border-width: 1px;
        border-left-width: 5px;
    }

    .advice-range .advice-header {
        font-size: 1rem;
    }

    .advice-range .advice-header::before {
        font-size: 1em;
        margin-right: 0.5em;
    }

    .advice-range .advice {
        font-size: 0.9rem;
    }
}


.story-container {
    counter-reset: story-counter;
    /* Initialize the counter */
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.story {
    position: relative;
    margin-bottom: 1.0rem;
    /* Changed bottom margin */
    padding: 55px 20px 20px 20px;
    /* Increased top padding for label, added other padding */
    background-color: #f5f5f5;
    /* Light gray background */
    border-radius: 8px;
    /* Rounded corners */
    /* Removed border-left */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for separation */
}

.story::before {
    counter-increment: story-counter;
    /* Use renamed counter */
    content: "STEP:"counter(story-counter);
    /* Display "STEP:X" */
    position: absolute;
    left: 20px;
    /* Position inside the padding */
    top: 15px;
    /* Position inside the top padding */
    /* Pale wasteland theme colors */
    background-color: var(--color-side-link-bg);
    /* Lighter beige background */
    color: var(--color-heading);
    /* Darker brown text */
    border: 1px solid var(--color-border);
    /* Subtle border */
    font-weight: 600;
    /* Slightly less bold */
    font-size: 0.85rem;
    padding: 4px 12px;
    /* Adjusted padding */
    border-radius: 15px;
    /* Pill shape */
    line-height: 1.4;
    display: inline-block;
    /* Keep it inline-block for pill shape */
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
}

/* Adjust paragraph margin within the step */
.story p {
    margin: 0;
    /* Reset paragraph margin */
    line-height: 1.8;
}

/* Add a slightly longer paragraph to test wrapping */
.story.long-text-test p {
    line-height: 1.8;
    /* Slightly increase line height for readability */
}

.red {
    color: #FF0033;
}

.deep_red {
    color: rgb(196, 100, 56);
}

.green {
    color: rgb(65, 168, 95);
}

.blue {
    color: #64B5F6;

}

.deep_blue {
    color: rgb(42, 128, 199);
}

.purple {
    color: rgb(175 79 255);
}

.yellow {
    color: #FFC107;

}

.white {
    color: #ebe0e0;

}

.black {
    color: #0c0d0ed8;

}

.center {
    text-align: center;
}

/* Ensure <p> tags inside standard tables inherit font size */
.table-container>table td p,
.data-table-container .table-standard-responsive td p {
    font-size: inherit;
    /* Inherit font size from the table cell */
}

/* Ensure <p class="list"> inside .database_01_value inherits font size */
.database_01_entry .database_01_value p.list {
    font-size: inherit;
    /* Inherit font size from the .database_01_value */
    /* Reset other .list styles if necessary, e.g., margin, padding */
    /* margin-bottom: 0.5em; */
    /* Example: Keep original margin */
    /* padding-left: 1em; */
    /* Example: Keep original padding */
}

/* Ensure <p class="list"> inside .database_01_value inherits font size */
.database_01_entry .database_01_value p.list {
    font-size: inherit;
    /* Inherit font size from the .database_01_value */
    /* Reset other .list styles if necessary, e.g., margin, padding */
    /* margin-bottom: 0.5em; /* Example: Keep original margin */
    /* padding-left: 1em; /* Example: Keep original padding */
}


.location_link_container {
    background: linear-gradient(145deg, #f5f0eb, #ebe6e0);
    /* 非常に薄いベージュ系のグラデーション */
    border: 1px solid #d8d0c8;
    /* 非常に薄い、落ち着いた色 */
    border-radius: 8px;
    /* 角を丸くする */
    margin-bottom: 10px;
    /* リンク間のスペース */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* 影をさらに控えめに */
    overflow: hidden;
    /* 角丸とホバー効果のため */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* スムーズなトランジション */
}

.location_link_container:hover {
    transform: translateY(-3px);
    /* ホバー時の移動量をさらに控えめに */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    /* 影を少し濃くするが、視認性を損なわない程度に */
    background: linear-gradient(145deg, #e0d8d0, #d0c8c0);
    /* ホバー時に背景をわずかに濃くする */
    border-color: #c0b8b0;
    /* ホバー時にボーダーをわずかに濃くする */
}

.location_link_item {
    display: block;
    /* aタグをブロック要素にする */
    padding: 4px 15px;
    /* 内側の余白 */
    text-decoration: none;
    /* 下線をなくす */
    color: #5C4D3E !important;
    /* 指定された色に変更 */
    font-weight: normal;
    /* 太字に戻し、視認性を向上 */
    font-size: 0.9rem;
    /* 少し小さくして、落ち着いた印象に */
    letter-spacing: 0.02em;
    /* 文字間隔を少し開ける */
}

/* スマートフォン向け最適化 */
@media (max-width: 768px) {
    .location_link_item {
        padding: 4px 15px;
        /* スマホでのパディングを調整 */
        font-size: 0.9rem;
        /* スマホでのフォントサイズを調整 */
    }

    .location_link_container {
        margin-bottom: 10px;
        /* スマホでのマージンを調整 */
    }
}
