/* Google Fontsから日本語フォントをインポート */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;600;700&family=Noto+Sans+JP:wght@400;500&display=swap');

/* --- 変数定義 --- */
:root {
    /* フォントファミリー */
    --font-serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'HiraMinProN-W6', serif;
    --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;

    /* カラーパレット */
    --color-bg: #5C2626;
    --color-bg-gradient: linear-gradient(180deg, #4A1C1C 0%, #5C2626 30%, #6B2F2F 70%, #5C2626 100%);
    --color-text-dark: #3E2323;
    --color-text-light: #F5E6E6;
    --color-text-muted: #D4C4C4;

    --color-accent-gold: #D4AF37;
    --color-accent-gold-dark: #B8860B;
    --color-accent-red: #CD5C5C;
    --color-accent-red-dark: #8B0000;
    
    --color-parchment: #F4F1E8; /* 羊皮紙のような色 */
    --color-parchment-gradient: linear-gradient(145deg, #F4F1E8 0%, #F0EAD6 25%, #EDE6D3 50%, #F2EBDA 75%, #F4F1E8 100%);
}

/* --- グローバルスタイル & リセット --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg-gradient);
    color: var(--color-text-light);
    line-height: 1.7;
    letter-spacing: 0.03em;
    overflow-x: hidden;
    position: relative;
}

/* 背景にテクスチャを追加 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 25% 25%, rgba(92, 38, 38, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(74, 28, 28, 0.08) 0%, transparent 50%),
        linear-gradient(45deg, transparent 49%, rgba(107, 47, 47, 0.03) 50%, transparent 51%);
    pointer-events: none;
    z-index: -1;
}

/* --- レイアウト --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: block;
}

/* フェードインアニメーション */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- タイポグラフィ --- */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.main-title {
    font-size: 3rem;
    color: var(--color-text-light);
    text-shadow: 2px 2px 0px #6B2F2F, 4px 4px 8px rgba(0,0,0,0.4);
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 400;
}

.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-accent-red);
}

/* --- コンテンツボックス（羊皮紙スタイル） --- */
.content-box {
    margin: 1rem 0;
    padding: 2rem 2.5rem;
    background: var(--color-parchment-gradient);
    border: 3px solid var(--color-accent-gold);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 0 20px rgba(212, 175, 55, 0.1);
    position: relative;
    border-radius: 6px;
    color: var(--color-text-dark);
}

.content-box::before {
    content: '';
    position: absolute;
    top: -3px; /* ボーダーに合わせる */
    left: 2rem;
    right: 2rem;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-accent-gold), #FFD700, var(--color-accent-gold), transparent);
    border-radius: 2px;
}

/* --- ボタン --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.08em;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    width: 100%;
    text-align: center;
}

.btn i {
    margin-right: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
}

/* ホバー時の光沢エフェクト */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}
.btn:hover::before {
    left: 100%;
}

/* プライマリボタン（ゴールド系） */
.btn-primary {
    background: linear-gradient(135deg, var(--color-accent-gold), var(--color-accent-gold-dark), #DAA520);
    color: #2F2F2F;
    border-color: #FFD700;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #FFD700, #F0E68C, #FFED4A);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: #FFA500;
}

/* セカンダリボタン（レッド系） */
.btn-secondary {
    background: linear-gradient(135deg, var(--color-accent-red-dark), #A52A2A, #B22222);
    color: var(--color-text-light);
    border-color: var(--color-accent-red);
    box-shadow: 0 4px 16px rgba(139, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
    background: linear-gradient(135deg, #DC143C, #FF6347, #FF4500);
    border-color: #FF6347;
    box-shadow: 0 6px 24px rgba(139, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ニュートラルボタン（グレー系） */
.btn-neutral {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: var(--color-text-light);
    border-color: #88929b;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn-neutral:hover {
    background: linear-gradient(135deg, #88929b, #6c757d);
    border-color: #a7afb6;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.button-group .btn {
    width: auto;
    flex-grow: 1;
}


/* --- ページ個別スタイル --- */

/* トップページ */
#page-home .intro-text {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}
.choice-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.choice-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.choice-card {
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-text-light);
    border: 2px solid;
}
.choice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.choice-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.choice-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}
.choice-card.assign-card {
    background: linear-gradient(135deg, #6A5ACD, #483D8B);
    border-color: #9370DB;
}
.choice-card.list-card {
    background: linear-gradient(135deg, #B8860B, #8B4513);
    border-color: var(--color-accent-gold);
}

/* 割り振りページ */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-serif);
    font-weight: 600;
}
textarea.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 4px;
    border: 2px solid #ccc;
    background-color: #fdfaf2;
    color: var(--color-text-dark);
    font-family: var(--font-sans);
    line-height: 1.6;
    transition: border-color 0.2s;
    margin-bottom: 1rem;
}
textarea.form-control:focus {
    outline: none;
    border-color: var(--color-accent-gold);
}
#assign-results-container.hidden {
    display: none;
}
#assign-results-container {
    margin-top: 2rem;
}
#assign-results {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(0,0,0,0.1);
    border-radius: 4px;
}
#assign-results p {
    padding: 0.75rem;
    background: var(--color-parchment);
    border-left: 4px solid var(--color-accent-gold);
    border-radius: 2px;
    margin-bottom: 0.5rem;
}
#assign-results p:last-child {
    margin-bottom: 0;
}

