/* Topic-result tag refinement — scoped to Treasure Hunting search results. */
.th-topic-refine {
  margin: 0 0 1.15rem;
  padding: .9rem 1rem 1rem;
  border: 1px solid rgba(231, 184, 73, .28);
  border-radius: 8px;
  background: rgba(255,255,255,.018);
}
.th-topic-refine[hidden] { display:none !important; }
.th-topic-refine-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:.65rem;
}
.th-topic-refine-title {
  margin:0;
  font-size:.92rem;
  font-weight:800;
}
.th-topic-refine-count {
  margin:.15rem 0 0;
  font-size:.76rem;
  color:var(--muted, #b8b8b8);
}
.th-topic-refine-actions {
  display:flex;
  gap:.45rem;
  flex-wrap:wrap;
}
.th-topic-refine-action {
  appearance:none;
  border:0;
  background:transparent;
  color:var(--gold, #e7b849);
  font:inherit;
  font-size:.74rem;
  font-weight:800;
  cursor:pointer;
  padding:.15rem .2rem;
}
.th-topic-refine-search {
  width:min(360px,100%);
  margin-bottom:.7rem;
}
.th-topic-refine-search input {
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.18);
  border-radius:6px;
  background:#0f1315;
  color:#fff;
  padding:.58rem .72rem;
  font:inherit;
}
.th-topic-refine-pills {
  display:flex;
  flex-wrap:wrap;
  gap:.42rem;
  max-height:148px;
  overflow:auto;
  padding:.05rem .15rem .15rem 0;
}
.th-topic-refine-pill {
  appearance:none;
  border:1px solid rgba(231,184,73,.72);
  border-radius:999px;
  background:rgba(231,184,73,.16);
  color:#f5d77e;
  padding:.34rem .62rem;
  font:inherit;
  font-size:.72rem;
  font-weight:750;
  line-height:1.15;
  cursor:pointer;
}
.th-topic-refine-pill:hover { border-color:#e7b849; }
.th-topic-refine-pill.is-off {
  border-color:rgba(255,255,255,.16);
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.42);
}
.th-topic-refine-pill[hidden] { display:none !important; }
@media (max-width:680px) {
  .th-topic-refine { padding:.8rem; }
  .th-topic-refine-pills { max-height:180px; }
}
