
.tst4-tool, .tst4-tool * { box-sizing: border-box; }
.tst4-tool {
    max-width: 960px;
    margin: 32px auto;
    background: #ffffff;
    border: 1px solid rgba(41, 33, 85, .12);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(17, 24, 39, 0.10);
    color: #111827;
    font-family: inherit;
}
.tst4-tool-header {
    padding: 34px 38px 28px;
    background: linear-gradient(135deg, rgba(41, 33, 85, .06) 0%, rgba(41, 33, 85, .03) 55%, #ffffff 100%);
    border-bottom: 1px solid rgba(41, 33, 85, .12);
}
.tst4-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 16px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #292155;
    border: 1px solid #292155;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1;
    text-transform: uppercase;
}
.tst4-tool-header h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: #111827;
}
.tst4-tool-header p {
    max-width: 720px;
    margin: 0;
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
}
.tst4-tool-body {
    padding: 34px 38px 38px;
    background: #ffffff;
}
.tst4-tool label {
    display: block;
    margin: 0 0 8px;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 800;
}
.tst4-field { margin: 0 0 18px; }
.tst4-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 18px;
}
.tst4-field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tst4-field-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tst4-tool input[type="text"],
.tst4-tool input[type="url"],
.tst4-tool input[type="number"],
.tst4-tool input[type="date"],
.tst4-tool textarea,
.tst4-tool select {
    width: 100%;
    min-height: 52px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.45;
    font-family: inherit;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.tst4-tool textarea { min-height: 142px; resize: vertical; }
.tst4-tool select { appearance: auto; }
.tst4-tool input:focus,
.tst4-tool textarea:focus,
.tst4-tool select:focus {
    border-color: #292155;
    box-shadow: 0 0 0 4px rgba(41, 33, 85, .16);
}
.tst4-check, .tst4-radio-row label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-weight: 700;
}
.tst4-check input, .tst4-radio-row input { width: auto !important; min-height: auto !important; }
.tst4-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    margin: 0 0 18px;
}
.tst4-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 22px 0 0;
}
.tst4-btn, .tst4-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    min-width: 180px;
    border-radius: 0;
    padding: 14px 30px;
    border: 3px solid #292155;
    background: #ffffff;
    color: #292155;
    font-size: 15px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.tst4-btn {
    background: #ffffff;
    color: #292155;
    border-color: #292155;
    box-shadow: none;
}
.tst4-btn:hover {
    transform: translateY(-2px);
    background: #ffffff;
    color: #292155;
    border-color: #292155;
    box-shadow: 0 10px 22px rgba(41, 33, 85, .16);
}
.tst4-btn-secondary {
    background: #ffffff;
    color: #292155;
    border-color: #292155;
    box-shadow: none;
}
.tst4-btn-secondary:hover {
    transform: translateY(-2px);
    background: #ffffff;
    color: #292155;
    border-color: #292155;
    box-shadow: 0 10px 22px rgba(41, 33, 85, .16);
}
.tst4-result-box {
    margin: 24px 0 0;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
}
.tst4-result-box h3 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 800;
}
.tst4-placeholder {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
}
.tst4-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 0 0 16px;
}
.tst4-grid > div {
    min-height: 106px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    padding: 16px;
    text-align: center;
}
.tst4-grid strong {
    display: block;
    margin: 0 0 6px;
    color: #111827;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1;
    font-weight: 900;
}
.tst4-grid span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.35;
}
.tst4-output {
    min-height: 220px;
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    white-space: pre;
}
.tst4-warning {
    margin: 0;
    padding: 13px 14px;
    border: 1px solid #fde68a;
    border-radius: 14px;
    background: #fffbeb;
    color: #92400e;
    font-weight: 700;
}
.tst4-good {
    margin: 0;
    padding: 13px 14px;
    border: 1px solid #a7f3d0;
    border-radius: 14px;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 700;
}
.tst4-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    font-size: 14px;
}
.tst4-table th, .tst4-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}
.tst4-table th { background: #f9fafb; font-weight: 800; color: #374151; }
.tst4-table tr:last-child td { border-bottom: 0; }
.tst4-copy-box {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
}
.tst4-copy-box strong { color: #374151; font-size: 14px; }
.tst4-list { margin: 0; padding-left: 22px; color: #374151; line-height: 1.7; }
.tst4-list li + li { margin-top: 8px; }
@media (max-width: 900px) {
    .tst4-field-grid, .tst4-field-grid.three, .tst4-field-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .tst4-tool { margin: 24px 0; border-radius: 18px; }
    .tst4-tool-header { padding: 26px 22px 22px; }
    .tst4-tool-body { padding: 24px 22px 26px; }
    .tst4-field-grid, .tst4-field-grid.three, .tst4-field-grid.four, .tst4-grid { grid-template-columns: 1fr; }
    .tst4-actions { display: grid; grid-template-columns: 1fr; }
    .tst4-btn, .tst4-btn-secondary { width: 100%; min-width: 0; }
    .tst4-result-box { padding: 18px; }
    .tst4-table { display: block; overflow-x: auto; }
}
