/* 共通テーブルラップ */
.frm-table-wrap {
    overflow-x: auto;
    margin-bottom: 30px;
    -webkit-overflow-scrolling: touch;
}

/* ランキングテーブル */
.frm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-family: Arial, sans-serif;
}

.frm-table th,
.frm-table td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: center;
    vertical-align: middle;
}

.frm-table th {
    background-color: #666;
    color: #fff;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.frm-table td {
    background-color: #fff;
    color: #000;
    word-break: break-word;
    max-width: 300px;
}

/* 年度ドロップダウン */
.frm-year-dropdown {
    padding: 6px 10px;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid #8b0000;
    border-radius: 4px;
    background-color: #8b0000;
    color: #fff;
    cursor: pointer;
    margin-bottom: 15px;
}

.frm-year-dropdown option {
    color: #000;
    background-color: #fff;
}

/* ランキングラッパー */
.frm-ranking-wrapper {
    margin-bottom: 40px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .frm-table-wrap { overflow-x: auto; }

    .frm-table {
        width: 100%;
        min-width: 0;
        display: block;
    }

    .frm-table thead,
    .frm-table tbody,
    .frm-table th,
    .frm-table td,
    .frm-table tr { display: block; }

    .frm-table tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #ccc;
        padding-bottom: 10px;
    }

    .frm-table th { display: none; }

    .frm-table td {
        text-align: left;
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px solid #eee;
        background-color: #f9f9f9;
        margin-bottom: 5px;
        max-width: none;
        word-break: break-word;
    }

    .frm-table td::before {
        position: absolute;
        left: 10px;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
        content: attr(data-label);
        color: #333;
    }

    .frm-year-dropdown {
        font-size: 14px;
        padding: 4px 8px;
    }

    .frm-table td[data-label='順位'],
    .frm-table td[data-label*='回数'] {
        font-weight: bold;
    }
}