.twc-root{min-width:0}
.twc-list{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.twc-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;min-height:30px;padding:5px 9px;border:1px solid #d8e0ec;border-radius:6px;background:#fff;color:#263247;font-size:12px;line-height:1.35}
.twc-chip strong{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;letter-spacing:0;color:#1f2a3b}
.twc-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px;color:#415069}
.twc-chip em{font-style:normal;border-radius:4px;background:#edf3ff;color:#2c5ea8;padding:1px 5px;font-size:10px}
.twc-chip.is-aggregate{border-style:dashed;background:#f8fafc;color:#516070}
.twc-chip button{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:0;border-radius:50%;background:transparent;color:#7b8492;cursor:pointer}
.twc-chip button:hover{background:#edf1f6;color:#2d3748}
.twc-add{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px dashed #b9c6d8;border-radius:6px;background:#fff;color:#3568ad;font-size:18px;line-height:1;cursor:pointer}
.twc-add:hover{background:#f1f6ff;border-color:#7fa2d5}
.twc-note{margin:5px 0 0;color:#758093;font-size:11px}
.twc-error{margin:6px 0 0;color:#b73939;font-size:12px}
.twc-root.is-loading{opacity:.72}
.twc-dialog{width:min(560px,calc(100vw - 28px));border:1px solid #d7dee9;border-radius:10px;padding:0;background:#fff;color:#1f2937;box-shadow:0 24px 70px #10203b33;font:13px/1.5 var(--font-body,Arial,sans-serif)}
.twc-dialog::backdrop{background:#0e1b36a6}
.twc-dialog form{display:grid;gap:14px;padding:18px}
.twc-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.twc-dialog h3{margin:0;font-size:17px}
.twc-dialog header button{width:30px;height:30px;border:0;border-radius:6px;background:transparent;cursor:pointer}
.twc-dialog header button:hover{background:#f1f3f6}
.twc-search{display:grid;gap:6px;font-weight:600}
.twc-search input{width:100%;min-height:38px;border:1px solid #d2dae7;border-radius:6px;padding:7px 10px;font:inherit}
.twc-selected,.twc-results{display:flex;flex-wrap:wrap;gap:6px;min-height:38px}
.twc-selected{padding:10px;border:1px solid #ecf0f5;border-radius:8px;background:#fbfcfe}
.twc-selected p,.twc-results p{margin:0;color:#748092}
.twc-results{display:grid;max-height:260px;overflow:auto;border:1px solid #e5eaf1;border-radius:8px}
.twc-results button{display:grid;grid-template-columns:130px minmax(0,1fr);gap:10px;align-items:center;min-height:42px;padding:9px 12px;border:0;border-bottom:1px solid #edf1f6;background:#fff;text-align:left;cursor:pointer}
.twc-results button:last-child{border-bottom:0}
.twc-results button:hover,.twc-results button[aria-pressed=true]{background:#f1f6ff}
.twc-results strong{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}
.twc-results span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.twc-more{justify-self:start;border:1px solid #d5deea;border-radius:6px;background:#fff;padding:7px 12px;cursor:pointer}
.twc-help{margin:0;color:#6f7b8d;font-size:12px}
.twc-dialog footer{display:flex;justify-content:flex-end;gap:8px}
.twc-dialog footer button{min-height:34px;padding:7px 13px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;cursor:pointer}
.twc-dialog footer button[type=submit]{background:#102347;border-color:#102347;color:#fff}
@media(max-width:520px){
 .twc-chip span{max-width:120px}
 .twc-results button{grid-template-columns:1fr;gap:2px}
}

.twc-add.is-empty{width:auto;gap:10px;border-color:transparent;background:transparent;padding:0;color:#697386;font-size:14px}
.twc-add.is-empty>span:first-child{font-size:20px;font-weight:300}
.twc-add.is-empty:hover{color:#2859a6;background:#f5f8fc}