/* キャラクター一覧ページ */
#character-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    #character-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.character-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 6px;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #B8860B, #8B4513);
    border: 2px solid var(--color-accent-gold);
}
.character-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}
.character-card i {
    font-size: 2.5rem;
    width: 50px;
    text-align: center;
}
.character-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}
.character-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 確認ページ */
#page-confirm .content-box {
    text-align: center;
}
#page-confirm .fa-exclamation-triangle {
    font-size: 4rem;
    color: #FFC107;
    margin-bottom: 1rem;
}
#confirm-character-name {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    color: var(--color-accent-gold);
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 2px solid var(--color-accent-gold);
    border-bottom: 2px solid var(--color-accent-gold);
}

/* キャラクターハブページ */
.hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    margin-bottom: 1.5rem;
}
.hub-header h2 {
    font-size: 2rem;
    color: var(--color-accent-gold);
    margin: 0;
}
.hub-header p {
    color: var(--color-text-muted);
    margin: 0;
}
.hub-header .btn {
    width: auto; /* ボタン幅を自動調整 */
    padding: 0.6rem 1.2rem;
}

/* タイマー */
.timer-section {
    padding: 1.2rem 1.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.timer-controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.timer-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--color-text-light);
}

.timer-settings {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.timer-settings input {
    width: 60px;
    text-align: center;
    font-size: 1rem;
    border-radius: 4px;
    border: none;
    padding: 0.5rem;
    background: #fdfaf2;
    color: var(--color-text-dark);
}

.timer-settings .btn {
    width: auto;
    padding: 0.5rem;
    font-size: 1rem;
    line-height: 1;
}

/* 調査項目のアコーディオン */
.info-section h3 {
    font-size: 1.5rem;
    padding: 1rem;
    background-color: rgba(62, 35, 35, 0.2);
    border-bottom: 1px solid var(--color-accent-gold);
    border-radius: 4px 4px 0 0;
}
.info-item {
    cursor: pointer;
    padding: 1rem;
    background: rgba(62, 35, 35, 0.1);
    border-bottom: 1px solid #dcd3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}
.info-item:hover {
    background: #dcd3b8;
}
.info-item i {
    transition: transform 0.3s ease;
}
/* 開いたときのアイコン回転 */
.info-item.open i {
    transform: rotate(180deg);
}
.info-content {
    display: none;
    padding: 1.5rem;
    border-left: 4px solid var(--color-accent-gold);
    background-color: #fdfaf2;
}
.info-content.open {
    display: block;
}

/* エンディングページ */
#page-ending ul {
    list-style-position: inside;
    padding-left: 1rem;
}
#page-ending ul li::marker {
    color: var(--color-accent-gold);
}

/* --- モーダルウィンドウ --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none; /* 初期状態は非表示 */
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.modal-overlay.active {
    display: flex; /* activeクラスで表示 */
}
.modal-content {
    max-width: 500px;
    width: 100%;
}
.modal-content .content-box {
    margin: 0;
}
.modal-content .btn {
    margin-top: 1rem;
}

/* --- ユーティリティ & スペーシング --- */
.text-center { text-align: center; }
.hidden { display: none !important; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }

