
.sok-directory,
.sok-directory * {
    box-sizing: border-box;
}

.sok-directory {
    width: 100%;
    max-width: 980px;
    margin: 24px auto;
    padding: 24px;
    border: 1px solid #f1e4cf;
    border-radius: 24px;
    background: #fffdf8;
    color: #2b2118;
    font-family: inherit;
    box-shadow: 0 18px 45px rgba(90, 61, 31, 0.10);
    overflow: visible;
}

.sok-title {
    margin: 0 0 10px;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.12;
    color: #24180f;
}

.sok-intro {
    margin: 0 0 18px;
    line-height: 1.55;
    color: #6a5848;
}

.sok-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(190px, .8fr) minmax(190px, .8fr);
    gap: 16px;
    margin-bottom: 14px;
}

.sok-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.sok-label {
    font-weight: 700;
    line-height: 1.35;
    color: #4b3828;
}

.sok-search-wrap {
    position: relative;
    display: block;
    min-width: 0;
}

.sok-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d9c5ad;
    border-radius: 14px;
    background: #fffaf3;
    color: #2b2118;
    font: inherit;
    line-height: 1.35;
    outline: none;
}

.sok-field-search .sok-control {
    padding-right: 42px;
}

.sok-control:focus {
    border-color: #b77731;
    box-shadow: 0 0 0 3px rgba(183, 119, 49, 0.14);
}

.sok-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: #ead8bf;
    color: #4b3828;
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.sok-clear:hover,
.sok-clear:focus-visible {
    background: #d9c5ad;
    outline: none;
}

.sok-help {
    font-size: 13px;
    line-height: 1.45;
    color: #796656;
}

.sok-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin: 8px 0 12px;
    color: #6a5848;
    line-height: 1.45;
}

.sok-summary strong {
    color: #b77731;
}

.sok-table-wrap {
    width: 100%;
    border: 1px solid #f0dfc8;
    border-radius: 20px;
    background: #ffffff;
    overflow: hidden;
}

.sok-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.sok-table th,
.sok-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #f0dfc8;
    vertical-align: top;
    text-align: left;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.sok-table th {
    background: #fff8ee;
    color: #4b3828;
    font-size: 14px;
    font-weight: 800;
}

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

.sok-table tbody tr {
    cursor: pointer;
    transition: background .15s ease;
}

.sok-table tbody tr:hover,
.sok-table tbody tr:focus-within,
.sok-table tbody tr.sok-row-active {
    background: #fff3df;
}

.sok-symbol-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sok-symbol-drawing {
    display: inline-flex;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid #ead8bf;
    background: #fffaf3;
}

.sok-symbol-drawing svg {
    display: block;
    width: 48px;
    height: 48px;
}

.sok-symbol-text {
    display: inline-flex;
    max-width: 100%;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 12px;
    background: #3a2617;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.2;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.sok-term {
    display: block;
    margin-bottom: 5px;
    color: #2b2118;
    font-weight: 800;
}

.sok-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sok-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff3df;
    color: #8a633d;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
}

.sok-empty {
    padding: 18px;
    color: #7f1d1d;
    font-weight: 700;
    line-height: 1.5;
}

.sok-card {
    width: 100%;
    min-width: 0;
    margin-top: 18px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff8ee, #ffffff);
    border: 1px solid #f0dfc8;
    overflow: visible;
}

.sok-card-top {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.sok-card-symbol {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    border: 1px solid #ead8bf;
    background: #fffaf3;
}

.sok-card-symbol svg {
    width: 72px;
    height: 72px;
}

.sok-card-main {
    display: flex;
    min-width: 0;
    max-width: 100%;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: #3a2617;
    color: #ffffff;
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.38;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    overflow-x: hidden;
}

.sok-card-line {
    display: block;
    max-width: 100%;
    min-width: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: normal;
}

.sok-card-answer {
    color: #ffffff;
}

.sok-card-note {
    margin: 12px 0 0;
    color: #6a5848;
    line-height: 1.55;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

@media (max-width: 820px) {
    .sok-panel {
        grid-template-columns: 1fr;
    }

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

    .sok-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .sok-table tr {
        border-bottom: 1px solid #f0dfc8;
    }

    .sok-table tr:last-child {
        border-bottom: 0;
    }

    .sok-table td {
        display: grid;
        grid-template-columns: 145px minmax(0, 1fr);
        gap: 10px;
        border-bottom: 1px dashed #f0dfc8;
    }

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

    .sok-table td::before {
        content: attr(data-label);
        color: #8a633d;
        font-weight: 800;
    }
}

@media (max-width: 640px) {
    .sok-directory {
        padding: 16px;
        border-radius: 20px;
    }

    .sok-title {
        font-size: 24px;
    }

    .sok-table td {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .sok-card-top {
        grid-template-columns: 1fr;
    }

    .sok-card-symbol {
        min-height: 78px;
    }

    .sok-card-main {
        font-size: 14px;
    }
}
