/* 全体設定 */
body {

    position: absolute;
    background-color: #f0f0f0;
  font-family: "nos", sans-serif;
    /* 外側の余白をゼロにして、横幅がはみ出さないようにする */
    margin: 0;
  touch-action: manipulation; /* スマホ遅延対策 */
    color: #333;
    overflow-x: hidden; /* 横スクロールを念のため防止 */
      background-image: url("../img/hondana2.png");
  background-repeat: repeat;     /* ← タイル状に並べる */
  background-position: top left; /* ← 左上から開始 */
}
@font-face {
  font-family: "nos";
  src: url("../font/Saitamaar.ttf") format("truetype");
}
h2{
    margin: 0px;

}
.black-bar {
    grid-column: 1 / span 2; /* 左端から右端までぶち抜き */
    grid-row: 3;             /* 3行目に配置 */
    background-color: #000;  /* 真っ黒 */
    height: 80px;            /* 図形の高さ（お好みで調整してください） */
    width: 100%;
     /* 上の要素との隙間 */
}

/* バーが原因でスクロールが出るのを防ぐ */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
.container {
    display: grid;
    grid-template-columns: 250px 1fr; 
    /* 3行目にフッター用の auto を追加 */
    grid-template-rows: auto 1fr auto; 
    max-width: 100%;
    margin: 0;
    /* 画面の高さに合わせる場合は min-height: 100vh; を入れると下が埋まります */
    min-height: 100vh; 
}

/* 看板エリア */
.header-logo {
    grid-column: 1;
    grid-row: 1;
    /* 看板を左端に寄せるための調整 */
    display: flex;
    justify-content: flex-start;
}

.logo-img {
    max-width: 100%;
    height: auto;
    display: block; /* 画像下の謎の隙間を消す */
}

/* ジャンル選択 */
.genre-nav {
    margin-left: 80px;
    grid-column: 2;
    grid-row: 1;
    position: relative; /* 子要素の基準点にする */
    display: inline-block; /* 画像のサイズに合わせる */
}

/* 土台の画像（本棚など） */
.box-img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 画像の上に重ねるコンテナ */
.genre-btns-overlay {
    position: absolute;
top:106px;
left: 150px;
    transform: translate(-50%, -50%); /* 中央寄せ */
    display: flex;

    justify-content: center;
}

/* カテゴリボタンとしての画像 */
/* --- 前略 --- */

/* カテゴリボタンとしての画像 */
.genre-btn-img {
    cursor: pointer;
    width: auto;
    /* アニメーションを滑らかにする */

}

/* ホバーした時：少し下に沈む（y軸にプラス移動） */

/* 選択（active）中：少し上に浮き、赤い枠は消す */
.genre-btn-img.active {
    transform: translateY(5px);
    outline: none; /* 赤い囲みを削除 */
    /* 浮いている感を出すために少しドロップシャドウを付けても良いでしょう */
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.2));
}

/* ホバーかつ選択中の場合：浮いた状態を維持 */
.genre-btn-img.active:hover {
    transform: translateY(8px); 
}

/* --- 後略 --- */
/* キャラクターエリア */
.char-img {
    max-width: 400px;
}

.char-bubble {
    background: #fff;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 5px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.character-aside {
    grid-column: 1;
    grid-row: 2;
    text-align: left; /* 左寄せ */
}

.char-img {
margin-top: 15px;
    max-width: 100%; /* 親要素の250pxからはみ出さないように調整 */
    height: auto;
    display: block;
}

/* 漫画一覧 */
/* 漫画一覧の親要素 */
/* 漫画一覧を表示する「箱」の設定 */
/* --- 漫画一覧を表示する「箱」の固定設定 --- */
.comic-main {
    grid-column: 2;
    grid-row: 2;
    background: #fff;
    border: 3px double #666;
    border-radius: 20px;
    /* 1. 箱の高さを固定（PC/スマホ共通の基準） */
    height: 470px; 
    padding: 20px;
    padding-top: 0px;
    
    /* 2. 枠内スクロールを有効にする */
    overflow-y: auto;
    overflow-x: hidden;

    /* スクロールバーを細くしてデザインを邪魔しないようにする */

}

