/* 基本スタイル（見た目は古風を維持） */
body {
    background-color: #ffffff;
    color: #000000;
    margin: 0;
    padding: 20px;
    font-family: "MS P明朝", "MS PMincho", serif;
}

h1 { text-align: center; }

/* 区切り線（モダンな書き方） */
.sep-thick { border: 0; height: 3px; background-color: gray; margin: 10px 0; }
.sep-thin { border: 0; height: 1px; background-color: gray; margin: 10px 0; }

/* --- Flexboxによるメインレイアウト --- */
.container {
    display: flex;
    flex-wrap: wrap; /* スマホ時に折り返しを許可 */
    gap: 20px;       /* 要素間の余白を一括指定 */
    margin-top: 20px;
}

/* 画像エリア */
.image-box {
    flex: 0 0 300px; /* 幅を300pxに固定 */
    margin: 0 auto;
    text-align: center;
}

.image-box img {
    border: 2px solid #000000;
    max-width: 100%;
    height: auto;
}

.image-box figcaption {
    font-size: 0.8rem;
    margin-top: 5px;
}

/* 説明文エリア */
.description {
    flex: 1 1 400px; /* 残りの幅を埋める、最小400px */
}

.description h2 { margin-top: 0; }

/* リンクとアドレス */
a:link { color: #0000ff; }
a:visited { color: #800080; }
footer address {
    text-align: center;
    font-style: normal;
    margin-top: 20px;
}

/* --- レスポンシブ対応 --- */
/* Flexboxの特性（flex-wrap）により、
   画面幅が狭まると自動的に縦並びになります。 */

/*-----------------------------------------------------------------------------------------------------*/

/* --- 2024-2026年 モダン・システムフォントスタック --- */
:root {
    /* システム標準の美しいゴシック体セット */
    --font-family-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Meiryo", sans-serif;
    /* 本文の読みやすさを高める設定 */
    --line-height: 1.75;
    --letter-spacing: 0.03em;
}

body {
    background-color: #ffffff;
    color: #1a1a1a; /* 真っ黒より少しグレーに倒すのが現代のトレンド */
    margin: 0;
    padding: clamp(20px, 5vw, 40px); /* 画面幅に応じて余白を可変にする */
    font-family: var(--font-family-sans);
    line-height: var(--line-height);
    letter-spacing: var(--letter-spacing);
    -webkit-font-smoothing: antialiased; /* 文字を滑らかに表示 */
}

/* タイトル周り */
h1 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.25rem;
    border-left: 4px solid #333; /* 現代的なアクセントを追加 */
    padding-left: 10px;
    margin-bottom: 1rem;
}

/* 区切り線（より控えめで洗練されたデザインに） */
.sep-thick { 
    border: 0; 
    height: 2px; 
    background-color: #eee; 
    margin: 20px 0; 
}

.sep-thin { 
    border: 0; 
    height: 1px; 
    background-color: #eee; 
    margin: 20px 0; 
}

/* --- Flexboxによるメインレイアウト --- */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px; /* 余白を広めに取り、ゆとりを持たせる */
    margin-top: 30px;
}

/* 画像エリア */
.image-box {
    flex: 0 0 300px;
    margin: 0 auto;
    text-align: center;
}

.image-box img {
    border-radius: 8px; /* 角をわずかに丸めるのが現代風 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* 軽い影で立体感を出す */
    max-width: 100%;
    height: auto;
}

.image-box figcaption {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}

/* 説明文エリア */
.description {
    flex: 1 1 400px;
}

.description p {
    margin-bottom: 1.5rem;
}

/* リンクとアドレス */
a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
    color: #004499;
}

footer address {
    text-align: center;
    font-style: normal;
    color: #888;
    font-size: 0.9rem;
    margin-top: 40px;
}

/*-----------------------------------------------------------------------------------------------*/

/* --- 変数定義（ライトモードがデフォルト） --- */
:root {
    /* フォント設定 */
    --font-family-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Meiryo", sans-serif;
    
    /* カラー変数 */
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-color: #333333;
    --link-color: #0066cc;
    --border-color: #eeeeee;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* --- ダークモードの設定（ユーザー設定を検知） --- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;      /* 深い黒（有機ELに優しい） */
        --text-primary: #e0e0e0;   /* 純白より少し抑えたグレー */
        --text-secondary: #aaaaaa;
        --accent-color: #bb86fc;   /* ダークモードで映えるアクセント色 */
        --link-color: #8ab4f8;     /* ダークモードで視認性の高い青 */
        --border-color: #333333;
        --shadow: rgba(0, 0, 0, 0.5);
    }
}