.box-introduction {
    border: 4px double var(--color-accent-gold-dark);
    background: linear-gradient(160deg, #F8F5EC 0%, #F1EAD6 100%);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 
                inset 0 2px 3px rgba(255,255,255,0.8), 
                inset 0 -2px 5px rgba(212, 175, 55, 0.2);
    position: relative;
}

.box-introduction h3 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--color-accent-gold-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-accent-gold);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.content-box-neutral {
    border-color: #a7afb6; 
    background: linear-gradient(160deg, #f0f2f5 0%, #e6e9ed 100%);
    box-shadow: 0 6px 24px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.content-box-neutral h3 {
    border-bottom-color: #ccc;
}

.site-header {
    position: sticky; /* スクロールしても上部に追従させる */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 900; /* コンテンツより手前、モーダルより奥に配置 */
    padding: 0.75rem 0;
    background-color: rgba(42, 20, 20, 0.85); /* 背景色に少し透明度を持たせる */
    backdrop-filter: blur(4px); /* すりガラス効果 */
    border-bottom: 1px solid var(--color-accent-gold);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ヘッダー内のコンテナの左右の余白を調整 */
.site-header .container {
    padding: 0 2rem;
}

/* ヘッダー内のボタンのスタイル */
.btn-header {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--color-text-light);
    background: transparent;
    border: 1px solid var(--color-accent-gold);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-header:hover {
    background: var(--color-accent-gold);
    color: var(--color-text-dark);
    transform: scale(1.05);
}

.btn-header i {
    margin-right: 0.5rem;
}

.timer-explanation {
    flex-basis: 100%;
    text-align: center;
    padding: 0.75rem;
    background-color: rgba(0,0,0,0.2);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.timer-explanation p {
    margin: 0;
}

.timer-explanation i {
    margin-right: 0.5rem;
}

/* ===== フッター ===== */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.section-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-body {
    text-align: left;
}

.section-divider {
    border: 0;
    height: 1px;
    background: rgba(212, 175, 55, 0.5);
    margin: 2.5rem auto;
}

.section-body ol,
.section-body ul {
    padding-left: 2em;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.section-body ul ul,
.section-body ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* キャラクターハブページのヘッダー調整 */
.hub-header {
    flex-wrap: wrap;
}

/* 追加したボタングループのスタイル */
.hub-actions {
    display: flex;
    gap: 0.5rem;
    order: 1;
    flex-basis: 100%;
    justify-content: center;
}

@media (min-width: 768px) {
    .hub-actions {
        order: 0;
        flex-basis: auto;
    }
}

/* 小さいボタン用の汎用スタイル */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-sm i {
    margin-right: 0.4rem;
}

.modal-content {
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

#info-modal-body {
    overflow-y: auto;
    padding-right: 15px;
}

/* ===== 情報表示用サイドバー ===== */
.info-sidebar {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: rgba(42, 20, 20, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid var(--color-accent-gold);
    border-left: none;
    border-radius: 0 10px 10px 0;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 950;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: left 0.3s ease-in-out;
    display: none;
}

.info-sidebar.visible {
    display: flex;
}

.info-sidebar h4 {
    color: var(--color-text-light);
    font-family: var(--font-serif);
    text-align: center;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.5);
    font-size: 1.1rem;
}

.btn-sidebar {
    display: block;
    width: 100%;
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid var(--color-accent-gold);
    color: var(--color-text-light);
    border-radius: 5px;
    text-align: left;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
    cursor: pointer;
}

.btn-sidebar:hover {
    background: var(--color-accent-gold);
    color: var(--color-text-dark);
    transform: translateX(5px);
}

.btn-sidebar i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

@media (max-width: 1200px) {
    .info-sidebar {
        padding: 1rem 0.75rem;
    }
    .info-sidebar h4 {
        font-size: 1rem;
    }
    .btn-sidebar {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .info-sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 0;
        border-top: 1px solid var(--color-accent-gold);
        border-right: none;
        padding: 0.5rem;
        gap: 0.5rem;
    }
     .info-sidebar h4 {
        display: none;
    }
    .btn-sidebar {
        width: auto;
    }
}

/* ===== モーダルウィンドウのスクロール対応 ===== */
.modal-content .content-box {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: inherit;
    overflow: hidden;
}

#info-modal .modal-content {
    height: 85vh;
}

#info-modal-body {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 1rem;
}

/* ===== モーダル内の閉じるボタンの表示調整 ===== */
#info-modal-close-btn {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

/* モーダル表示中の背景スクロールを禁止するクラス */
body.modal-open {
    overflow: hidden;
}

/*  注意事項の箇条書きインデント調整  */
#precautions-box ul {
    padding-left: 2.5em;
}

#precautions-box ul ul {
    padding-left: 2em;
}

.section-body p {
    margin-bottom: 1em;
}

/*  最後の議論 選択肢デザイン  */
.final-choice-section {
    margin-top: 1.5rem;
}

.final-choice-section h4 {
    text-align: center;
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ccc;
}

.choice-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.final-choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border-radius: 6px;
    background: linear-gradient(145deg, #fdfaf2, #f5f0e6);
    border: 3px solid #dcd3b8;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.final-choice-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-gold-dark);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.final-choice-card.selected {
    border-color: var(--color-accent-red);
    background: var(--color-accent-gold);
    color: var(--color-text-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) inset;
    transform: translateY(-2px);
}

.final-choice-card i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-dark);
}

