@charset "UTF-8";
/* CSS Document */
/* 読み方で漢字検索 | MJ文字情報 6万字 */
/* 2026/01/09 */

/* ==========================================================
 * 基本スタイル
 * ========================================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    border: 4px solid sienna;
    border-radius: 8px;
    background-color: #FFFEFA;
    padding: 10px 20px 30px;
}
.page-title {
    font-size: 1.32rem;
    text-align: center;
    padding: 15px 0 10px 0;
}
.summary-box {
    font-size: 1rem;
    border: 1px solid tan;
    border-radius: 4px;
    margin: 5px 0 5px 0;
    padding: 15px;
}
.search-note {
    margin: 1em 0 0 0.5em;
    padding: 0.1em 1em 0.1em 0.8em;
    border-left: 3px solid tan;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
}
/* アンカー要素がレイアウトに影響しないように調整（#stroke-list の追加CSSを統合） */
#stroke-list {
    display: block; 
    margin: 0 !important; 
    padding: 0 !important; 
    height: 1px;
    overflow: hidden;
}

/* ==========================================================
 * 読み方検索フォーム (yomi-search)
 * ========================================================== */
.yomi-search-wrapper {
    margin: 15px 0 25px 0; 
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fcfcfc;
    padding: 15px;
}
.yomi-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 5px; 
}
.yomi-search-form input[type="text"] {
    flex-grow: 1; 
    width: auto; 
    padding: 8px 12px;
    font-size: 1.1em; 
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: none;
    box-sizing: border-box;
    max-width: none;
}
.yomi-search-form input[type="text"]::placeholder {
    font-size: 0.9em;
    color: #999;
}
.yomi-search-form button {
    padding: 8px 15px;
    font-size: 1.0em;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}
.yomi-search-form button[type="submit"] {
    background-color: #5cb85c;
}
.yomi-search-form button[type="submit"]:hover {
    background-color: #4cae4c;
}
.yomi-search-form button.btn-reset {
    background-color: #f0ad4e;
}
.yomi-search-form button.btn-reset:hover {
    background-color: #ec971f;
}
.yomi-search-hint {
    font-size: 0.9em;
    color: #555;
    padding-top: 5px;
    text-align: left;
}

/* ==========================================================
 * 画数一覧 (rad-list)
 * ========================================================== */
.radical-fieldset {
    border: 2px solid tan;
    background-color: beige;
    border-radius: 5px;
    padding: 10px;
}
.radical-legend {
    margin-bottom: 5px;
    font-size: 1.1rem;
}
.rad-list a {
	font-family: 'Yu Mincho', YuMincho, 'Hiragino Mincho ProN', 'IPAmj 明朝', serif;
    font-size: 1.1rem;
    display: inline-block;
    margin: 1px;
    padding: 2px;
    width: 3.2em;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    box-sizing: content-box;
}
.rad-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.rad-list a:hover { background: #eee; }

/* ==========================================================
 * 選択画数情報
 * ========================================================== */
.radical-info {
    margin: 15px 0 10px 0;
    padding: 12px;
    border: 2px solid tan;
    border-radius: 6px;
    background: beige;
    font-size: 1.4rem;
    text-align: center;
}

/* ==========================================================
 * 画像操作ボタン (btn-area)
 * ========================================================== */
.btn-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0 15px;
    align-items: center;
}
.btn-area label {
    font-weight: bold;
}
.btn {
    font-size: 0.95rem !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    border: 1px solid #666 !important;
    background: linear-gradient(#fafafa, #e0e0e0) !important;
    cursor: pointer !important;
    user-select: none;
}
.btn:hover { background: linear-gradient(#ffffff, #d6d6d6) !important; }
.btn:active { transform: translateY(1px) !important; }

/* ==========================================================
 * ページネーション
 * ========================================================== */
.pagination-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 15px 0;
    padding: 10px 0;
}

.pagination-area a,
.pagination-area .current-page {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px;
    font-size: 0.95rem;
    min-width: 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

/* 通常のページリンク */
.pagination-area a {
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.pagination-area a:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* 現在のページ */
.pagination-area .current-page {
    color: #fff;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    font-weight: bold;
    cursor: default;
}

/* ==========================================================
 * 画像一覧 (image-area)
 * ========================================================== */
.image-area {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 10px;
    justify-content: flex-start;
    max-width: 830px;
}
.img-box {
    background: #FFF;
    border: 1px solid #ccc;
    padding: 6px;
    text-align: center;
    border-radius: 4px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.15s ease;
    flex-basis: 114px;
    height: auto;
}
.img-box:hover {
    background-color: #f3f3f3;
}
.img-box img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto 6px;
    border: 1px solid #eee;
    object-fit: contain;
}
@media (min-width: 660px) {
    .image-area.size-large .img-box {
        flex-basis: 212px;
    }
}
.small {
    font-size: 0.75rem;
    color: #444;
    padding: 2px 0 0;
    line-height: 1.5;
    text-align: left;
    width: 100%;
}

.mj-code {
    font-weight: bold;
    color: #6a0dad;
    display: block;
    margin-top: 3px;
}

/* ==========================================================
 * 検索方法メニュー
 * ========================================================== */
.search-menu-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0 25px; /* 上下に余白 */
    flex-wrap: wrap;
}
.search-menu-link,
.search-menu-current {
    display: inline-block;
    padding: 8px 15px;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}
/* リンクボタンのスタイル */
.search-menu-link {
    color: #3e2723; /* Siennaに近い色 */
    background-color: #f7f3e6; /* Beigeに近い色 */
    border: 2px solid #a1887f; /* Siennaに近いボーダー */
}
.search-menu-link:hover {
    background-color: #fcefe2;
    color: #5d4037;
}
/* 現在地のスタイル（リンクなし） */
.search-menu-current {
    color: white;
    background-color: sienna; /* containerのボーダー色 */
    border: 2px solid sienna;
    cursor: default;
}

/* ==========================================================
 * メディアクエリ (スマートフォン対応)
 * ========================================================== */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .container {
        border-width: 2px;
        padding: 10px;
    }
    .page-title {
        font-size: 1.2rem;
        padding: 5px 0;
    }
    /* 検索フォームのレスポンシブ対応 */
    .yomi-search-form {
        flex-wrap: wrap; /* スマホでは折り返す */
    }
    .yomi-search-form input[type="text"] {
        flex-basis: 100%; /* 入力欄を幅いっぱいに */
    }
    .yomi-search-form button {
        flex-basis: calc(50% - 5px); /* ボタンを横並びにする */
        margin-top: 5px;
    }
    .img-box {
        width: calc(33.333% - 6px);
        min-width: 90px;
        flex-basis: auto;
    }
    .image-area {
        max-width: none;
        justify-content: space-around;
    }
    .rad-list a {
        width: 1.8em;
        font-size: 1rem;
    }
}