.thgst-wrap{--a:#7c3aed;--b:#f1eafe;--bd:#e1e7f0;--tx:#1a2233;--mu:#5d6b82;max-width:960px;margin:24px auto;color:var(--tx);font-family:inherit;box-sizing:border-box}
.thgst-wrap *,.thgst-wrap *::before,.thgst-wrap *::after{box-sizing:border-box}
.thgst-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.thgst-panel{background:#fff;border:1px solid var(--bd);border-radius:14px;padding:22px;box-shadow:0 2px 10px rgba(20,40,80,.05)}
.thgst-seg{display:flex;border:1px solid var(--bd);border-radius:10px;overflow:hidden;margin-bottom:18px}
.thgst-seg button{flex:1;border:0;background:#fff;padding:11px 8px;cursor:pointer;font-size:15px;color:var(--tx)}
.thgst-seg button.on{background:var(--a);color:#fff}
.thgst-field{margin-bottom:16px}
.thgst-lr{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}
.thgst-field label{display:block;font-weight:600;font-size:14px;margin-bottom:6px}
.thgst-lr label{margin-bottom:0}
.thgst-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.thgst-wrap input[type=number],.thgst-wrap select{width:100%;padding:11px 12px;border:1px solid var(--bd);border-radius:8px;font-size:16px;background:#fff;color:var(--tx);height:auto;line-height:1.3}
.thgst-lr select{width:auto;max-width:190px;padding:6px 8px;font-size:14px}
.thgst-custom{margin-top:8px}
.thgst-custom[hidden]{display:none}
.thgst-wrap input:focus,.thgst-wrap select:focus{outline:2px solid var(--a);outline-offset:1px;border-color:var(--a)}
.thgst-error{margin:0 0 12px;padding:10px 12px;border-radius:8px;background:#fdecec;color:#b42318;font-size:14px}
.thgst-secondary{background:#fff;color:var(--a);border:1px solid var(--a);border-radius:8px;padding:10px 20px;font-size:15px;cursor:pointer}
.thgst-primary{width:100%;margin-top:16px;background:var(--a);color:#fff;border:0;border-radius:8px;padding:12px;font-size:16px;font-weight:600;cursor:pointer}
.thgst-primary:hover{filter:brightness(.92)}
.thgst-primary[hidden]{display:none}
.thgst-total{text-align:center;background:var(--b);border-radius:12px;padding:16px;margin-bottom:16px}
.thgst-total span{display:block;color:var(--mu);font-size:14px}
.thgst-total strong{display:block;font-size:34px;line-height:1.15;word-break:break-word}
.thgst-stats{margin:0}
.thgst-stats>div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--bd)}
.thgst-stats>div[hidden]{display:none}
.thgst-stats dt{color:var(--mu);margin:0}
.thgst-stats dd{margin:0;font-weight:700;text-align:right}
.thgst-tax dd{color:var(--a)}
.thgst-sum{border-bottom:0!important;border-top:2px solid var(--bd)}
.thgst-sum dd{font-size:1.1em}
.thgst-bar{display:flex;height:12px;border-radius:999px;overflow:hidden;margin-top:14px;background:var(--bd)}
.thgst-bar[hidden],.thgst-barlegend[hidden]{display:none}
.thgst-bar .n{background:#0ea5e9;transition:width .3s}
.thgst-bar .t{background:var(--a);transition:width .3s}
.thgst-barlegend{display:flex;gap:16px;font-size:13px;color:var(--mu);margin-top:8px}
.thgst-barlegend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px}
.thgst-barlegend .dn{background:#0ea5e9}.thgst-barlegend .dt{background:var(--a)}
.thgst-note{font-size:13px;color:var(--mu);margin:14px 4px 0}
@media (max-width:760px){.thgst-grid{grid-template-columns:1fr}}
