/* 上部の並び替えUI（スクショっぽい配置） */
.term-sort {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin: .5rem 0 1rem;
}
.term-sort__left { display: flex; gap: .5rem; }
.term-sort__all {
  appearance: none;
  border: 1px solid var(--color-border, #ddd);
  background: #fff;
  padding: .45rem .75rem;
  border-radius: .5rem;
  cursor: pointer;
  font-size: 14px;
}
.term-sort__right { display: flex; align-items: center; gap: .5rem; }
.term-sort__label { font-size: 14px; color: #666; }
.term-sort__select {
  font-size: 14px;
  padding: .45rem .6rem;
  border: 1px solid #ddd;
  border-radius: .5rem;
  background: #fff;
}

/* Ajaxで返す人気グリッド（スマホ2/PC3） */
.term-sort__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) {
  .term-sort__grid { grid-template-columns: repeat(3, 1fr); }
}
.term-sort__card {
  display: block;
  background: #fff;
  text-decoration: none;
  border: 1px solid #eee;
  border-radius: .6rem;
  overflow: hidden;
}
.term-sort__thumb img,
.term-sort__thumb .no-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #f4f4f4;
}
.term-sort__title {
  font-size: 14px;
  line-height: 1.5;
  padding: .5rem .6rem .7rem;
  color: inherit;
}
.term-sort__loading { padding: 1rem 0; color: #666; }

/* パネル領域 */
.term-sort__pane { margin-top: .5rem; }
.term-sort__left,
.term-sort__all { display: none !important; }