/* --- グリッド（中の並び方） --- */
.comic-grid {
    display: grid;
    /* デフォルト（PC）は4列 */
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px;
    align-content: start;
}

/* --- スマホ向けのレスポンシブ対応 --- */
@media screen and (max-width: 768px) {
    /* コンテナの横並びを維持、または調整 */
    .container {
        grid-template-columns: 100px 1fr; /* スマホではキャラ列を少し狭くしてメインを広く */
        gap: 10px;
    }

    /* 3. スマホでは4列だと小さすぎるため、2列に変更 */
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* キャラクター画像もスマホサイズに合わせて縮小 */
    .char-img {
        margin-top: 20px;
    }
}

/* --- カード自体の上下幅を小さくする設定 --- */
.comic-card {
    border: 3px double #000000;
    padding: 2px;
    text-align: center;
    background: #fff;
}

.thumb-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comic-title {
    font-size: 0.8rem;
    line-height: 1.2;
    padding: 2px 0;
}

/* ジャンル切り替え時に非表示にするためのクラス */
.comic-card.hide {
    display: none;
}
.comic-card:hover {

    border-color: #f00;
}

.thumb-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #eee;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
/* 漫画カードを並べるグリッドの設定 */
.comic-grid {
    display: grid;
    /* 1列の幅を均等(1fr)にして、4列(repeat(4, ...))作成する */
    grid-template-columns: repeat(4, 1fr); 

}

/* 念のため、カード内の画像がはみ出さないように設定 */
.thumb-placeholder img {
    max-width: 100%;
    height: auto;
    display: block;
}
  ::-webkit-scrollbar {
    width: 16px; /* 当時の標準的な太さ */
  }

  /* 2. 背景（トラック）部分：Windows 95/98風の点々模様を再現 */
  ::-webkit-scrollbar-track {
    background-color: #eee;
    background-image: radial-gradient(#ccc 1px, transparent 1px);
    background-size: 2px 2px;
  }

  /* 3. 動くバー（つまみ）部分：立体的なグレーのボタン風 */
  ::-webkit-scrollbar-thumb {
    background-color: #c0c0c0;
    border: 2px solid;
    /* 上と左を白、下と右を濃いグレーにして立体感を出す（outset効果） */
    border-color: #fff #808080 #808080 #fff;
  }

  /* 4. つまみをホバーした時 */
  ::-webkit-scrollbar-thumb:hover {
    background-color: #d0d0d0;
  }

  /* 5. 上下のボタン（矢印部分）※ブラウザにより表示が異なります */
  ::-webkit-scrollbar-button {
    background-color: #c0c0c0;
    width: 16px;
    height: 16px;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    display: block;
  }
  /* カード内のリンク設定 */
/* カード内のリンクを黒文字・下線なしにする */
.comic-card a {

    color: #0015ff;
    display: block; /* カード全体をクリック可能にする */
}

/* 画像が枠に綺麗に収まるようにする */
.thumb-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 比率を保ったまま枠いっぱいに表示 */
    display: block;
}

/* マウスを乗せた時の動き */
.comic-card:hover {
    background-color: #fffafa; /* ほんのり赤みのある白 */
}
/* コミック一覧下の画像エリアの設定 */
.bottom-img {
    position: absolute;
    left: 270px;
    top: 700px;
    
    /* z-indexをtzxより小さくして、背面へ送る */
    z-index: 5; 
    
    display: block;
    max-width: 100%;
    height: auto;
}
/* 既存の .bottom-img の設定を以下に書き換え、または修正 */

.bottom-img {
    /* absoluteを削除して、通常の配置に戻す */
    display: block;
    max-width: 100%;   /* 親の幅（一覧の幅）に合わせる */
    height: auto;
}

/* スマホ用の調整 */
        .setumei {
            display: flex;
            border-bottom: 3px #333 dotted;

            margin: 30px;
            margin-top: 10px;
            margin-bottom: 10px;
        } 
        
        .textbox {
            display: flex;
            flex-direction: column;
            justify-content: space-between;

            line-height: 1.6;
            color: #555;
        }

        .link-row {
            display: flex;
            align-items: center;
            margin-top: 20px;
        }
