.kps-favorite-panel {
  border: 1px solid #dce3eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  margin-bottom: 12px;
}

.kps-favorite-section {
  min-width: 0;
}

.kps-favorite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.kps-favorite-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 3px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #f8fafc;
}

.kps-favorite-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 52px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.kps-favorite-tab.is-active {
  background: #2563eb;
  color: #ffffff;
}

.kps-favorite-head h5 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.kps-favorite-title-wrap {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 8px;
}

.kps-favorite-tab-count {
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.78;
}

.kps-favorite-scroll {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.kps-favorite-scroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 40px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.kps-favorite-scroll-btn:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.kps-favorite-scroll-btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.kps-favorite-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  cursor: grab;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.kps-favorite-list img,
.kps-favorite-list a {
  -webkit-user-drag: none;
}

.kps-favorite-list.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.kps-favorite-list.is-dragging a,
.kps-favorite-list.is-dragging button {
  pointer-events: none;
}

.kps-favorite-empty {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

.kps-favorite-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: 220px;
  max-width: 82vw;
  overflow: hidden;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: #f8fafc;
}

.kps-favorite-main {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.kps-favorite-main:hover {
  color: #2563eb;
}

.kps-favorite-logo,
.kps-favorite-photo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 8px;
  background: #e2e8f0;
  color: #2563eb;
  font-size: 13px;
  font-weight: 950;
}

.kps-favorite-logo img,
.kps-favorite-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kps-favorite-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.kps-favorite-copy strong,
.kps-favorite-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kps-favorite-copy strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.kps-favorite-copy small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.kps-fav-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #ffffff;
  color: #94a3b8;
  font-size: 17px;
  line-height: 1;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.kps-fav-btn:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  color: #2563eb;
}

.kps-fav-btn.is-on {
  border-color: #facc15;
  background: #fffbeb;
  color: #f59e0b;
}

.kps-player-card > .kps-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  margin-right: 0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.kps-favorite-chip > .kps-fav-btn {
  width: 30px;
  height: 30px;
  margin-right: 6px;
}

@media (max-width: 575.98px) {
  .kps-favorite-scroll {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    gap: 4px;
  }

  .kps-favorite-scroll-btn {
    width: 28px;
    height: 38px;
    font-size: 22px;
  }
}
