.thcf{max-width:640px;margin:24px auto;padding:24px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;box-shadow:0 4px 18px rgba(15,23,42,.06);font-family:inherit;color:#0f172a;box-sizing:border-box}
.thcf *{box-sizing:border-box}
.thcf [hidden]{display:none!important}
.thcf-row{display:flex;align-items:flex-end;gap:12px}
.thcf-field{flex:1;min-width:0}
.thcf-field label{display:block;font-weight:600;margin-bottom:6px}
.thcf-field input{width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:10px;font-size:18px;background:#fff;color:#0f172a}
.thcf-output{background:#f1f5f9!important;font-weight:700}
.thcf-swap{flex:none;width:46px;height:46px;border:1px solid #cbd5e1;border-radius:50%;background:#f8fafc;font-size:22px;cursor:pointer;transition:.15s;line-height:1;padding:0}
.thcf-swap:hover{background:#dbeafe;border-color:#2563eb}
.thcf-opts{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}
.thcf-opts select{padding:6px 8px;border:1px solid #cbd5e1;border-radius:8px;margin-left:6px}
.thcf-btn{background:#2563eb;color:#fff;border:0;border-radius:10px;padding:10px 22px;font-size:15px;font-weight:600;cursor:pointer;transition:.15s}
.thcf-btn:hover{background:#1d4ed8}
.thcf-extra{display:flex;gap:12px;margin-top:16px;flex-wrap:wrap}
.thcf-extra-item{flex:1;min-width:150px;padding:12px;border-radius:10px;background:#eff6ff;border:1px solid #bfdbfe;text-align:center}
.thcf-work-item{flex:2;min-width:220px}
.thcf-extra-item small{display:block;color:#64748b}
.thcf-extra-item strong{font-size:17px;color:#1d4ed8;word-break:break-word}
.thcf-formula{margin:14px 0 0;text-align:center;color:#475569;font-size:14px}
.thcf-msg{margin:8px 0 0;min-height:1.2em;text-align:center;font-size:14px;color:#15803d;font-weight:600}
.thcf-msg.thcf-err{color:#b91c1c}
.thcf-ref{margin-top:18px;overflow-x:auto;border:1px solid #e2e8f0;border-radius:10px}
.thcf-table{width:100%;border-collapse:collapse;margin:0;font-size:15px}
.thcf-table caption{padding:10px 12px;font-weight:600;text-align:left;background:#f8fafc;caption-side:top}
.thcf-table th,.thcf-table td{padding:8px 12px;text-align:center;border-top:1px solid #e2e8f0}
.thcf-table thead th{background:#f1f5f9}
@media(max-width:520px){.thcf{padding:16px}.thcf-row{flex-direction:column;align-items:stretch}.thcf-swap{align-self:center;transform:rotate(90deg)}}
