* {
    box-sizing: border-box;
}
body {
    font-family: sans-serif;
    padding: 10px;
    overflow-x: hidden;
}
#target {
    overflow-x: hidden;
}
table {
    width: 96%;
    border-collapse: collapse;
    border: 2px solid #bc7878;
}

th, td {
    border: 2px solid #999;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #e6f3ff;
}

th:nth-child(3) {
    width: 30%;
}
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
}

textarea.form-control {
    min-height: 100px;
}

@media screen and (max-width: 767px) {
    body {
        width: 100%;
        overflow-x: hidden;
    }
    table, thead, tbody, th, td, tr {
        display: block;
    }
    table {
        border: none;
    }

    thead tr {
        display: none;
    } 

    tr {
        margin-bottom: 20px;
        margin-left: 0%;
        width: 80%;
    }

    td {
        border: none;
        position: relative;
        padding-left: 2%;
        padding-top: 10px;
        padding-bottom: 10px;
        min-height: 30px;
    }
    td.service-name {
        border: 1px #999 solid;
        background-color: rgb(154, 140, 244);
        color: white;
        font-size: 1.4rem;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        top: 0;
        left: 0;
        width: 22%;
        padding: 10px 0 10px 6px;
        white-space: nowrap;
        font-weight: bold;
    }

    td[data-label='AIサービス'] {
        background-color: #b3e0ff;
        font-weight: bold;
        padding-left: 6px;
    }

    td[data-label='AIサービス']:before {
        content: none;
    }

    td[data-label='コメント']:before,
    td[data-label='費用等']:before {
        background-color: #f0f0f0;
        height: 1.4rem;
    }

    .expandable {
        max-height: 3em;
        overflow: hidden;
        position: relative;
        transition: max-height 0.3s ease-out;
    }
    .expanded {
        max-height: 1000px; /* 十分大きな値を設定 */
    }
    .expand-btn {
        position: absolute;
        bottom: 0;
        right: 0;
        background: white;
        color: blue;
        font-weight: bold;
        cursor: pointer;
    }

}
