.tewc-wrap{max-width:960px;margin:1rem auto;padding:1rem;border:1px solid #e5e7eb;border-radius:1rem;background:#fff}
.tewc-head{margin-bottom:.5rem}
.tewc-head h3{margin:0;font-size:1.25rem}
.tewc-sub{margin:.25rem 0 0;color:#6b7280}
.tewc-input{margin:.75rem 0}
#tewc-input{width:100%;min-height:200px;padding:12px;border:1px solid #d1d5db;border-radius:.75rem;resize:vertical;font:16px/1.6 system-ui,Segoe UI,Roboto,Helvetica,Arial}
.tewc-controls{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.5rem}
.tewc-btn{appearance:none;border:1px solid #d1d5db;background:#f9fafb;padding:.5rem .75rem;border-radius:.75rem;cursor:pointer}
.tewc-btn:hover{background:#f3f4f6}
.tewc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.75rem}
@media (max-width:900px){.tewc-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:520px){.tewc-grid{grid-template-columns:1fr}}
.tewc-card{border:1px solid #e5e7eb;border-radius:.75rem;padding:.75rem;background:#fcfcfd}
.tewc-kpi{font-size:1.75rem;font-weight:700}
.tewc-kpi-label{color:#4b5563;margin-top:.25rem}
.tewc-subgrid{display:flex;justify-content:space-between;margin-top:.5rem;color:#374151}
.tewc-details{margin-top:.75rem}
.tewc-details summary{cursor:pointer}
.tewc-switch{display:flex;align-items:center;gap:.5rem;margin-top:.25rem}
.tewc-foot{margin-top:.75rem;color:#6b7280}
.tewc-history{position:fixed;inset:auto 0 0 0;background:#ffffff;border-top:1px solid #e5e7eb;box-shadow:0 -6px 24px rgba(0,0,0,.08);padding:1rem;z-index:9999}
.tewc-history-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem}
.tewc-history-actions{display:flex;gap:.5rem}
.tewc-history-list{list-style:none;margin:0;padding:0;max-height:40vh;overflow:auto}
.tewc-history-item{border:1px solid #e5e7eb;border-radius:.75rem;padding:.5rem;margin:.5rem 0;background:#fff}
.tewc-history-item-head{font-weight:600}
.tewc-history-item-meta{color:#6b7280;margin:.25rem 0}
.tewc-history-item-sample{color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tewc-history-item-actions{display:flex;gap:.5rem;margin-top:.25rem}
.tewc-history-empty{color:#6b7280}