table {

    border-collapse: collapse;

    width: 100%;

    min-width: 800px;

    table-layout: fixed;

}

td {

    border: none;

    text-align: center;

    padding: 0;

    font-family: system-ui, sans-serif;

    font-size: 20px;

    width: 5px;

    height: 2em;

    overflow: hidden;

    background-color: #ffffff00;

    transition: background-color 0.2s ease;

}



td.hover-highlight {

    position: relative;

  }

  

  td.hover-highlight::after {

    content: "";

    position: absolute;

    top: 0; left: 0;

    width: 100%; height: 100%;

    background-color: rgba(0, 0, 0, 0.25);

    pointer-events: none; /* セル操作の邪魔をしない */

    z-index: 1;

  }





.tooltip {

    position: fixed;

    background: #ffffff;

    border: 1px solid #e0e0e0;

    padding: 16px 20px;

    border-radius: 12px;

    font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;

    font-size: 14px;

    color: #222;

    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);

    z-index: 1000;

    display: none;

    max-width: 250px;

    line-height: 1.6;

    transition: all 0.2s ease-in-out;

    overflow-wrap: break-word;  /* ★ より柔軟な折り返し */

}



.tooltip b {

    font-size: 16px;

    font-weight: 600;

    display: block;

    margin-bottom: 10px;

    color: #1a1a1a;

}

.tooltip img {

    margin-top: 12px;

    border-radius: 4px;

    max-width: 100%;

    height: auto;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);

}



.tooltip-jump-btn {

    margin-left: 8px;

    text-decoration: none;

    font-size: 12px;

    color: #272727;

    border: 1px solid #ccc;

    padding: 1px 6px;

    border-radius: 6px;

    background: #ffffff;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);;

    transition: background 0.2s;

}



.tooltip-jump-btn:hover {

    background: #e0e0e0;

    color: #000;

}





.handle-tag {

    display: block;

    margin-top: -0.75em;

    font-size: 15px;

    color: #000000;

    padding: 2px 6px;

    margin-bottom: 8px;

    font-family: 'Segoe UI', 'Inter', sans-serif;

}



.badge {

    display: inline-block;

    padding: 4px 8px;

    border-radius: 6px;

    font-weight: 1000;

    font-size: 13px;

    border: none;

    margin-bottom: 4px;

    font-family: system-ui, sans-serif;

}



.badge-a {

    background-color: #e53935;

    color: #fff;

}

.badge-ma {

    background-color: #3949ab;

    color: #fff;

}

.badge-mb {

    background-color: #29b6f6;

    color: #fff;

}



.table-wrapper {

    overflow: auto;

    max-width: 100%;

    max-height: 100%; /* 高さも制限できるように */

    border: 1px solid #ccc;

    border-radius: 8px;

}

@media (max-width: 768px) {
    .table-wrapper {
        overflow-x: auto;
        padding: 8px;
    }
    table {
        min-width: unset;
        width: 100%;
    }
    td {
        font-size: 10px;
        min-width: 30px;
        height: 2em;
        padding: 2px;
    }
    .tooltip {
        max-width: 90%;
        padding: 12px 16px;
        font-size: 13px;
    }
    .tooltip img {
        max-width: 100%;
        height: auto;
    }
}
