/* ----------------------------------------
   絞り込みエリア（軽快なチップ型UI）
---------------------------------------- */
.filter-area {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 25px;
}

.filter-label {
    font-weight: bold;
    display: block;
    margin-bottom: 15px;
    color: #1E4DB7;
    border-left: 4px solid #1E4DB7;
    padding-left: 10px;
    font-size: 16px;
}

/* 内部処理用のセレクトボックスは隠す */
#category {
    display: none;
}

/* ボタン（チップ）の並び：文字幅に合わせて柔軟に並べる */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-block;
    padding: 8px 16px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 20px; /* 角を丸くしてモダンな印象に */
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    color: #333;
}

.chip:hover {
    background-color: #eef3f8;
    border-color: #1E4DB7;
    color: #1E4DB7;
}

.chip.active {
    background-color: #1E4DB7;
    color: #fff;
    border-color: #1E4DB7;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 凡例 */
.legend {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    padding-left: 5px;
}

/* ----------------------------------------
   テーブル表示（共通・PC用）
---------------------------------------- */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 40px;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.styled-table th,
.styled-table td {
    border: 1px solid #999;
    padding: 12px 8px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.styled-table th {
    background-color: #f0f0f0;
    white-space: nowrap;
    font-weight: bold;
}

.styled-table tr:nth-child(even) {
    background-color: #fafafa;
}


/* --- 追加：検索ボックスのスタイル --- */
.search-container {
    margin-bottom: 25px; /* 下のカテゴリとの間隔 */
}

.search-input-wrapper {
    padding-left: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#search-number {
    width: 200px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px; /* チップやエリアに合わせた角丸 */
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

#search-number:focus {
    border-color: #1E4DB7; /* 既存のテーマカラー */
    box-shadow: 0 0 0 3px rgba(30, 77, 183, 0.1);
}

.search-note {
    font-size: 12px;
    color: #666;
}


/* ----------------------------------------
   カード表示（モバイル用：600px以下）
---------------------------------------- */
@media screen and (max-width: 600px) {
    .styled-table, .styled-table thead, .styled-table tbody, .styled-table th, .styled-table td, .styled-table tr {
        display: block;
    }

    .styled-table thead tr {
        display: none;
    }

    .styled-table tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
        padding: 5px;
        border-radius: 8px;
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .styled-table td {
        display: flex;
        justify-content: flex-start;
        padding: 10px;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: left;
    }

    .styled-table td::before {
        content: attr(data-label);
        font-weight: bold;
        min-width: 100px;
        color: #1E4DB7;
        flex-shrink: 0;
    }

    .styled-table td:last-child {
        border-bottom: 0;
    }

    .chip {
        padding: 6px 12px;
        font-size: 13px;
    }

#search-number {
        width: 100%;
        box-sizing: border-box;
    }

}