/* --- 全体のスタイル（変数を使用） --- */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: clamp(20px, 5vw, 40px);
    font-family: var(--font-family-sans);
    line-height: 1.75;
    letter-spacing: 0.03em;
    transition: background-color 0.3s, color 0.3s; /* モード切替を滑らかに */
}

h1 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
}

h2 {
    font-size: 1.25rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

.sep-thick { border: 0; height: 2px; background-color: var(--border-color); margin: 20px 0; }
.sep-thin { border: 0; height: 1px; background-color: var(--border-color); margin: 20px 0; }

/* Flexboxレイアウト */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}

.image-box {
    flex: 0 0 300px;
    margin: 0 auto;
    text-align: center;
}

.image-box img {
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    max-width: 100%;
    height: auto;
    /* ダークモード時に画像が眩しすぎないよう少し彩度を落とす（2026年風の配慮） */
    filter: brightness(0.9) contrast(1.1);
}

@media (prefers-color-scheme: light) {
    .image-box img { filter: none; }
}

.image-box figcaption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.description {
    flex: 1 1 400px;
}

/* リンクとアドレス */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

footer address {
    text-align: center;
    font-style: normal;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 40px;
}

/*-------------------------------------------------------------------------------------------*/

/* --- 変数定義（ライトモードがデフォルト） --- */
:root {
    /* フォント設定 */
    --font-family-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Meiryo", sans-serif;
    
    /* カラー変数 */
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-color: #333333;
    --link-color: #0066cc;
    --border-color: #eeeeee;
    /* 静止時の影（控えめ） */
    --shadow-default: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* ホバー時の影（深く、柔らかく） */
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* --- ダークモードの設定（影の色を調整） --- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-primary: #e0e0e0;
        --text-secondary: #aaaaaa;
        --accent-color: #bb86fc;
        --link-color: #8ab4f8;
        --border-color: #333333;
        /* ダークモード用の影（より深く） */
        --shadow-default: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 15px 45px rgba(0, 0, 0, 0.6);
    }
}

/* --- 全体のスタイル（変数を使用） --- */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: clamp(20px, 5vw, 40px);
    font-family: var(--font-family-sans);
    line-height: 1.75;
    letter-spacing: 0.03em;
    transition: background-color 0.3s, color 0.3s;
}

h1 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
}

h2 {
    font-size: 1.25rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

.sep-thick { border: 0; height: 2px; background-color: var(--border-color); margin: 20px 0; }
.sep-thin { border: 0; height: 1px; background-color: var(--border-color); margin: 20px 0; }

/* Flexboxレイアウト */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}

.image-box {
    flex: 0 0 300px;
    margin: 0 auto;
    text-align: center;
}

/* --- 画像エリア（静止時） --- */
.image-box img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    
    /* 1. 静止時の影を設定 */
    box-shadow: var(--shadow-default);
    
    /* 2. アニメーションのスムーズさを設定（2026年風の心地よいイージング） */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s ease-out,
                filter 0.3s ease;
    
    /* ダークモード用のフィルター */
    filter: brightness(0.9) contrast(1.1);
    
    /* ホバーした時に画像がはみ出さないようにする */
    overflow: hidden;
}

@media (prefers-color-scheme: light) {
    .image-box img { filter: none; }
}

/* --- 画像エリア（ホバー時・アニメーション） --- */
.image-box img:hover {
    /* 1. 画像をわずかに拡大（1.05倍）して「手前に来る」感を出す */
    transform: scale(1.05);
    
    /* 2. 影を深く、広範囲にすることで「浮き上がった」立体感を強調 */
    box-shadow: var(--shadow-hover);
    
    /* 3. ホバー中はフィルターを解除して、鮮明に見せる */
    filter: brightness(1) contrast(1);
    
    /* カーソルをポインター（指マーク）にして、触れることを明示 */
    cursor: pointer;
}

.image-box figcaption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 15px; /* アニメーションした時にキャプションと重ならないよう余白を広げる */
}

.description {
    flex: 1 1 400px;
}

/* リンクとアドレス */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

footer address {
    text-align: center;
    font-style: normal;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 40px;
}