﻿.table-sticky {
    margin: 0;
    border: none;
    border-collapse: separate;
    border-spacing: 0;
}

    /* ヘッダーを固定 */
    .table-sticky th {
        position: sticky;
        top: 0;
        z-index: 2; /* 列固定よりも上に表示する */
        background: white; /* 背景を付けて重なり防止 */
    }

    /* 1列目を固定（横スクロール用） */
    .table-sticky th:first-child,
    .table-sticky td:first-child{
        position: sticky;
        left: 0;
        z-index: 1;
        background: white; /* 横スクロール時の透け防止 */
    }

        /* ヘッダーの1列目はさらに上に */
        .table-sticky th:first-child {
            position: sticky;
            top: 0;
            left: 0;
            z-index: 3; /* 縦横両方で固定するので最前面 */
        }