.final-choice-card.selected i {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.final-choice-card span {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
}

/* 注意事項・はじめ方の箇条書きインデント調整 */
.content-box-neutral div ol,
.content-box-neutral div ul {
    padding-left: 1.5em;
}

.content-box-neutral div ul ul {
    padding-left: 1.5em;
}

/* --- スマートフォン向けの表示調整 --- */
@media (max-width: 768px) {

    /* 全体のフォントサイズと余白を調整 */
    body {
        font-size: 14px; /* 基本の文字サイズを少し小さくする */
        line-height: 1.6;
    }
    .container {
        padding: 1rem; /* コンテンツ全体の左右の余白を狭くする */
    }

    /* 各種タイトル・見出しのサイズを調整 */
    .main-title {
        font-size: 2rem;
    }
    .subtitle {
        font-size: 1rem;
    }
    .page-title {
        font-size: 1.8rem;
    }
    .content-box h3 {
        font-size: 1.3rem;
    }

    /* コンテンツボックスの余白を調整 */
    .content-box {
        padding: 1.5rem;
    }

    /* ボタンのサイズと余白を調整 */
    .btn {
        padding: 0.8rem 1rem; /* 上下の余白を少し広げ、左右を狭くする */
        font-size: 0.9rem;
    }

    .button-group {
        flex-direction: column; /* ボタンを縦に並べる */
        gap: 0.75rem;
    }

    /* タイマー表示のサイズを調整 */
    .timer-display {
        font-size: 2.5rem;
    }
    .timer-controls {
        gap: 1rem;
    }

    /* 最後の議論の選択肢の文字サイズを調整 */
    .final-choice-card span {
        font-size: 1rem;
    }
    /* --- タイマーボタンのはみ出し修正 --- */
    .timer-controls {
        flex-direction: column; /* 要素を縦に並べる */
        align-items: center;
        gap: 0.75rem;
    }
    .timer-settings {
        flex-wrap: wrap; /* ボタンが画面幅を超える場合に折り返す */
        justify-content: center;
        gap: 0.3rem;
    }
    .timer-settings .btn {
        padding: 0.5rem 0.7rem; /* ボタンを少し小さくする */
        font-size: 0.85rem;
    }
    .timer-settings input {
        width: 50px;
        padding: 0.5rem;
        font-size: 1rem;
    }
}

/* --- サイドバーの折り畳み機能（スマホ向け） --- */

/* サイドバーを開くためのトグルボタンのスタイル */
.sidebar-toggle-btn {
    display: block; /* スマホでのみ表示 */
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000; /* サイドバーより手前に表示 */
    background-color: rgba(42, 20, 20, 0.85);
    border: 1px solid var(--color-accent-gold);
    color: var(--color-text-light);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    cursor: pointer;
}

/* サイドバー本体の初期状態（画面外に隠す）とアニメーション */
.info-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px; /* サイドバーの幅を指定 */
    height: 100%;
    transform: translateX(-100%); /* 初期状態では左側に隠す */
    transition: transform 0.3s ease-in-out; /* スムーズに動かす */
    flex-direction: column; /* ボタンを縦に並べる */
    justify-content: flex-start;
    padding: 1rem;
    padding-top: 60px; /* トグルボタンと被らないように調整 */
    border-radius: 0;
    border-top: none;
    border-right: 1px solid var(--color-accent-gold);
    overflow-y: auto;
}

/* 'visible' クラスが付与された時のサイドバー（画面内に表示） */
.info-sidebar.visible {
    transform: translateX(0);
}

/* PCではトグルボタンを非表示にする */
@media (min-width: 769px) {
    .sidebar-toggle-btn {
        display: none;
    }
}

.content-box-neutral a {
    color: var(--color-text-dark);
    text-decoration: underline;
}

.content-box-neutral a:hover {
    color: var(--color-accent-gold-dark); 
}
