/* --- 1. 基本設定 --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ページ全体で横スクロールを禁止しつつ、背景を黒で統一 */
html { overflow-x: hidden; background-color: #111; }
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif;
    line-height: 1.8; color: #333; min-height: 100vh; font-size: 16px;
    display: flex; flex-direction: column; background-color: #111;
}

/* --- 2. レイアウト全体 --- */
.site-wrapper { 
    display: flex; 
    flex: 1; 
    background-color: #111; /* ラッパー自体を黒にすることでサイドバーの途切れを防止 */
}

/* --- 3. サイドバー (Black) --- */
.sidebar {
    width: 280px; background-color: #111; color: #fff;
    /* 記事が長くてもサイドバーの黒を底まで伸ばす設定 */
    min-height: 100vh;
    position: sticky; top: 0;
    padding: 40px 0; overflow-y: auto; flex-shrink: 0; z-index: 1000;
}
.sidebar .logo { font-weight: bold; font-size: 1.0rem; letter-spacing: 0.2em; padding: 0 25px; margin-bottom: 40px; display: block; color: #fff; text-decoration: none; }
.sidebar nav details { border-bottom: 1px solid #222; }
.sidebar nav summary { cursor: pointer; padding: 15px 25px; font-size: 0.75rem; color: #aaa; list-style: none; text-transform: uppercase; outline: none; position: relative; }
.sidebar nav summary::after { content: '+'; position: absolute; right: 25px; color: #444; }
.sidebar nav details[open] summary::after { content: '-'; }
.sidebar nav ul { list-style: none; background: #181818; padding: 10px 0; }
.sidebar nav ul li a { color: #888; text-decoration: none; font-size: 0.85rem; display: block; padding: 8px 25px; }
.sidebar nav ul li a.active { color: #fff; font-weight: bold; background: #222; border-left: 4px solid #fff; padding-left: 21px; }

/* --- 4. メインエリア --- */
.main-area { 
    flex: 1; display: flex; flex-direction: column; min-width: 0; 
    position: relative; background-color: #fff; /* コンテンツのみ白 */
}

/* 巨大透かし画像：PC配置 */
.main-area::after {
    content: ""; position: fixed; top: 50%; left: 100%; transform: translate(-50%, -50%);
    width: 1500px; height: 1500px; background-image: url('/logo/cs_logo_bk.png');
    background-repeat: no-repeat; background-position: center; background-size: contain;
    opacity: 0.05; z-index: 1; pointer-events: none;
}

.lang-nav { position: relative; z-index: 10; padding: 20px 40px; font-size: 0.8rem; letter-spacing: 0.1em; text-align: right; }
.lang-nav a { text-decoration: none; color: #888; }
.lang-nav a.active { color: #111; font-weight: bold; }

.content-container { flex: 1; display: flex; justify-content: center; position: relative; z-index: 5; }
article { width: 100%; max-width: 800px; padding: 20px 40px 80px; }

/* コンテンツモジュール復元 */
h1 { font-size: 2.0rem; margin-bottom: 50px; font-weight: 400; border-bottom: 1px solid #555; padding-bottom: 10px; }
h2 { font-size: 1.5rem; margin: 60px 0 30px; padding-bottom: 10px; border-bottom: 2px solid #111; }
h3 { font-size: 1.2rem; margin: 40px 0 20px; padding-left: 15px; border-left: 4px solid #111; }
h4 { font-size: 1.05rem; margin: 30px 0 15px;  font-weight: bold;  color: #333; border-bottom: 1px dotted #ccc; padding-bottom: 5px; }

p { margin-bottom: 25px; }
.box-definition { border: 1px solid #ddd; border-left: 8px solid #111; padding: 30px; margin: 40px 0; background: rgba(250, 250, 250, 0.8); }
.alert-note { border-left: 4px solid #b22222; padding: 15px 20px; margin: 30px 0; background: rgba(255, 245, 245, 0.8); }
.alert-note b { color: #b22222; display: block; font-size: 0.8rem; margin-bottom: 5px; }
.alert-warning { border-left: 4px solid #c47c00; padding: 15px 20px; margin: 30px 0; background: rgba(255, 251, 235, 0.9); }
.alert-warning b { color: #c47c00; display: block; font-size: 0.8rem; margin-bottom: 5px;}
.alert-info { border-left: 4px solid #104e8b; padding: 15px 20px; margin: 30px 0; background: rgba(240, 248, 255, 0.8); }
.alert-info b { color: #104e8b; display: block; font-size: 0.8rem; margin-bottom: 5px; }
ol.logic-list { counter-reset: li; list-style: none; padding: 0; margin: 30px 0; }
ol.logic-list li { position: relative; margin-bottom: 15px; padding-left: 45px; }
ol.logic-list li::before {
    content: counter(li); counter-increment: li; position: absolute; left: 0; top: 2px;
    width: 28px; height: 28px; background: #111; color: #fff;
    display: flex; justify-content: center; align-items: center; font-size: 0.8rem;
}
ul.logic-list { list-style: none; padding: 0; margin: 30px 0; }
ul.logic-list li { position: relative; margin-bottom: 15px; padding-left: 45px; }
ul.logic-list li::before {
    content: "";
    position: absolute; left: 10px; top: 10px;
    width: 8px; height: 8px;
    background: #111;
    transform: rotate(0deg);
}


.breadcrumbs {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    
    /* 横並びにして両端に配置 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee; /* 境界線を引くとよりプロっぽくなります */
    padding-bottom: 10px;
}

.breadcrumbs a { color: #888; text-decoration: none; }
.breadcrumbs a:hover { color: #111; }

.update-date {
    font-family: monospace; /* 日付は等幅フォントにするとシステム感が出ます */
    color: #aaa;
}

/* スマホでは縦並びにする */
@media (max-width: 768px) {
    .breadcrumbs {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}


/* 記事内の画像設定 */
article img {
    max-width: 100%;    /* 親要素（article）の幅を超えないようにする */
    height: auto;       /* 横幅に合わせて高さを自動調整（比率を維持） */
    display: block;     /* 画像の下に謎の隙間ができるのを防ぐ */
    margin: 40px auto;  /* 上下に余白を作り、中央に配置する */
    border: 1px solid #fff; /* 必要に応じて：薄い枠線で清潔感を出す */
}

/* キャプション（画像下の説明文）がある場合 */
.image-container {
    margin: 40px 0;
    text-align: center;
}

.image-caption {
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
}


/* --- テーブルデザイン --- */
.logic-table-container {
    width: 100%;
    margin: 40px 0;
    overflow-x: auto; /* スマホで表がはみ出さないように */
}

.logic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
    border-top: 2px solid #111;
    border-bottom: 2px solid #111;
}

.logic-table th {
    background-color: #fafafa;
    color: #111;
    font-weight: bold;
    padding: 15px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.logic-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #444;
    vertical-align: top;
}

/* 1行おきに背景色を変えて読みやすくする */
.logic-table tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* スマホ表示でのフォント調整 */
@media (max-width: 768px) {
    .logic-table {
        font-size: 0.8rem;
    }
    .logic-table td, .logic-table th {
        padding: 10px;
    }
}








/* --- 5. 鉄壁のフッター (全幅) --- */
.site-footer { 
    background-color: #111; color: #444; padding: 60px 0; text-align: center; font-size: 0.75rem;
    width: 100%; position: relative; z-index: 1100;
}

/* モバイル対応 */
.mobile-header { display: none; background: #111; color: #fff; padding: 15px 20px; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 2000; }

@media (max-width: 768px) {
    .site-wrapper { flex-direction: column; }
    .mobile-header { display: flex; }
    .sidebar { position: fixed; top: 55px; left: 0; width: 100%; height: 0; padding: 0; overflow: hidden; opacity: 0; transition: 0.3s; z-index: 1500; }
    /*.sidebar.active { height: calc(100vh - 55px); opacity: 1; min-height: auto; }*/

.sidebar.active { 
        height: calc(100vh - 55px); /* ヘッダー分を引いた画面いっぱいの高さ */
        opacity: 1; 
        min-height: auto;
        overflow-y: auto;          /* 縦方向のスクロールを許可する（重要！） */
        -webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかにする */
        padding-bottom: 60px;      /* 一番下の項目が隠れないように余白を追加 */
        overscroll-behavior: contain;
    }

    article { padding: 20px; }
    .site-footer { width: 100%; }
    /* スマホ用巨大はみ出し設定 */
    .main-area::after { width: 1000px; height: 1000px; left: 100%; opacity: 0.04; }

.sidebar .logo { 
        display: none; 
    }

}
#menu-btn { background: transparent; border: 1px solid #444; color: #fff; padding: 5px 12px; cursor: pointer; font-size: 0.7rem; }

.site-footer {
    background-color: #111;
    color: #eee;
    padding: 60px 0;
    width: 100%;
    font-size: 0.85rem;
    margin-top: auto;
}

.footer-inner {
    padding: 0 40px;
    width: 100%;
    /* コンテナ自体を左寄せに固定 */
    display: block; 
}

/* リンク集：完全に縦並び */
.footer-links-section {
    text-align: left;
}

.footer-label {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: bold;
    display: block;
}

.footer-link-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    display: block; /* 横並びを防ぐ */
}

.footer-link-list li {
    margin-bottom: 2px; /* 縦の間隔を確保 */
    text-align: left;
}

.footer-link-list a {
    color: #eee;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
}

/* 水平線 */
.footer-divider {
    border: none;
    border-top: 1px solid #777;
    margin: 0 0 15px 0;
    width: 100%;
}

/* 下段：サイト名とコピーライトの左右振り分けのみFlexを使用 */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-site-name {
    color: #fff;
    font-weight: bold;
    letter-spacing: 0.1em;
}

.footer-meta {
    font-size: 0.85rem;
    display: flex;
    column-gap: 30px;
    /* --- ここから追加 --- */
    flex-wrap: wrap;           /* 折り返しを許可する */
    justify-content: flex-end; /* 右側に寄せる（必要に応じて） */
}

.copyright {
    flex-basis: 100%;          /* 幅を100%にして強制改行させる */
    text-align: right;         /* 右寄せにする */
    margin-top: 1px;         /* gapの影響で空きすぎる場合、ここで調整 */
}

/* スマホ対応 */
@media (max-width: 768px) {
    .footer-inner { padding: 0 20px; }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .footer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}











       /* ① ボタンの見た目と位置の設定 */
        .totop-btn {
            position: fixed;        /* 画面に対して固定 */
            bottom: 30px;           /* 画面下から30px */
            right: 30px;            /* 画面右から30px */
            width: 50px;            /* ボタンの幅 */
            height: 50px;           /* ボタンの高さ */
            background-color: #007bff; /* ボタンの色（青） */
            color: white;           /* 矢印の色（白） */
            border: none;           /* 枠線なし */
            border-radius: 50%;     /* 丸いボタンにする */
            font-size: 20px;        /* 矢印の大きさ */
            cursor: pointer;        /* マウスを乗せたらポインターにする */
            box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* 軽い影をつける */

               z-index: 9999; 

            /* アニメーション用の設定 */
            opacity: 0;             /* 最初は透明（非表示） */
            visibility: hidden;     /* クリックもできない状態にする */
            transition: opacity 0.3s, visibility 0.3s; /* ふわっと変化させる */
        }

        /* ② JavaScriptで「.is-show」クラスがついた時の設定 */
        .totop-btn.is-show {
            opacity: 1;             /* くっきり表示する */
            visibility: visible;    /* クリックできるようにする */
        }

        /* ボタンにマウスを乗せた時の効果 */
        .totop-btn:hover {
            background-color: #0056b3; /* 少し濃い青にする */
        }




  .glossary-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 10px 0;
  }

  .glossary-block {
    border: 1px solid #111;
    padding: 15px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
  }

  /* 用語：下線を完全に消去 */
  .term-title {
    margin: 0 0 0 0;
    font-size: 1.2rem;
    font-weight: bold;
    border: none !important;
  }

  /* 概要 */
  .term-description {
    margin: 0;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.6;
    padding-bottom: 10px; /* カテゴリとの余白 */
  }

  /* カテゴリ：右下配置 ＋ リンク */
  .block-footer {
    display: flex;
    justify-content: flex-end;
  }
  .category-link {
    font-size: 0.7rem;
    background: #111;
    color: #fff !important;
    padding: 3px 10px;
    font-weight: bold;
    text-transform: uppercase;
    transition: opacity 0.2s;
  }
  .category-link:hover {
    opacity: 0.8;
  }







/* --- 記事一覧のコンテナ（必要に応じて） --- */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 40px 0;
}

/* --- ブログカード本体 --- */
.blog-card {
  display: flex;
  align-items: flex-start; /* 上揃え */
  gap: 20px;
  padding: 15px;
  background: #fff;
  border: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s;
}

.blog-card:hover {
  border-color: #111;
  transform: translateY(-2px);
}

/* --- 画像エリア（ここが重要） --- */
.blog-card__image {
  flex-shrink: 0; /* 画像を潰さない */
  width: 180px;   /* PCでのサイズ */
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f0f0f0;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 比率を維持して切り抜き */
  margin: 0; /* Layout側のarticle img設定をリセット */
}

/* --- コンテンツエリア --- */
.blog-card__content {
  flex: 1;
}

.blog-card__content time {
  display: block;
  font-size: 0.75rem;
  font-family: monospace;
  color: #888;
  margin-bottom: 5px;
}

.blog-card__content h3 {
  font-size: 1.0rem;
  margin: 0 0 10px 0; /* Layout側のh3の大きな余白をリセット */
  padding: 0;
  border: none;
  line-height: 1.2;
  color: #111;
}

.blog-card__content p {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
  /* 3行以上は省略する（モダンブラウザ対応） */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__footer {
  margin-top: auto;   /* 上に何があっても一番下へ */
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.category-tag {
  background-color: #eee;
  color: #666;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 2px 8px;
  text-transform: uppercase;
  border-radius: 2px;
}

/* --- レスポンシブ対応（構成を変えず、サイズだけ調整） --- */
@media (max-width: 768px) {
  .blog-card {
    gap: 15px;
    padding: 10px;
  }
  
  .blog-card__image {
    width: 100px; /* モバイルでは画像を一回り小さく */
  }

  .blog-card__content h3 {
    font-size: 0.95rem;
  }

  .blog-card__content p {
    display: none; /* スマホでは説明文を隠してタイトルと日付だけにするとスッキリします */
  }
}




  .faq-card-container {
    max-width: 800px;
    margin: 20px auto;
    /* フォント指定をより現代的に整理 */
    font-family: system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent; /* スマホのタップ色を消す */
  }

  .faq-card {
    background: #f9f9f9;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
  }

  summary {
    padding: 20px;
    cursor: pointer;
    display: flex;
    list-style: none;
    user-select: none; /* テキスト選択の誤爆防止 */
  }

  /* 矢印消去の徹底 */
  summary::-webkit-details-marker { display: none; }
  summary::marker { content: ""; } 

  /* キーボード操作時の視認性確保（マウス操作時は出ない） */
  summary:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: -2px;
    border-radius: 8px;
  }

  /* アイコンエリア：絶対に幅を維持 */
  .q-label, .a-label {
    flex: 0 0 40px; 
    display: flex;
    align-items: flex-start; /* 上揃えを保証 */
  }

  /* テキストエリア：禁則処理を最適化 */
  .q-text, .a-text {
    flex: 1;
    line-height: 1.6;
    padding-top: 2px;
    /* 日本語は綺麗に、英語はURLを突き抜けさせない */
    overflow-wrap: break-word; 
    word-break: normal; 
  }

  .q-text { font-weight: bold; color: #1a1a1a; }
  .a-text { font-weight: normal; }

  .icon-q, .icon-a {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    flex-shrink: 0;
  }

  .icon-q { background: #007bff; color: #fff; }
  .icon-a { background: #666; color: #fff; }

  .answer-content {
    padding: 0 20px 20px 20px;
    display: flex;
    color: #444;
    line-height: 1.7;
    /* 回答のフェードイン効果（任意） */
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .a-text a, .q-text a {
    color: #007bff;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
  }
  .a-text a:hover { opacity: 0.7; }

  .faq-card[open] {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  }


