.root{--primary:#0d6efd;--primary-dark:#0b5ed7;--surface:#fff;--surface-muted:#f8f9fa;--border:#dee2e6;--text-main:#212529;--text-muted:#6c757d;--success:#198754;--danger:#dc3545;}
.tth-tool{margin-bottom:2rem;}
.tth-actions{display:flex;flex-wrap:wrap;gap:0.5rem;align-items:center;margin-bottom:1rem;}
.tth-btn{display:inline-flex;align-items:center;justify-content:center;padding:0.5rem 1rem;font-size:0.9375rem;font-weight:500;line-height:1.25;border-radius:8px;border:1px solid transparent;cursor:pointer;transition:background-color 0.15s ease,border-color 0.15s ease,color 0.15s ease;}
.tth-btn-primary{background:var(--primary,#0d6efd);color:#fff;border-color:var(--primary,#0d6efd);}
.tth-btn-primary:hover{background:var(--primary-dark,#0b5ed7);border-color:var(--primary-dark,#0b5ed7);color:#fff;}
.tth-btn-secondary{background:var(--surface-muted,#f0f0f0);color:var(--text-main,#212529);border-color:var(--border,#dee2e6);}
.tth-btn-secondary:hover{background:var(--border,#dee2e6);}
.tth-btn-ghost{background:transparent;color:var(--text-muted,#6c757d);border-color:var(--border,#dee2e6);}
.tth-btn-ghost:hover{background:var(--surface-muted,#f8f9fa);color:var(--text-main,#212529);}
.tth-grid{display:grid;gap:1rem;margin-bottom:1rem;}
@media (min-width:768px){.tth-grid{grid-template-columns:1fr 1fr;min-height:320px;}}
.tth-pane{display:flex;flex-direction:column;min-height:0;}
.tth-label{display:block;font-size:0.875rem;font-weight:600;color:var(--text-main,#212529);margin-bottom:0.375rem;}
.tth-textarea{width:100%;min-height:200px;padding:0.75rem 1rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:0.875rem;line-height:1.5;color:var(--text-main,#212529);background:var(--surface,#fff);border:1px solid var(--border,#dee2e6);border-radius:8px;resize:vertical;outline:none;transition:border-color 0.15s ease,box-shadow 0.15s ease;}
.tth-textarea:focus{border-color:var(--primary,#0d6efd);box-shadow:0 0 0 3px rgba(13,110,253,0.15);}
.tth-textarea-in::placeholder{color:var(--text-muted,#adb5bd);}
.tth-textarea-out{background:var(--surface-muted,#f8f9fa);cursor:default;}
.tth-status{font-size:0.8125rem;color:var(--text-muted,#6c757d);margin:0.5rem 0 0;}
.tth-status-ok{color:var(--success,#198754);}
.tth-status-err{color:var(--danger,#dc3545);}
.tth-opts{display:flex;flex-wrap:wrap;gap:1rem 1.5rem;align-items:center;padding:0.75rem 0;border-top:1px solid var(--border,#dee2e6);}
.tth-check{display:inline-flex;align-items:center;gap:0.5rem;font-size:0.875rem;color:var(--text-main,#212529);cursor:pointer;}
.tth-check input{width:1rem;height:1rem;accent-color:var(--primary,#0d6efd);}
.tth-preview-wrap{margin-top:1rem;padding:1rem;background:var(--surface-muted,#f8f9fa);border:1px solid var(--border,#dee2e6);border-radius:8px;}
.tth-preview-wrap[hidden]{display:none;}
.tth-preview-title{font-size:1rem;font-weight:600;margin:0 0 0.75rem;color:var(--text-main,#212529);}
.tth-preview-inner{overflow-x:auto;max-height:400px;overflow-y:auto;}
.tth-preview-inner table{width:100%;border-collapse:collapse;font-size:0.875rem;}
.tth-preview-inner th,.tth-preview-inner td{border:1px solid var(--border,#dee2e6);padding:0.5rem 0.75rem;text-align:left;}
.tth-preview-inner th{background:var(--surface-muted,#e9ecef);font-weight:600;}
.tth-preview-inner tr:nth-child(even){background:rgba(0,0,0,0.02);}
@media (max-width:767px){.tth-actions{gap:0.375rem;}.tth-btn{padding:0.45rem 0.75rem;font-size:0.875rem;}.tth-textarea{min-height:160px;}}
