/* 自选筛选栏沿用面板文字、边框和选中态。窄面板允许搜索框换行。 */
.dg-fav-bar {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(127, 127, 127, .24);
  font: inherit;
  font-size: 12px;
  line-height: 18px;
}
.dg-fav-chip, .dg-fav-clear, .dg-fav-save, .dg-fav-action, .dg-fav-search, .dg-fav-star {
  box-sizing: border-box;
  appearance: none;
  margin: 0;
  border: 1px solid rgba(127, 127, 127, .45);
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
}
.dg-fav-chip, .dg-fav-clear, .dg-fav-save, .dg-fav-action {
  min-height: 24px;
  padding: 1px 6px;
  cursor: pointer;
  white-space: nowrap;
}
.dg-fav-chip.is-active {
  border-color: currentColor;
  background: rgba(80, 137, 239, .18);
  font-weight: 600;
}
.dg-fav-count { margin-inline-start: 4px; font-variant-numeric: tabular-nums; }
.dg-fav-search { flex: 1 1 6em; min-width: 5em; max-width: 100%; min-height: 24px; padding: 1px 6px; }
.dg-fav-search::-webkit-search-cancel-button { display: none; }
.dg-fav-clear { min-width: 24px; }
.dg-fav-bar [hidden] { display: none; }
.dg-fav-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex: 0 0 auto;
  width: 15px;
  height: 20px;
  padding: 0;
  border: 0;
  margin-inline-end: 0;
  font: 12.5px/1 sans-serif;
  opacity: .42;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity .12s ease, color .12s ease;
}
.dg-fav-star::before { content: '☆'; }
.watchlist-row:hover .dg-fav-star,
.dg-fav-star:hover,
.dg-fav-star[aria-pressed="true"] { opacity: 1; }
.dg-fav-star[aria-pressed="true"]::before { content: '★'; color: #d9820b; }
.dg-fav-star:hover, .dg-fav-save:hover, .dg-fav-action:hover, .dg-fav-clear:hover, .dg-fav-chip:hover { background-color: rgba(127, 127, 127, .16); }
.dg-fav-bar :focus-visible, .dg-fav-star:focus-visible, .dg-fav-action:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
@media (pointer: coarse) {
  .dg-fav-star, .dg-fav-chip, .dg-fav-save, .dg-fav-action, .dg-fav-clear, .dg-fav-search { min-height: 32px; }
  .dg-fav-star, .dg-fav-clear { min-width: 32px; }
}
.watchlist-row.dg-fav, .watchlist-tile.dg-fav { box-shadow: inset 2px 0 0 #d5911b; }
.watchlist-row.dg-fav-hidden, .watchlist-tile.dg-fav-hidden, .watchlist-group.dg-fav-hidden { display: none !important; }
.dg-fav-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 8px; font-size: 12px; }
.dg-fav-toast {
  position: fixed;
  z-index: 2147483000;
  inset-inline-start: 50%;
  bottom: 96px;
  max-width: 80vw;
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(32, 34, 40, .94);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity .16s, transform .16s;
}
.dg-fav-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.dg-fav-toast.is-remove { background: rgba(70, 72, 80, .94); }
@media (prefers-reduced-motion: reduce) { .dg-fav-toast { transition: none; } }
.dg-fav-recent {
  box-sizing: border-box;
  width: 5em;
  max-width: 100%;
  min-height: 24px;
  border: 1px solid rgba(127, 127, 127, .45);
  border-radius: 5px;
  color: inherit;
  background: transparent;
  font: inherit;
}
.dg-fav-recent option { color: CanvasText; background: Canvas; }
.dg-fav-matches { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dg-fav-hint { display: none; flex-basis: 100%; font: inherit; overflow-wrap: anywhere; }
.dg-fav-search:focus ~ .dg-fav-hint { display: block; }
.dg-fav-empty [hidden] { display: none; }
@media (any-pointer: coarse) { .dg-fav-recent { min-height: 32px; } }
