.converted-box {
    min-height: 320px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    padding: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.term-highlight {
    display: inline;
    border-radius: 5px;
    background: #fff0b8;
    color: #2b2410;
    padding: 0 0.16em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.term-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.term-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.term-table th,
.term-table td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.term-table th {
    background: var(--soft);
    color: var(--accent-dark);
}

.term-table td:first-child {
    font-weight: 700;
}

.category-pill {
    display: inline-block;
    border: 1px solid #cfdde8;
    border-radius: 999px;
    background: #f5f8fa;
    padding: 2px 9px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .term-table {
        min-width: 0;
        display: block;
    }

    .term-table thead {
        display: none;
    }

    .term-table tbody,
    .term-table tr,
    .term-table td {
        display: block;
        width: 100%;
    }

    .term-table tr {
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        margin: 10px 0;
        overflow: hidden;
    }

    .term-table td {
        border-bottom: 1px solid var(--line);
    }

    .term-table td:last-child {
        border-bottom: 0;
    }

    .term-table td::before {
        display: block;
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 700;
    }

    .term-table td:nth-child(1)::before {
        content: "元の用語";
    }

    .term-table td:nth-child(2)::before {
        content: "やさしい言い換え";
    }

    .term-table td:nth-child(3)::before {
        content: "ひとこと説明";
    }

    .term-table td:nth-child(4)::before {
        content: "カテゴリ";
    }
}
