.glyph-collection-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 10px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0f1216;
}

.glyph-collection-tabs button {
  min-width: 0;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.glyph-collection-tabs button:hover {
  color: var(--text);
  background: var(--surface-raised);
}

.glyph-collection-tabs button.active {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.glyph-collection-tabs .collection-count {
  min-width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: #0c0f13;
  color: var(--subtle);
  font: 8px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.glyph-collection-tabs button.active .collection-count {
  background: var(--accent-soft);
  color: #a9c7fa;
}

.glyph-item {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
}

.glyph-item > .glyph-button {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.glyph-favorite {
  position: absolute;
  z-index: 2;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: rgba(10, 12, 15, .78);
  color: #a7afba;
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
  transition: opacity .12s ease, color .12s ease, background .12s ease;
}

.glyph-item:hover .glyph-favorite,
.glyph-favorite:focus-visible,
.glyph-favorite.active {
  opacity: 1;
}

.glyph-favorite:hover {
  background: #222832;
  color: #ffffff;
}

.glyph-favorite.active {
  color: #f2c15d;
}

.glyph-selection-meta {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.glyph-selection-meta #selected-source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-current {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: #8f98a7;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.favorite-current:hover {
  color: var(--text);
}

.favorite-current.active {
  color: #f2c15d;
}

@media (max-width: 420px) {
  .glyph-selection-meta #selected-source {
    display: none;
  }
}
