.thread-dialog{width:700px;max-width:calc(100vw - 28px)}
.thread-search-row{display:grid;grid-template-columns:1fr 155px;gap:12px;margin-top:16px}
.thread-search-row label{font-size:12px;min-width:0}.thread-search-row input,.thread-search-row select{width:100%;margin-top:7px}
.thread-owned-filter{display:flex;align-items:center;gap:8px;font-size:12px;margin-top:16px}.thread-owned-filter input{margin:0}
.thread-owned-filter span{color:var(--muted)}
.thread-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:290px;overflow:auto;padding:3px}
.thread-card{border:1px solid var(--line);border-radius:8px;display:flex;flex-direction:column;min-width:0;background:var(--paper)}
.thread-card.selected{border:2px solid var(--green);background:var(--green-soft)}
.thread-card .thread-pick{display:flex;align-items:center;gap:10px;flex:1;border:0;background:none;text-align:left;padding:10px;width:100%;min-width:0}
.thread-swatch{display:inline-block;width:34px;height:34px;flex-shrink:0;border:1px solid #0003;border-radius:6px}
.thread-card strong,.thread-card small{display:block;overflow-wrap:anywhere}.thread-card strong{font-size:12px;line-height:1.4}.thread-card small{font-size:11px;color:var(--muted);margin-top:3px}
.thread-card .thread-own{border:0;border-top:1px solid var(--line);background:none;font-size:11px;padding:7px;text-align:left}
.thread-choice{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:8px;margin-top:14px;font-size:12px;overflow-wrap:anywhere}
.thread-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.thread-actions button{justify-content:center;flex:1;font-size:12px;padding:13px 10px}
#thread-results-status{font-size:12px}#thread-identity{overflow-wrap:anywhere;margin:8px 0}
#thread-matches{border-top:1px solid var(--line);margin-top:20px;padding-top:16px}#thread-matches h2{font-size:16px}
.thread-match{display:grid;grid-template-columns:20px 1fr 18px 20px 1fr;align-items:center;gap:8px;margin:12px 0;font-size:11px;overflow-wrap:anywhere}.thread-match .thread-swatch{width:20px;height:24px}
.thread-sources{font-size:11px;color:var(--muted);line-height:1.6;margin-top:12px}.thread-sources summary{cursor:pointer}.thread-sources a{color:var(--green)}
.imported-thread{flex-wrap:wrap}.imported-thread span{flex:1}.imported-thread .choose-imported-thread{padding:7px 9px;font-size:11px}
.thread-dialog button:focus-visible{outline:2px solid #b66c32;outline-offset:2px}
@media(max-width:600px){.thread-dialog{padding:28px 18px}.thread-search-row{grid-template-columns:1fr 125px}.thread-results{grid-template-columns:1fr;max-height:260px}.thread-actions{flex-direction:row}.thread-match{grid-template-columns:18px 1fr 12px 18px 1fr;gap:5px}}
