/* 
 * IKACHI ウェブサイト用 統合スタイルシート
 * 古本風デザイン - 2025年5月リニューアル版
 */

@charset "UTF-8";

/* フォントのインポート - 古書風の味わいある日本語フォント */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Sawarabi+Mincho&display=swap');

/* 基本スタイル */
body {
    font-family: 'Noto Serif JP', serif;
    background-color: #f8f3e9; /* アイボリー/クリーム色の背景 */
    color: #3a3a3a;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    max-width: 1200px;
    width: 94%;
    margin-left: auto;
    margin-right: auto;
    border-left: 1px solid #e0d9c5;
    border-right: 1px solid #e0d9c5;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
}

/* ヘッダー関連 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Sawarabi Mincho', serif;
    color: #5f4b32; /* 茶色系の見出し */
    margin: 2rem 0 1rem 0;
    line-height: 1.4;
}

h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid #c4b49a;
    padding-bottom: 0.5rem;
    position: relative;
    margin-top: 2.5rem;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30%;
    height: 2px;
    background-color: #8c7055;
}

h2 {
    font-size: 1.5rem;
    border-left: 5px solid #8c7055;
    padding-left: 0.8rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.3rem;
    border-bottom: 1px dotted #c4b49a;
    padding-bottom: 0.3rem;
}

h4, h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 0.9rem;
    text-align: right;
    padding-top: 0.5rem;
    color: #7d6b54;
}

/* テーブルスタイル - 古書のような質感 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #fcf9f2;
    border: 1px solid #e0d9c5;
}

th {
    background: #e6dccb;
    color: #5f4b32;
    text-align: left;
    padding: 0.8rem;
    border: 1px solid #d5caaf;
    font-weight: 500;
}

td {
    padding: 0.8rem;
    border: 1px solid #e0d9c5;
    vertical-align: top;
}

tr:nth-child(even) {
    background-color: #f5f1e8;
}

/* リンクスタイル - 古書的な風合い */
a {
    color: #7d513c;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px dotted #7d513c;
    padding-bottom: 1px;
}

a:hover, a:focus {
    color: #a04622;
    border-bottom: 1px solid #a04622;
}

a:active {
    color: #c25b33;
}

/* イメージスタイル */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border: none;
    transition: all 0.3s ease;
}

a img {
    border: none;
    transition: all 0.3s ease;
}

a:hover img {
    opacity: 0.9;
    transform: scale(1.01);
}

/* テキスト入力とボタン - 古書の手触り感 */
input, textarea, select {
    font-family: 'Noto Serif JP', serif;
    padding: 0.6rem;
    border: 1px solid #d5caaf;
    background: #fcf9f2;
    border-radius: 3px;
    color: #3a3a3a;
    margin: 0.4rem 0;
    max-width: 100%;
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    border-color: #8c7055;
    outline: none;
    box-shadow: 0 0 3px rgba(140, 112, 85, 0.3);
}

textarea {
    height: 150px;
    resize: vertical;
}

input[type="button"], input[type="submit"] {
    background-color: #8c7055;
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="button"]:hover, input[type="submit"]:hover {
    background-color: #a18665;
}

input[type="button"]:active, input[type="submit"]:active {
    background-color: #76604a;
    transform: translateY(1px);
}

/* ナビゲーションタブ */
table tr td[align="center"] {
    padding: 0.5rem 0;
    font-family: 'Sawarabi Mincho', serif;
}

table tr td[align="center"] a,
table tr td[align="center"] font {
    padding: 0.5rem 0.2rem;
    display: inline-block;
    font-size: 1rem;
    text-align: center;
    width: 100%;
    border-bottom: none;
}

table tr td[align="center"] font {
    color: #a04622;
    font-weight: 500;
    border-bottom: 2px solid #a04622;
}

/* パン屑リスト */
tr td a[href="index.html"]:first-child,
tr td a[href="../index.html"]:first-child {
    font-size: 0.9rem;
    color: #7d6b54;
    padding: 0.5rem 0;
    display: inline-block;
    border-bottom: none;
}

/* フッター */
div[align="center"], div[align="right"] {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e0d9c5;
    font-size: 0.9rem;
    color: #7d6b54;
}

div[align="center"] a {
    margin: 0 0.5rem;
    border-bottom: none;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    body {
        width: 100%;
        padding: 0;
        border: none;
    }
    
    h1 {
        font-size: 1.5rem;
        padding: 0.6rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* テーブルのスタイル調整 */
    table, tbody, tr, th, td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* ナビゲーションタブの調整 */
    table tr:nth-child(2) td {
        display: inline-block;
        width: auto;
        margin: 0.2rem;
    }
    
    table tr:nth-child(2) {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 画像サイズの調整 */
    img {
        max-width: 95%;
    }
    
    /* ボタンの調整 */
    input[type="button"], input[type="submit"] {
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* 印刷用スタイル */
@media print {
    body {
        width: 100%;
        margin: 0;
        padding: 0;
        background: #fff;
        color: #000;
        font-size: 12pt;
    }
    
    a {
        color: #000;
        text-decoration: none;
        border-bottom: none;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: #000;
    }
}

/* 特殊ページ要素の調整 */
center img {
    margin: 1.5rem auto;
    border-radius: 3px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 縦間隔の調整 */
table + br {
    display: block;
    content: "";
    margin-top: 1rem;
}

/* アンカーリンクの位置調整 */
a[name] {
    display: block;
    position: relative;
    top: -20px;
    visibility: hidden;
}
