/* -------------------------------------- */
/* 基本設定 */
/* -------------------------------------- */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    margin: 0; 
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header, nav, main, footer {
    padding: 1rem;
    box-sizing: border-box; /* 崩れ防止 */
}

/* -------------------------------------- */
/* ヘッダー */
/* -------------------------------------- */
header {
    position: relative;
    width: 100%;
    height: 300px;
    background-image: url('sonota-image.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

/* ヘッダーの黒いフィルター（文字を見やすくする） */
header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

header h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin: 0;
    position: relative;
    z-index: 2;
}

/* -------------------------------------- */
/* メインコンテンツ */
/* -------------------------------------- */

article {
    background-color: #fff;
    padding: 2rem; /* 余白を少し広めに */
    margin-bottom: 1rem;
    border-radius: 5px;
    /* 修正: 文法エラーを直しました */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1); 
}

article h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #333; /* 見出しの下線 */
    padding-bottom: 5px;
    font-size: 1.5rem;
}

/* 本文用のスタイル（読みやすく調整） */
.novel-text {
    font-size: 1rem;
    line-height: 1.8; /* 行間を広めに */
    margin-bottom: 1.5rem;
}

/* -------------------------------------- */
/* フッター */
/* -------------------------------------- */
footer {
    background-color: #666;
    color: #fff;
    margin-top: 1rem;
    text-align: center;
    padding: 20px;
}


/* シンプル・ナビゲーションの設定 */
.simple-nav {
    width: 100%;
    border-bottom: 1px solid #eee; /* 非常に薄い線で区切り */
    padding: 10px 0;
    background-color: #fff;
}

.simple-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center; /* 中央に寄せる */
    flex-wrap: wrap; /* スマホで溢れたら改行 */
    gap: 15px; /* 項目間のほどよい距離 */
}

.simple-nav a {
    text-decoration: none;
    color: #666; /* 真っ黒ではなく、少し薄いグレーで主張を抑える */
    font-size: 0.9rem; /* 少し小さめ */
    transition: 0.3s;
}

.simple-nav a:hover {
    color: #000; /* マウスを乗せた時だけ少し濃くなる */
    text-decoration: underline;
}



footer{
background-color: #666;
color: #fff;
margin-top: @1rem;
text-align: center;
}

.footer-nav {
    width: 100%;
    color: #fff
    border-bottom: 1px solid #eee; /* 非常に薄い線で区切り */
    padding: 10px 0;
    background-color: #fff;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center; /* 中央に寄せる */
    flex-wrap: wrap; /* スマホで溢れたら改行 */
    gap: 15px; /* 項目間のほどよい距離 */
}

.footer-nav a {
    text-decoration: none;
    color: #666; /* 真っ黒ではなく、少し薄いグレーで主張を抑える */
    font-size: 0.9rem; /* 少し小さめ */
    transition: 0.3s;
}

.footer-nav a:hover {
    color: #000; /* マウスを乗せた時だけ少し濃くなる */
    text-decoration: underline;
}


 
.card-wrapper {

  display: flex;

  margin-bottom: 24px;


}

img {
width: 200px;
height: 150px;
}

.card {
  display: flex;
  background-color: #e0e0e0;
  flex-direction: column;
  width: 200px;
}

.card-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.card-text {
  flex-grow: 1;
}

.card-gap{
  width: 50px;
}

/* -------------------------------------- */
/* カテゴリリンクの修正 (Flexboxの機能を生かす) */
/* -------------------------------------- */
.category-links {
    display: flex;
    flex-wrap: wrap; 
    gap: 20px; 
    justify-content: center; 
    padding: 30px 0;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 幅を狭めて、1行に2つ並びやすくする (Flexboxの利点を生かす) */
    width: 240px; 
    height: 60px; 
    
    border: 3px solid #333; 
    border-radius: 30px; 
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    transition: background-color 0.3s;
}


/* ホバー時のデザイン（クリック誘導） */
.category-item:hover {
    background-color: #eee;
    color: #000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


/* -------------------------------------- */
/* スマホ対応 (レスポンシブ) */
/* -------------------------------------- */
@media screen and (max-width: 600px) {
    header {
        height: 200px; /* スマホでは高さを抑える */
    }

    header h1 {
        font-size: 1.8rem; /* 文字サイズを小さく */
    }

    article {
        padding: 1rem; /* スマホでは余白を狭く */
    }

 /* nav ul: 縦並びの親要素 */
    .footer-nav ul{
        flex-direction: column; /* リンクを縦に並べる（これが重要） */
        padding: 0; /* paddingをリセット */
        margin: 0;
    }

    /* nav li: 縦並びになったリストアイテム */
    .footer-nav li {
        width: 100%; /* 幅を画面いっぱいに広げる */
        text-align: center; /* テキストを中央寄せ */
        box-sizing: border-box; /* パディングを含めて幅100%にする */
    }

    /* nav li a: クリック可能なエリアを広げる */
    .footer-nav li a{
        display: block; /* リンクをブロック要素にして li の幅いっぱいに広げる */
        padding: 1rem 0; /* 上下のパディングを維持し、左右は0にする */
        margin-bottom: 0; /* margin-bottomをリセット */
    }


.card-wrapper {
  display: block;
  margin-bottom: 24px;

}

.card {
  display: block;
  background-color: #e0e0e0;
  margin:auto;
}

.card-content {

  flex-direction: column;

}

.card-text {
  flex-grow: 2;
}

.card-gap{
  height:  50px;
}

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

   /* ... navの修正など ... */

    /* .category-links 全体の幅は設定不要（画面いっぱいを使うため） */
    .category-links {
        /* widthとheightの指定を削除 */
        gap: 15px; /* 縦の隙間を少し狭める */
        padding: 20px 0;
    }
    
  .category-item {
        /* スマホ画面の90%の幅に設定し、中央に配置 */
        width: 90%; 
        height: 50px;
        /* 中央寄せは親要素の justify-content: center; が有効なため、marginは不要です */
        display: flex;
    　　flex-wrap:wrap;
    }

 .site-header {
       height: 160px; /* 高さを少し低くしてコンテンツにスペースを空ける */
       padding: 10px;
    }
    
    .site-title {
        /* h1 もしくは .site-title のフォントサイズを調整 */
        font-size: 1.8rem; 
    }

    .site-description {
        /* 説明文のフォントサイズを小さく */
        font-size: 0.8rem;
    }






}