.tzx {
    position: absolute;
    /* 画像と重なる位置に調整（数値は適宜微調整してください） */
    top: 710px; 
    left: 350px;
    
    /* レイヤーの重なり順を画像より上にする */
    z-index: 10; 
    font-size: 13px;
 
    padding: 5px 10px;
    border-radius: 5px;
}
p{
    margin: 0px;
    font-size: 14px;
}
/* --- 1. ホバー時の拡大を中止し、背景色変更のみにする --- */
.comic-card:hover {
    /* transform: scale(1.05);  ←これを削除 */
    border-color: #f00;
    background-color: #fffafa;
}

/* --- 2. setumeiエリアのドット線を復活させ、余計な装飾を消す --- */
.setumei.comic-card {
    display: flex;
    border: none; /* comic-cardの枠線を消す */
    border-bottom: 3px #333 dotted !important; /* 強制的にドット線を表示 */
    background: transparent !important; /* 背景を透明にする */
    margin: 30px 30px 10px 30px;
    padding: 10px 0;
    border-radius: 0; /* 角丸をリセット */
    grid-column: 1 / -1; /* グリッド内で横いっぱいに広げる */
}

/* ジャンル切り替え時に非表示にする設定 */
.setumei.hide {
    display: none !important;
}

.textbox {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    line-height: 1.6;
    color: #555;

}

/* CSSの最後に「}」が余分についていたら削除してください */
/* --- 1. 全体的なホバー演出の整理 --- */
/* 漫画カード（リンク付きのもの）だけホバーで色を変える */
.comic-card:not(h2):not(.setumei):hover {
    border-color: #f00;
    background-color: #fffafa;
    transform: none !important; /* 拡大は完全に無効 */
}

/* --- 2. タイトル(h2)の完全固定（ボーダー・ホバーなし） --- */
h2.comic-card {
    grid-column: 1 / -1;       /* 横いっぱいに表示 */
    background: transparent !important;
    border: none !important;    /* 枠線を消す */
    border-bottom: none !important; /* ドットの下線も消す */
    margin: 20px 0 0 0;
    padding: 0;
    text-align: center;
    pointer-events: none;       /* マウス反応自体を無効化 */
}

/* --- 3. 作品説明(setumei)の設定 --- */
.setumei.comic-card {
    grid-column: 1 / -1;
    display: flex;
    border: none !important;
    border-bottom: 3px #333 dotted !important; /* 説明文の下にはドット線を維持 */
    background: transparent !important;
    margin: 10px 30px 20px 30px;
    padding-bottom: 10px;
    border-radius: 0;
}
/* 説明文もホバーで反応しないようにする */
.setumei.comic-card:hover {
    background-color: transparent !important;
    border-color: transparent !important;
}
/* --- 1. 漫画カード（リンク）だけホバー反応させる --- */
/* h2（タイトル）と .setumei（説明）を除外します */
.comic-card:not(h2):not(.setumei):hover {
    border-color: #f00 !important;
    background-color: #fffafa !important;
    transform: none !important;
}

/* --- 2. 説明エリア（setumei）のホバーを無効化し、ドット線を維持 --- */
.setumei.comic-card:hover {
    /* ホバーしても枠線や背景を変えない */
    border: none !important;
    border-bottom: 3px #333 dotted !important; /* ドット線を強制維持 */
    background-color: transparent !important;
}

/* --- 3. 説明エリア自体の基本スタイル（再確認） --- */
.setumei.comic-card {
    grid-column: 1 / -1;
    display: flex;
    border: none !important;
    border-bottom: 3px #333 dotted !important;
    background: transparent !important;
    margin: 10px 20px 20px 10px;
    padding-bottom: 10px;
    border-radius: 0;
}
.hukidasi{
    position: absolute;
    top: 170px;
    opacity: 0.9;
}
.cp7{
    position: absolute;
    top: 210px;
    font-size: 16px;
    left: 60px;
}
.cp8{
    position: absolute;
    top: 540px;
    font-size: 16px;
    left: 60px;
}
/* PCサイズの時の案内キャラの最大幅を調整（お好みで数値を変えてください） */
/* --- style.css の一番下をこれに差し替え --- */

/* 共通：案内キャラの基本設定 */
/* --- style.css の末尾付近 --- */

/* 共通：案内キャラの基本設定 */
.char-img {
    margin-top: 15px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* ウィンドウの高さが 700px 以上になった時のスタイル調整 */
@media screen and (min-height: 700px) {
    .char-img {
        max-width: 250px; 
        margin-left: auto;
        margin-right: auto;
    }
}
/* --- ウィンドウの高さが 800px 以上になった時の調整 --- */
@media screen and (min-height: 790px) {
    /* 1. 案内キャラのサイズ調整 */
    .char-img {
        max-width: 250px; 
        margin-left: auto;
        margin-right: auto;
    }

    /* 2. 漫画表示エリアの高さを広げる */
    .comic-main {
        height: 570px; 
    }

    /* 3. 背景画像(cp5.png)の位置を下へ移動 */
    .bottom-img {
        top: 830px; /* 700px から 800px へ */
    }

    /* 4. クレジット(tzx)の位置を下へ移動 */
    .tzx {
        top: 840px; /* 710px から 810px へ */
    }
}
/* style.css の末尾などに追加 */

/* サブメニューの土台 */
/* style.css の末尾に追加 */

.sub-menu-bar {
    position: absolute;
    top: 100px; 
    left: 30%; /* 親要素に対して中央に配置するためのベース */
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    
    /* 横並びを強制する設定 */
    display: flex !important; 
    flex-direction: row !important; /* 明示的に横方向を指定 */
    flex-wrap: nowrap;              /* 折り返しを禁止 */
    white-space: nowrap;            /* 文字の途中で改行させない */
    
    gap: 20px;       /* ボタン同士の間隔 */
    padding: 8px 20px; 
    border-radius: 20px;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none; 
    z-index: 100;
}
/* JSで .show がついた時だけ表示 */
.sub-menu-bar.show {
    opacity: 1;
    pointer-events: auto;
    top: 110px; /* 少し下にスライドしながら登場 */
}

/* style.css の末尾付近にある .sub-btn を修正 */
.sub-btn {
color: #fff;
    font-size: 16px;    /* 以前より少し大きく設定 */
    cursor: pointer;
    padding: 2px 5px;
    display: inline-block; /* 横並びに適した要素にする */
}

/* 選択中の下線が文字に近すぎる場合はここも調整 */
.sub-btn.active {
    color: #ff0;
    border-bottom: 2px solid #ff0; /* 下線を少し太くして視認性アップ */
    padding-bottom: 2px;
}
/* style.css の .comic-card.hide の部分を修正 */
.comic-card.hide {
    display: none !important;
}

/* 説明文エリアの設定 */
.setumei.comic-card {
    grid-column: 1 / -1;
    display: flex; /* 通常はフレックス */
    /* ... その他のスタイル ... */
}
/* ...（中略：bodyやcontainerの設定）... */

/* サブメニューの土台 */
.sub-menu-bar {
    position: absolute;
    top: 110px; 
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    display: flex !important;      /* 横並び */
    flex-direction: row !important; /* 横方向 */
    gap: 20px;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;           /* 改行防止 */
    opacity: 1;                    /* 最初から表示 */
    pointer-events: auto;
    z-index: 100;
}

.sub-btn {
    color: #fff;
    font-size: 16px; /* 文字を大きく */
    cursor: pointer;
    padding: 2px 5px;
    display: inline-block;
}

.sub-btn.active {
    color: #ff0;
    border-bottom: 2px solid #ff0;
}

/* ...（その他の既存スタイル）... */
/* --- style.css の .setumei 関連エリアを以下に差し替え --- */

/* 説明エリア（setumei）の基本スタイル */
.setumei.comic-card {
    grid-column: 1 / -1; /* 横幅いっぱい */
    display: flex;       /* フレックスボックスにする */
    
    /* ★ここが重要：中身を水平・垂直ともに中央に寄せる */
    justify-content: center; /* 水平方向の中央 */
    align-items: center;     /* 垂直方向の中央 */
    
    /* 装飾：ドット下線 */
    border: none !important;
    border-bottom: 3px #333 dotted !important;
    background: transparent !important;
    
    /* 余白の調整（左右を自動にして中央に配置） */
    margin: 10px auto 20px auto; 
    padding-bottom: 15px;
    border-radius: 0;
    
    /* 幅が広がりすぎないように設定（お好みで） */
    max-width: 90%; 
}

/* 説明文内のテキストボックス */
.textbox {
    display: flex;
    flex-direction: column;
    
    /* ★ここが重要：テキスト自体も中央揃えにする */
    text-align: center;      /* 行ごとの文字を中央に */
    align-items: center;     /* Flexアイテム（h2やp）を中央に */
    
    line-height: 1.8;        /* 行間を少し広くして読みやすく */
    color: #555;
}

/* テキストボックス内の要素の余白調整 */
.textbox h2 {
    margin-bottom: 10px;    /* タイトルと本文の間 */
}

.textbox p {
    margin-bottom: 5px;     /* 本文の行間 */
}

/* リンク行（設定資料はコチラ→） */
.link-row {
    display: flex;
    align-items: center;
    justify-content: center; /* リンク行自体も中央に */
    margin-top: 15px;
    gap: 10px;               /* 文字とリンクの間隔 */
}

/* 説明エリアのホバー無効化（既存のまま） */
.setumei.comic-card:hover {
    background-color: transparent !important;
    border-color: transparent !important;
}

/* 非表示設定（既存のまま） */
.setumei.hide {
    display: none !important;
}
/* --- style.css の .comic-card:hover と .setumei 関連エリアを以下に差し替え --- */

/* 1. 漫画カード（リンク）だけホバー反応させる */
/* ホバー時に枠線や背景を変える */
/* 重要：h2（タイトル）と .setumei（説明）は除外する */
.comic-card:not(h2):not(.setumei):hover {
    border-color: #f00 !important;
    background-color: #fffafa !important;
    transform: none !important;
}

/* 2. 説明エリア（setumei）のホバーを無効化し、ドット線を維持 */
/* マウスを乗せても（:hover）、枠線や背景を変えず、ドット線を強制的に維持する設定 */
.setumei.comic-card:hover {
    background-color: transparent !important;
    border-color: transparent !important;
    
    /* ★ここが重要：ホバー時もドット線を強制維持する */
    border-bottom: 3px #333 dotted !important; 
}

/* 3. 説明エリア（setumei）の基本スタイル（再確認） */
/* グリッド内で横いっぱいに表示し、中央に寄せる設定 */
.setumei.comic-card {
    grid-column: 1 / -1; 
    display: flex;
    justify-content: center;
    align-items: center;
    border: none !important;
    border-bottom: 3px #333 dotted !important; /* 初期状態のドット線 */
    background: transparent !important;
    margin: 10px auto 20px auto; 
    padding-bottom: 15px;
    border-radius: 0;
    max-width: 90%; 
}

/* 4. 説明文内のテキストボックス（中央寄せ・既存のまま） */
.textbox {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    line-height: 1.8;
    color: #555;
}

/* テキストボックス内の要素の余白調整 */
.textbox h2 {
    margin-bottom: 10px;
}

.textbox p {
    margin-bottom: 5px;
}

/* リンク行（設定資料はコチラ→・既存のまま） */
.link-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}

/* 非表示設定（既存のまま） */
.setumei.hide {
    display: none !important;
}
/* style.css の .sub-menu-bar 部分を差し替え */

.sub-menu-bar {
    position: absolute;
    top: 100px; 
    left: 30%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    
    display: flex !important; 
    flex-direction: row !important;
    gap: 20px;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 100;

    /* --- ここを変更：初期状態は隠す --- */
    opacity: 0;
    pointer-events: none; 
}

/* JSで .show がついた時だけ表示する */
.sub-menu-bar.show {
    opacity: 1;
    pointer-events: auto;
    top: 110px; /* 少しふわっと浮き出る演出 */
}